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

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