00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00062
00063 #pragma warning (disable : 4786)
00064 #endif
00065
00066 #if !defined(AFX_PARAM_H__351B13BB_5D03_40C5_93F5_56D17295A8BD__INCLUDED_)
00067 #define AFX_PARAM_H__351B13BB_5D03_40C5_93F5_56D17295A8BD__INCLUDED_
00068
00069 #include "IParam.h"
00070 #include "BasicTypeSerializer.h"
00071 #include "AxisTime.h"
00072
00073 #include <string>
00074 using namespace std;
00075
00076 class ArrayBean;
00077
00078
00086 class Param : public IParam
00087 {
00088 friend class SoapDeSerializer;
00089 friend class SoapSerializer;
00090 friend class XMLStreamHandler;
00091 public:
00092 Param(){ m_Type = USER_TYPE;};
00093
00094 Param(time_t time);
00095 Param(struct tm timeStruct);
00096 Param(const Param& param);
00097 Param(const AxisChar* str, XSDTYPE type = XSD_STRING);
00098 Param(int nValue);
00099 Param(unsigned int unValue);
00100 Param(short sValue);
00101 Param(unsigned short usValue);
00102 Param(char cValue);
00103 Param(unsigned char ucValue);
00104 Param(long lValue, XSDTYPE type=XSD_LONG);
00105 Param(unsigned long ulValue);
00106 Param(float fValue);
00107 Param(double dValue, XSDTYPE type=XSD_DOUBLE);
00108 virtual ~Param();
00109 void operator=(const Param ¶m);
00110
00111 private:
00112 uParamValue m_Value;
00113 AxisString m_sValue;
00114 AxisString m_sName;
00115 XSDTYPE m_Type;
00116
00117 private:
00118 AxisString m_strPrefix;
00119 AxisString m_strUri;
00120
00121 public:
00122 const AxisString& GetTypeName();
00123 int SetValue(const AxisChar* sValue);
00124 int SetValue(XSDTYPE nType, uParamValue Value);
00125 XSDTYPE GetType() const;
00126 int serialize(IWrapperSoapSerializer& pSZ);
00127
00128
00129 int GetInt(int* pValue);
00130 int GetUnsignedInt(unsigned int* pValue);
00131 int GetShort(short* pValue);
00132 int GetUnsignedShort(unsigned short* pValue);
00133 int GetByte(char* pValue);
00134 int GetUnsignedByte(unsigned char* pValue);
00135 int GetLong(long* pValue);
00136 int GetInteger(long* pValue);
00137 int GetUnsignedLong(unsigned long* pValue);
00138 int GetFloat(float* pValue);
00139 int GetDouble(double* pValue);
00140 int GetDecimal(double* pValue);
00141 int GetAnyURI(const AxisChar** pValue);
00142 int GetQName(const AxisChar** pValue);
00143 int GetDateTime(struct tm* pValue);
00144 int GetDate(struct tm* pValue);
00145 int GetTime(struct tm* pValue);
00146 int GetDuration(long* pValue);
00147 int GetString(const AxisChar** pValue);
00148 int GetHexString(const AxisChar** pValue);
00149 int GetBase64String(const AxisChar** pValue);
00150 void setPrefix(const AxisChar* prefix);
00151 void setUri(const AxisChar* uri);
00152 int GetArraySize(int* pValue);
00153 int SetArrayElements(void* pElements);
00154 int SetArrayElements(void* pObject, AXIS_DESERIALIZE_FUNCT pDZFunct, AXIS_OBJECT_DELETE_FUNCT pDelFunct, AXIS_OBJECT_SIZE_FUNCT pSizeFunct);
00155 int SetUserType(void* pObject, AXIS_DESERIALIZE_FUNCT pDZFunct, AXIS_OBJECT_DELETE_FUNCT pDelFunct);
00156 void SetName(const AxisChar* sName);
00157 uParamValue GetValue(){ return m_Value;};
00158 int GetString(string* pValue);
00159 int GetAnyURI(string* pValue);
00160 int GetQName(string* pValue);
00161 int GetHexString(string* pValue);
00162 int GetBase64String(string* pValue);
00163 };
00164
00165 #endif // !defined(AFX_PARAM_H__351B13BB_5D03_40C5_93F5_56D17295A8BD__INCLUDED_)