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 #include <list>
00046 #include <axis/server/BasicNode.h>
00047 
00048 using namespace std;
00049 
00058 class ComplexElement : public BasicNode
00059 {
00060 public:
00061     ComplexElement(AxisChar* pachLocalName, AxisChar* pachPrefix, AxisChar* pachUri);
00062 
00068     int getNoOfChildren();
00069 
00076     const BasicNode* getChild(int iChildPosition) const;
00077 
00083     const BasicNode* getLastChild() const;
00084 
00090     const BasicNode* getFirstChild() const;
00091 
00098     int addChild(BasicNode* pBasicNode);
00099 
00105     NODE_TYPE getNodeType() const;
00106 
00113     int setURI(const AxisChar* pachURI);
00114 
00121     int setLocalName(const AxisChar* pachLocalName);
00122 
00129     int setPrefix(const AxisChar* pachPrefix);
00130 
00131     int serialize(SoapSerializer& pSZ);
00132 
00133     int serialize(SoapSerializer& pSZ, list<AxisChar*>& lstTmpNameSpaceStack);
00134 
00138     ComplexElement();
00139     ComplexElement(const ComplexElement& rCopy);
00140     BasicNode* clone();
00141 
00145     virtual ~ComplexElement();
00146 
00147     /*
00148      * This method is overridden to do nothing always because this is 
00149      *  a Complex Element. Instead of using this method, a user of a 
00150      *  ComplexElement must get the childeren of this ComplexElement and
00151      *  has to traverse through the childrean in a appropriate manner
00152      *  in order to set there values.
00153      *  A user of a ComplexElement should not use this method.
00154      * @param
00155      * @return Always return fail (AXIS_FAIL).
00156      */
00157     int setValue(const AxisChar* pachValue) {return AXIS_FAIL;}
00158 
00159     /*
00160      * This method is overridden to return NULL always because this is 
00161      *  a Complex Element. Instead of using this method, a user of a 
00162      *  ComplexElement must get the childeren of this ComplexElement and
00163      *  has to traverse through the childrean in a appropriate manner
00164      *  in order to get there values.
00165      *  A user of a ComplexElement should not use this method.
00166      * @param
00167      * @return Always return NULL to indicate unsuccessful.
00168      */
00169     const AxisChar* getValue() const {return NULL;}
00170 
00171 private:
00172     int iNoOfChildren;
00173     int serializeChildren(SoapSerializer& pSZ);
00174     int serializeChildren(SoapSerializer& pSZ, list<AxisChar*>& lstTmpNameSpaceStack);
00175     bool isSerializable();
00176     list<BasicNode*> m_children;
00177     AxisChar* m_pachPrefix;
00178     AxisChar* m_pachLocalName;
00179     AxisChar* m_pachURI;
00180 };
00181 
00182 #endif

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