00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00023 #if !defined(_ATTRIBUTE_H____OF_AXIS_INCLUDED_)
00024 #define _ATTRIBUTE_H____OF_AXIS_INCLUDED_
00025
00026 #include "GDefine.h"
00027
00028 #ifdef __cplusplus
00029 #include <list>
00030 #include <string>
00031
00032 AXIS_CPP_NAMESPACE_START
00033
00034 using namespace std;
00035
00036 class SoapSerializer;
00037 #include <axis/IAttribute.h>
00038
00039 #endif
00040
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061 typedef struct {
00062 void (AXISCALL* setValue)(void* pObj, const AxisChar* value);
00063
00064 } AttributeFunctions;
00065
00066 #ifdef __cplusplus
00067
00068 class Attribute : public IAttribute
00069 {
00070 public:
00071 static AttributeFunctions ms_VFtable;
00072 static bool bInitialized;
00073
00074 #ifdef UNIT_TESTING_ON
00075 int initializeForTesting();
00076 #endif
00077 int serialize(SoapSerializer& pSZ) const;
00078 int serialize(SoapSerializer& pSZ, list<AxisChar*>& lstTmpNameSpaceStack);
00079
00080 Attribute();
00081 Attribute(const AxisChar* localname, const AxisChar* prefix,
00082 const AxisChar* uri, const AxisChar* value);
00083 Attribute(const AxisChar* localname, const AxisChar* prefix,
00084 const AxisChar* value);
00085 Attribute(const Attribute& rCopy);
00086 Attribute* clone();
00087 virtual ~Attribute();
00088
00089 void setValue(const AxisChar* value);
00090 void setUri(const AxisChar* uri);
00091 void setPrefix(const AxisChar* prefix);
00092 void setLocalName(const AxisChar* localname);
00093
00094 const AxisChar* getValue();
00095 const AxisChar* getUri();
00096 const AxisChar* getPrefix();
00097 const AxisChar* getLocalName();
00098
00099 private:
00100 bool isSerializable() const;
00101 AxisString m_localname;
00102 AxisString m_prefix;
00103 AxisString m_uri;
00104 AxisString m_value;
00105
00106 };
00107
00108 #endif
00109
00110 typedef struct {
00111 void* _object;
00112 AttributeFunctions* _functions;
00113 } Attribute_C;
00114
00115 AXIS_CPP_NAMESPACE_END
00116
00117 #ifndef __cplusplus
00118 typedef Attribute_C Attribute;
00119 #endif
00120
00121 #endif
00122