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

ComplexElement.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 
00019 /*
00020  * This software consists of voluntary contributions made by many
00021  * individuals on behalf of the Apache Software Foundation.  For more
00022  * information on the Apache Software Foundation, please see
00023  * <http://www.apache.org/>.
00024  *
00025  *
00026  */
00027 
00028 /*
00029  * Revision 1.1  2004/05/25 samisa
00030  * Added copy constructure and clone for copy constructing derived classes
00031  */
00032 
00033 /*
00034  * Revision 1.2  2004/06/13 roshan
00035  * Added doxygen comments to help autobuild API docs
00036  */
00037 
00038 #if !defined(AXIS_COMPLEXELEMENT_H__OF_AXIS_INCLUDED_)
00039 #define AXIS_COMPLEXELEMENT_H__OF_AXIS_INCLUDED_
00040 
00041 #ifdef WIN32
00042 #pragma warning (disable : 4786)
00043 #endif
00044 
00045 using namespace std;
00046 
00055 class ComplexElement : public BasicNode
00056 {
00057 public:
00058     ComplexElement(AxisChar* pachLocalName, AxisChar* pachPrefix, AxisChar* pachUri);
00059 
00065     int getNoOfChildren();
00066 
00073     const BasicNode* getChild(int iChildPosition) const;
00074 
00080     const BasicNode* getLastChild() const;
00081 
00087     const BasicNode* getFirstChild() const;
00088 
00096     int addChild(BasicNode* pBasicNode);
00097 
00103     NODE_TYPE getNodeType() const;
00104 
00111     int setURI(const AxisChar* pachURI);
00112 
00119     int setLocalName(const AxisChar* pachLocalName);
00120 
00127     int setPrefix(const AxisChar* pachPrefix);
00128 
00129     int serialize(SoapSerializer& pSZ);
00130 
00131     int serialize(SoapSerializer& pSZ, list<AxisChar*>& lstTmpNameSpaceStack);
00132 
00136     ComplexElement();
00137     ComplexElement(const ComplexElement& rCopy);
00138     BasicNode* clone();
00139 
00143     virtual ~ComplexElement();
00144 
00145     /*
00146      * This method is overridden to do nothing always because this is 
00147      *  a Complex Element. Instead of using this method, a user of a 
00148      *  ComplexElement must get the childeren of this ComplexElement and
00149      *  has to traverse through the childrean in a appropriate manner
00150      *  in order to set there values.
00151      *  A user of a ComplexElement should not use this method.
00152      * @param
00153      * @return Always return fail (AXIS_FAIL).
00154      */
00155     int setValue(const AxisChar* pachValue) {return AXIS_FAIL;}
00156 
00157     /*
00158      * This method is overridden to return NULL always because this is 
00159      *  a Complex Element. Instead of using this method, a user of a 
00160      *  ComplexElement must get the childeren of this ComplexElement and
00161      *  has to traverse through the childrean in a appropriate manner
00162      *  in order to get there values.
00163      *  A user of a ComplexElement should not use this method.
00164      * @param
00165      * @return Always return NULL to indicate unsuccessful.
00166      */
00167     const AxisChar* getValue() const {return NULL;}
00168 
00169 private:
00170     int iNoOfChildren;
00171     int serializeChildren(SoapSerializer& pSZ);
00172     int serializeChildren(SoapSerializer& pSZ, list<AxisChar*>& lstTmpNameSpaceStack);
00173     bool isSerializable();
00174     list<BasicNode*> m_children;
00175     AxisChar* m_pachPrefix;
00176     AxisChar* m_pachLocalName;
00177     AxisChar* m_pachURI;
00178 };
00179 
00180 #endif

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