Main Page   Class Hierarchy   Compound List   File List   Compound Members   Examples  

Attribute.h

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 
00017 
00018 #if !defined(_ATTRIBUTE_H____OF_AXIS_INCLUDED_)
00019 #define _ATTRIBUTE_H____OF_AXIS_INCLUDED_
00020 
00021 #include "GDefine.h"
00022 
00023 #ifdef __cplusplus
00024 #include <string>
00025 #include <list>
00026 
00027 using namespace std;
00028 
00029 class SoapSerializer;
00030 
00031 #endif
00032 
00043 /*
00044  * Revision 1.1  2004/05/25 samisa
00045  * Added copy constructor
00046  */
00047 
00048 /*
00049  * Revision 1.11  2004/06/13 susantha
00050  * Added support for writing C web services and handlers
00051  */
00052 
00053 typedef struct {
00054         void (AXISCALL* setValue)(void* pObj, const AxisChar* value);
00055         /*add all other API functions here*/
00056 } AttributeFunctions;
00057 
00058 #ifdef __cplusplus
00059 
00060 class Attribute  
00061 {
00062 public:        
00063         static AttributeFunctions ms_VFtable;
00064         static bool bInitialized;
00065 
00066 #ifdef UNIT_TESTING_ON
00067     int initializeForTesting();
00068 #endif
00069     int serialize(SoapSerializer& pSZ) const;
00070     int serialize(SoapSerializer& pSZ, list<AxisChar*>& lstTmpNameSpaceStack);
00071 
00072     Attribute();    
00073     Attribute(const AxisChar* localname, const AxisChar* prefix, 
00074         const AxisChar* uri, const AxisChar* value);
00075     Attribute(const AxisChar* localname, const AxisChar* prefix, 
00076         const AxisChar* value);
00077     Attribute(const Attribute& rCopy);   
00078     Attribute* clone(); 
00079     virtual ~Attribute();
00080 
00081     void setValue(const AxisChar* value);
00082     void setUri(const AxisChar* uri);
00083     void setPrefix(const AxisChar* prefix);
00084     void setLocalName(const AxisChar* localname);    
00085 
00086 private:    
00087     bool isSerializable() const;
00088     AxisString m_localname;
00089     AxisString m_prefix;
00090     AxisString m_uri;
00091     AxisString m_value;
00092 
00093 };
00094 
00095 #endif
00096 
00097 typedef struct { 
00098         void* _object; /* this will be C++ Call Object */
00099         AttributeFunctions* _functions; /* this is the static function table */
00100 } Attribute_C;
00101 
00102 #ifndef __cplusplus
00103 typedef Attribute_C Attribute; 
00104 #endif
00105 
00106 #endif
00107 

Generated on Tue Jun 15 19:13:22 2004 for axiscpp by doxygen1.2.18