wsdlpull svntrunk
Loading...
Searching...
No Matches
WsdlElement.h
Go to the documentation of this file.
1/*
2 * wsdlpull - A C++ parser for WSDL (Web services description language)
3 * Copyright (C) 2005-2007 Vivek Krishna
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details.
14 *
15 * You should have received a copy of the GNU Library General Public
16 * License along with this library; if not, write to the Free
17 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18 *
19 */
20#ifndef _WSDLELEMENTH
21#define _WSDLELEMENTH
22
23#include <string>
24#include <vector>
25#include "xmlpull/Qname.h"
26#include "xmlpull/XmlUtils.h"
30
31using namespace Schema;
32
33//Implementation of a Wsdl element
34//This is the base class of all wsdl elements
35namespace WsdlPull{
36class WsdlParser;
37
39{
40 public:
41
43 virtual ~WsdlElement();
46
51 std::string getName() const;
52
57 const std::string getDocumentation() const;
58
67 bool getExtensibilityElements(const std::string & namespc,
68 std::vector<int>& ids);
69
70 bool getExtensibilityAttributes(const std::string & namespc,
71 std::vector<int>& ids);
72
74
77 void setName(std::string nam);
78 void addExtElement(int ident);
79 void addExtAttribute(int ident);
80 void setDocumentation(std::string* s);
82
83 virtual void print(std::ostream & out);
84 protected:
85 std::string name_;
86 int id_;
87 std::vector<int> extElems_;
88 std::vector<int> extAttributes_;
89 std::string * doc_;
90 protected:
92};
93
94inline
96 :wParser_(w)
97{
98 doc_=0;
99 extElems_.clear();
100 extAttributes_.clear();
101}
102
103inline
107
108inline
109std::string
111{
112 return name_;
113}
114
115inline
116const std::string
118{
119 if (doc_)
120 return *doc_;
121 else
122 return std::string ();
123}
124
125inline
126void
127WsdlElement::setName(std::string nam)
128{
129 this->name_ = nam;
130}
131inline
132void
134{
135 doc_=s;
136}
137
138inline
139void
141{
142 extElems_.push_back(id);
143}
144
145inline
146void
148{
149 extAttributes_.push_back(id);
150}
151}
152#endif /* */
std::vector< int > extElems_
Definition WsdlElement.h:87
WsdlParser & wParser_
Definition WsdlElement.h:91
void setDocumentation(std::string *s)
const std::string getDocumentation() const
void setName(std::string nam)
std::string getName() const
void addExtElement(int ident)
std::string * doc_
Definition WsdlElement.h:89
WsdlElement(WsdlParser &w)
Definition WsdlElement.h:95
std::vector< int > extAttributes_
Definition WsdlElement.h:88
void addExtAttribute(int ident)
#define WSDLPULL_EXPORT