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 using namespace std;
00034 
00035 class SoapSerializer;
00036 
00037 #endif
00038 
00039 enum NODE_TYPE { ELEMENT_NODE=1, CHARACTER_NODE};
00040 
00041 /*
00042  * @class BasicNode
00043  * @brief interface for the BasicNode class.
00044  *
00045  * @author Roshan Weerasuriya (roshan@opensource.lk, roshanw@jkcsworld.com)
00046  * @author Samisa Abeysinghe (sabeysinghe@virtusa.com)
00047  *
00048  */
00049 
00050 /*
00051  * Revision 1.1  2004/05/25 samisa
00052  * Added constructors, copy constructure and pure virtual clone for copy constructing derived classes
00053  */
00054 
00055 /*
00056  * Revision 1.2  2004/06/13 roshan
00057  * Added doxygen comments to help autobuild API docs
00058  */
00059 
00060 typedef struct {
00061         int (AXISCALL* getNoOfChildren)(void* pObj);
00062         /*add akk itger aou fybctuibs gere.*/
00063 } BasicNodeFunctions;
00064 
00065 #ifdef __cplusplus
00066 
00067 class BasicNode
00068 {
00069 public:
00077     virtual int getNoOfChildren() = 0;
00078 
00085     virtual const BasicNode* getFirstChild() const = 0;
00086 
00093     virtual const BasicNode* getLastChild() const = 0;
00094 
00102     virtual const BasicNode* getChild(int iChildPosition) const = 0;
00103 
00111     virtual int addChild(BasicNode* pBasicNode) =0;
00112 
00118     virtual NODE_TYPE getNodeType() const =0;
00119 
00126     virtual const AxisChar* getValue() const =0;
00127 
00135     virtual int setValue(const AxisChar* pachValue)=0;
00136     
00144     virtual int setURI(const AxisChar* sURI) =0;
00145 
00153     virtual int setLocalName(const AxisChar* sLocalName) =0;
00154 
00162     virtual int setPrefix(const AxisChar* sPrefix) =0;
00163 
00164     virtual int serialize(SoapSerializer& pSZ) =0;
00165     virtual int serialize(SoapSerializer& pSZ, 
00166         list<AxisChar*>& lstTmpNameSpaceStack) =0;
00167     BasicNode();
00168     BasicNode(const AxisChar* pachValue, NODE_TYPE eNodeType = ELEMENT_NODE);
00169     BasicNode(const BasicNode& rCopy);
00170     virtual BasicNode* clone() = 0;
00171     virtual ~BasicNode();
00172 
00173 protected:
00178     NODE_TYPE m_iNodeType;
00179 
00184     AxisChar* m_pachValue;
00185 };
00186 
00187 #endif
00188 
00189 typedef struct { 
00190         void* _object; /* this will be C++ Call Object */
00191         BasicNodeFunctions* _functions; /* this is the static function table */
00192 } BasicNode_C;
00193 
00194 #ifndef __cplusplus
00195 typedef BasicNode_C BasicNode; 
00196 #endif
00197 
00198 #endif 
00199 

Generated on Fri Jul 9 13:18:28 2004 for AxisC++ by doxygen1.2.18