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 // (c) Copyright IBM Corp. 2004, 2005 All Rights Reserved
00004  *
00005  *   Licensed under the Apache License, Version 2.0 (the "License");
00006  *   you may not use this file except in compliance with the License.
00007  *   You may obtain a copy of the License at
00008  *
00009  *       http://www.apache.org/licenses/LICENSE-2.0
00010  *
00011  *   Unless required by applicable law or agreed to in writing, software
00012  *   distributed under the License is distributed on an "AS IS" BASIS,
00013  *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00014  *   See the License for the specific language governing permissions and
00015  *   limitations under the License.
00016  */
00017 
00018 
00025 #if !defined(_BASICNODE_H____OF_AXIS_INCLUDED_)
00026 #define _BASICNODE_H____OF_AXIS_INCLUDED_
00027 
00028 #include <axis/GDefine.hpp>
00029 #include <axis/IAttribute.hpp>
00030 #include <list>
00031 
00032 AXIS_CPP_NAMESPACE_START
00033 
00034 class SoapSerializer;
00035 
00036 typedef enum { ELEMENT_NODE=1, CHARACTER_NODE} NODE_TYPE;
00037 
00038 /*
00039  * @class BasicNode
00040  * @brief interface for the BasicNode class.
00041  *
00042  * @author Roshan Weerasuriya (roshan@opensource.lk, roshanw@jkcsworld.com)
00043  * @author Samisa Abeysinghe (sabeysinghe@virtusa.com)
00044  *
00045  */
00046 
00047 /*
00048  * Revision 1.1  2004/05/25 samisa
00049  * Added constructors, copy constructure and pure virtual clone for copy constructing derived classes
00050  */
00051 
00052 /*
00053  * Revision 1.2  2004/06/13 roshan
00054  * Added doxygen comments to help autobuild API docs
00055  */
00056 
00057 /*
00058  * Revision 1.3  2004/07/28 roshan
00059  * Added the method getLocalName()
00060  */
00061 
00062 class BasicNode
00063 {
00064 public:
00065 
00077     virtual IAttribute* getAttribute(AxisChar* pachPrefix, AxisChar* pachURI, AxisChar* pachLocalname) = 0;
00078 
00083     virtual IAttribute* getFirstAttribute() = 0;
00084 
00089     virtual IAttribute* getLastAttribute() = 0;
00090 
00095     virtual IAttribute* getNextAttribute() = 0;
00096 
00101     virtual IAttribute* getCurrentAttribute() = 0;
00102 
00103 
00114     virtual IAttribute* createAttribute(const AxisChar* localname, 
00115             const AxisChar* prefix, const AxisChar* uri, 
00116             const AxisChar* value) =0;
00117 
00127     virtual IAttribute* createAttribute(const AxisChar* localname,
00128         const AxisChar* prefix, const AxisChar* value)=0 ;
00129 
00138     virtual IAttribute* createAttribute(const AxisChar* localname,
00139         const AxisChar* value)=0 ;
00140 
00147     virtual const AxisChar* getLocalName() = 0; 
00148 
00156     virtual int getNoOfChildren() = 0;
00157 
00164     virtual BasicNode* getFirstChild() = 0;
00165 
00172     virtual BasicNode* getLastChild() = 0;
00173 
00181     virtual BasicNode* getChild(int iChildPosition) = 0;
00182 
00190     virtual int addChild(BasicNode* pBasicNode) =0;
00191 
00197     virtual NODE_TYPE getNodeType() const =0;
00198 
00205     virtual const AxisChar* getValue() const =0;
00206 
00214     virtual int setValue(const AxisChar* pachValue)=0;
00215     
00223     virtual int setURI(const AxisChar* sURI) =0;
00224 
00232     virtual int setLocalName(const AxisChar* sLocalName) =0;
00233 
00241     virtual int setPrefix(const AxisChar* sPrefix) =0;
00242 
00247     virtual const AxisChar* getURI() = 0;
00248 
00253     virtual const AxisChar* getPrefix() = 0;
00254 
00255     virtual int serialize(SoapSerializer& pSZ) =0;
00256     virtual int serialize(SoapSerializer& pSZ, 
00257     std::list<AxisChar*>& lstTmpNameSpaceStack) =0;
00258     BasicNode();
00259     BasicNode(const AxisChar* pachValue, NODE_TYPE eNodeType = ELEMENT_NODE);
00260     BasicNode(const BasicNode& rCopy);
00261     virtual BasicNode* clone() = 0;
00262     virtual ~BasicNode();
00263 
00264 protected:
00269     NODE_TYPE m_iNodeType;
00270 
00275     AxisChar* m_pachValue;
00276 
00277 };
00278 
00279 AXIS_CPP_NAMESPACE_END
00280 
00281 #endif 
00282 

Generated on Fri Mar 3 01:12:35 2006 for AxisC++ by doxygen1.2.18