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

BasicNode.hpp

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.hpp"
00028 #include <axis/IAttribute.hpp>
00029 #include <list>
00030 
00031 AXIS_CPP_NAMESPACE_START
00032 using namespace std;
00033 
00034 class SoapSerializer;
00035 
00036 AXIS_CPP_NAMESPACE_END
00037 
00038 enum NODE_TYPE { ELEMENT_NODE=1, CHARACTER_NODE};
00039 
00040 /*
00041  * @class BasicNode
00042  * @brief interface for the BasicNode class.
00043  *
00044  * @author Roshan Weerasuriya (roshan@opensource.lk, roshanw@jkcsworld.com)
00045  * @author Samisa Abeysinghe (sabeysinghe@virtusa.com)
00046  *
00047  */
00048 
00049 /*
00050  * Revision 1.1  2004/05/25 samisa
00051  * Added constructors, copy constructure and pure virtual clone for copy constructing derived classes
00052  */
00053 
00054 /*
00055  * Revision 1.2  2004/06/13 roshan
00056  * Added doxygen comments to help autobuild API docs
00057  */
00058 
00059 /*
00060  * Revision 1.3  2004/07/28 roshan
00061  * Added the method getLocalName()
00062  */
00063 
00064 AXIS_CPP_NAMESPACE_START
00065 using namespace std;
00066 
00067 class BasicNode
00068 {
00069 public:
00070 
00082     virtual IAttribute* getAttribute(AxisChar* pachPrefix, AxisChar* pachURI, AxisChar* pachLocalname) = 0;
00083 
00088     virtual IAttribute* getFirstAttribute() = 0;
00089 
00094     virtual IAttribute* getLastAttribute() = 0;
00095 
00100     virtual IAttribute* getNextAttribute() = 0;
00101 
00106     virtual IAttribute* getCurrentAttribute() = 0;
00107 
00108 
00119     virtual IAttribute* createAttribute(const AxisChar* localname, 
00120             const AxisChar* prefix, const AxisChar* uri, 
00121             const AxisChar* value) =0;
00122 
00132     virtual IAttribute* createAttribute(const AxisChar* localname,
00133         const AxisChar* prefix, const AxisChar* value)=0 ;
00134 
00143     virtual IAttribute* createAttribute(const AxisChar* localname,
00144         const AxisChar* value)=0 ;
00145 
00152     virtual const AxisChar* getLocalName() = 0; 
00153 
00161     virtual int getNoOfChildren() = 0;
00162 
00169     virtual BasicNode* getFirstChild() = 0;
00170 
00177     virtual BasicNode* getLastChild() = 0;
00178 
00186     virtual BasicNode* getChild(int iChildPosition) = 0;
00187 
00195     virtual int addChild(BasicNode* pBasicNode) =0;
00196 
00202     virtual NODE_TYPE getNodeType() const =0;
00203 
00210     virtual const AxisChar* getValue() const =0;
00211 
00219     virtual int setValue(const AxisChar* pachValue)=0;
00220     
00228     virtual int setURI(const AxisChar* sURI) =0;
00229 
00237     virtual int setLocalName(const AxisChar* sLocalName) =0;
00238 
00246     virtual int setPrefix(const AxisChar* sPrefix) =0;
00247 
00252     virtual const AxisChar* getURI() = 0;
00253 
00258     virtual const AxisChar* getPrefix() = 0;
00259 
00260     virtual int serialize(SoapSerializer& pSZ) =0;
00261     virtual int serialize(SoapSerializer& pSZ, 
00262     std::list<AxisChar*>& lstTmpNameSpaceStack) =0;
00263     BasicNode();
00264     BasicNode(const AxisChar* pachValue, NODE_TYPE eNodeType = ELEMENT_NODE);
00265     BasicNode(const BasicNode& rCopy);
00266     virtual BasicNode* clone() = 0;
00267     virtual ~BasicNode();
00268 
00269 protected:
00274     NODE_TYPE m_iNodeType;
00275 
00280     AxisChar* m_pachValue;
00281 
00282 };
00283 
00284 AXIS_CPP_NAMESPACE_END
00285 
00286 #endif 
00287 

Generated on Thu Dec 16 19:43:10 2004 for AxisC++ by doxygen1.2.18