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

BasicNode.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 
00017 
00024 #if !defined(_BASICNODE_H____OF_AXIS_INCLUDED_)
00025 #define _BASICNODE_H____OF_AXIS_INCLUDED_
00026 
00027 #include "GDefine.h"
00028 
00029 #ifdef __cplusplus
00030 
00031 #include <list>
00032 
00033 
00034 AXIS_CPP_NAMESPACE_START
00035 using namespace std;
00036 
00037 class SoapSerializer;
00038 
00039 AXIS_CPP_NAMESPACE_END
00040 
00041 #endif
00042 
00043 #include <axis/IAttribute.h>
00044 
00045 enum NODE_TYPE { ELEMENT_NODE=1, CHARACTER_NODE};
00046 
00047 /*
00048  * @class BasicNode
00049  * @brief interface for the BasicNode class.
00050  *
00051  * @author Roshan Weerasuriya (roshan@opensource.lk, roshanw@jkcsworld.com)
00052  * @author Samisa Abeysinghe (sabeysinghe@virtusa.com)
00053  *
00054  */
00055 
00056 /*
00057  * Revision 1.1  2004/05/25 samisa
00058  * Added constructors, copy constructure and pure virtual clone for copy constructing derived classes
00059  */
00060 
00061 /*
00062  * Revision 1.2  2004/06/13 roshan
00063  * Added doxygen comments to help autobuild API docs
00064  */
00065 
00066 /*
00067  * Revision 1.3  2004/07/28 roshan
00068  * Added the method getLocalName()
00069  */
00070 
00071 
00072 typedef struct {
00073         int (AXISCALL* getNoOfChildren)(void* pObj);
00074         /*add akk itger aou fybctuibs gere.*/
00075 } BasicNodeFunctions;
00076 
00077 #ifdef __cplusplus
00078 
00079 AXIS_CPP_NAMESPACE_START
00080 using namespace std;
00081 
00082 class BasicNode
00083 {
00084 public:
00085 
00097     virtual IAttribute* getAttribute(AxisChar* pachPrefix, AxisChar* pachURI, AxisChar* pachLocalname) = 0;
00098 
00103     virtual IAttribute* getFirstAttribute() = 0;
00104 
00109     virtual IAttribute* getLastAttribute() = 0;
00110 
00115     virtual IAttribute* getNextAttribute() = 0;
00116 
00121     virtual IAttribute* getCurrentAttribute() = 0;
00122 
00123 
00134     virtual IAttribute* createAttribute(const AxisChar* localname, 
00135             const AxisChar* prefix, const AxisChar* uri, 
00136             const AxisChar* value) =0;
00137 
00147     virtual IAttribute* createAttribute(const AxisChar* localname,
00148         const AxisChar* prefix, const AxisChar* value)=0 ;
00149 
00156     virtual const AxisChar* getLocalName() = 0; 
00157 
00165     virtual int getNoOfChildren() = 0;
00166 
00173     virtual const BasicNode* getFirstChild() const = 0;
00174 
00181     virtual const BasicNode* getLastChild() const = 0;
00182 
00190     virtual const BasicNode* getChild(int iChildPosition) const = 0;
00191 
00199     virtual int addChild(BasicNode* pBasicNode) =0;
00200 
00206     virtual NODE_TYPE getNodeType() const =0;
00207 
00214     virtual const AxisChar* getValue() const =0;
00215 
00223     virtual int setValue(const AxisChar* pachValue)=0;
00224     
00232     virtual int setURI(const AxisChar* sURI) =0;
00233 
00241     virtual int setLocalName(const AxisChar* sLocalName) =0;
00242 
00250     virtual int setPrefix(const AxisChar* sPrefix) =0;
00251 
00256     virtual const AxisChar* getURI() = 0;
00257 
00262     virtual const AxisChar* getPrefix() = 0;
00263 
00264     virtual int serialize(SoapSerializer& pSZ) =0;
00265     virtual int serialize(SoapSerializer& pSZ, 
00266     std::list<AxisChar*>& lstTmpNameSpaceStack) =0;
00267     BasicNode();
00268     BasicNode(const AxisChar* pachValue, NODE_TYPE eNodeType = ELEMENT_NODE);
00269     BasicNode(const BasicNode& rCopy);
00270     virtual BasicNode* clone() = 0;
00271     virtual ~BasicNode();
00272 
00273 protected:
00278     NODE_TYPE m_iNodeType;
00279 
00284     AxisChar* m_pachValue;
00285 
00286 };
00287 
00288 AXIS_CPP_NAMESPACE_END
00289 
00290 #endif
00291 
00292 AXIS_CPP_NAMESPACE_START
00293 
00294 typedef struct { 
00295         void* _object; /* this will be C++ Call Object */
00296         BasicNodeFunctions* _functions; /* this is the static function table */
00297 } BasicNode_C;
00298 
00299 AXIS_CPP_NAMESPACE_END
00300 
00301 #ifndef __cplusplus
00302 typedef BasicNode_C BasicNode; 
00303 #endif
00304 
00305 #endif 
00306 

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