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

Generated on Tue Jun 29 09:27:55 2004 for AxisC++ by doxygen1.2.18