Main Page   Class Hierarchy   Compound List   File List   Compound Members   Examples  

BasicNode.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(_BASICNODE_H____OF_AXIS_INCLUDED_)
00019 #define _BASICNODE_H____OF_AXIS_INCLUDED_
00020 
00021 #include "GDefine.h"
00022 
00023 #ifdef __cplusplus
00024 
00025 #include <string>
00026 #include <list>
00027 
00028 using namespace std;
00029 
00030 class SoapSerializer;
00031 
00032 #endif
00033 
00034 enum NODE_TYPE { ELEMENT_NODE=1, CHARACTER_NODE};
00035 
00036 /*
00037  * @class BasicNode
00038  * @brief interface for the BasicNode class.
00039  *
00040  * @author Roshan Weerasuriya (roshan@opensource.lk, roshanw@jkcsworld.com)
00041  * @author Samisa Abeysinghe (sabeysinghe@virtusa.com)
00042  *
00043  */
00044 
00045 /*
00046  * Revision 1.1  2004/05/25 samisa
00047  * Added constructors, copy constructure and pure virtual clone for copy constructing derived classes
00048  */
00049 
00050 /*
00051  * Revision 1.2  2004/06/13 roshan
00052  * Added doxygen comments to help autobuild API docs
00053  */
00054 
00055 typedef struct {
00056         int (AXISCALL* getNoOfChildren)(void* pObj);
00057         /*add akk itger aou fybctuibs gere.*/
00058 } BasicNodeFunctions;
00059 
00060 #ifdef __cplusplus
00061 
00062 class BasicNode
00063 {
00064 public:
00072     virtual int getNoOfChildren() = 0;
00073 
00080     virtual const BasicNode* getFirstChild() const = 0;
00081 
00088     virtual const BasicNode* getLastChild() const = 0;
00089 
00097     virtual const BasicNode* getChild(int iChildPosition) const = 0;
00098 
00106     virtual int addChild(BasicNode* pBasicNode) =0;
00107 
00113     virtual NODE_TYPE getNodeType() const =0;
00114 
00121     virtual const AxisChar* getValue() const =0;
00122 
00130     virtual int setValue(const AxisChar* pachValue)=0;
00131     
00139     virtual int setURI(const AxisChar* sURI) =0;
00140 
00148     virtual int setLocalName(const AxisChar* sLocalName) =0;
00149 
00157     virtual int setPrefix(const AxisChar* sPrefix) =0;
00158 
00159     virtual int serialize(SoapSerializer& pSZ) =0;
00160     virtual int serialize(SoapSerializer& pSZ, 
00161         list<AxisChar*>& lstTmpNameSpaceStack) =0;
00162     BasicNode();
00163     BasicNode(const AxisChar* pachValue, NODE_TYPE eNodeType = ELEMENT_NODE);
00164     BasicNode(const BasicNode& rCopy);
00165     virtual BasicNode* clone() = 0;
00166     virtual ~BasicNode();
00167 
00168 protected:
00173     NODE_TYPE m_iNodeType;
00174 
00179     AxisChar* m_pachValue;
00180 };
00181 
00182 #endif
00183 
00184 typedef struct { 
00185         void* _object; /* this will be C++ Call Object */
00186         BasicNodeFunctions* _functions; /* this is the static function table */
00187 } BasicNode_C;
00188 
00189 #ifndef __cplusplus
00190 typedef BasicNode_C BasicNode; 
00191 #endif
00192 
00193 #endif 
00194 

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