Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members   Examples  

Attribute.h

Go to the documentation of this file.
00001 /*
00002  *   Copyright 2003-2004 The Apache Software Foundation.
00003  *
00004  *   Licensed under the Apache License, Version 2.0 (the "License");
00005  *   you may not use this file except in compliance with the License.
00006  *   You may obtain a copy of the License at
00007  *
00008  *       http://www.apache.org/licenses/LICENSE-2.0
00009  *
00010  *   Unless required by applicable law or agreed to in writing, software
00011  *   distributed under the License is distributed on an "AS IS" BASIS,
00012  *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  *   See the License for the specific language governing permissions and
00014  *   limitations under the License.
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  * Revision 1.1  2004/05/25 samisa
00053  * Added copy constructor
00054  */
00055 
00056 /*
00057  * Revision 1.11  2004/06/13 susantha
00058  * Added support for writing C web services and handlers
00059  */
00060 
00061 typedef struct {
00062         void (AXISCALL* setValue)(void* pObj, const AxisChar* value);
00063         /*add all other API functions here*/
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; /* this will be C++ Call Object */
00112         AttributeFunctions* _functions; /* this is the static function table */
00113 } Attribute_C;
00114 
00115 AXIS_CPP_NAMESPACE_END
00116 
00117 #ifndef __cplusplus
00118 typedef Attribute_C Attribute; 
00119 #endif
00120 
00121 #endif
00122 

Generated on Wed Aug 18 11:42:23 2004 for AxisC++ by doxygen1.2.18