00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef _WSDLELEMENTH
00021 #define _WSDLELEMENTH
00022
00023 #include <string>
00024 #include <vector>
00025 #include "xmlpull/Qname.h"
00026 #include "xmlpull/XmlUtils.h"
00027 #include "schemaparser/Element.h"
00028 #include "wsdlparser/WsdlException.h"
00029 using namespace Schema;
00030
00031 #ifndef WSDLPULL_EXPORT
00032 #if (defined _MSC_VER) && (defined _MT)
00033 #define WSDLPULL_EXPORT __declspec (dllimport)
00034 #else
00035 #define WSDLPULL_EXPORT
00036 #endif
00037 #endif
00038
00039
00040
00041 namespace WsdlPull{
00042 class WsdlParser;
00043
00044 class WSDLPULL_EXPORT WsdlElement
00045 {
00046 public:
00047
00048 WsdlElement(WsdlParser& w);
00049 virtual ~WsdlElement();
00052
00057 std::string getName() const;
00058
00063 const std::string getDocumentation() const;
00064
00073 bool getExtensibilityElements(const std::string & namespc,
00074 std::vector<int>& ids);
00075
00076 bool getExtensibilityAttributes(const std::string & namespc,
00077 std::vector<int>& ids);
00078
00080
00083 void setName(std::string nam);
00084 void addExtElement(int ident);
00085 void addExtAttribute(int ident);
00086 void setDocumentation(std::string* s);
00088
00089 virtual void print(std::ostream & out);
00090 protected:
00091 std::string name_;
00092 int id_;
00093 std::vector<int> extElems_;
00094 std::vector<int> extAttributes_;
00095 std::string * doc_;
00096 protected:
00097 WsdlParser & wParser_;
00098 };
00099
00100 inline
00101 WsdlElement::WsdlElement(WsdlParser & w)
00102 :wParser_(w)
00103 {
00104 doc_=0;
00105 extElems_.clear();
00106 extAttributes_.clear();
00107 }
00108
00109 inline
00110 WsdlElement::~WsdlElement()
00111 {
00112 };
00113
00114 inline
00115 std::string
00116 WsdlElement::getName() const
00117 {
00118 return name_;
00119 }
00120
00121 inline
00122 const std::string
00123 WsdlElement::getDocumentation() const
00124 {
00125 if (doc_)
00126 return *doc_;
00127 else
00128 return std::string ();
00129 }
00130
00131 inline
00132 void
00133 WsdlElement::setName(std::string nam)
00134 {
00135 this->name_ = nam;
00136 }
00137 inline
00138 void
00139 WsdlElement::setDocumentation(std::string* s)
00140 {
00141 doc_=s;
00142 }
00143
00144 inline
00145 void
00146 WsdlElement::addExtElement(int id)
00147 {
00148 extElems_.push_back(id);
00149 }
00150
00151 inline
00152 void
00153 WsdlElement::addExtAttribute(int id)
00154 {
00155 extAttributes_.push_back(id);
00156 }
00157 }
00158 #endif