wsdlpull
1.23
Toggle main menu visibility
Loading...
Searching...
No Matches
src
wsdlparser
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
"
27
#include "
schemaparser/Element.h
"
28
#include "
wsdlparser/WsdlException.h
"
29
#include "
xmlpull/wsdlpull_export.h
"
30
31
using namespace
Schema
;
32
33
//Implementation of a Wsdl element
34
//This is the base class of all wsdl elements
35
namespace
WsdlPull
{
36
class
WsdlParser
;
37
38
class
WSDLPULL_EXPORT
WsdlElement
39
{
40
public
:
41
42
WsdlElement
(
WsdlParser
& w);
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
:
91
WsdlParser
&
wParser_
;
92
};
93
94
inline
95
WsdlElement::WsdlElement
(
WsdlParser
& w)
96
:
wParser_
(w)
97
{
98
doc_
=0;
99
extElems_
.clear();
100
extAttributes_
.clear();
101
}
102
103
inline
104
WsdlElement::~WsdlElement
()
105
{
106
}
107
108
inline
109
std::string
110
WsdlElement::getName
()
const
111
{
112
return
name_
;
113
}
114
115
inline
116
const
std::string
117
WsdlElement::getDocumentation
()
const
118
{
119
if
(
doc_
)
120
return
*
doc_
;
121
else
122
return
std::string ();
123
}
124
125
inline
126
void
127
WsdlElement::setName
(std::string nam)
128
{
129
this->
name_
= nam;
130
}
131
inline
132
void
133
WsdlElement::setDocumentation
(std::string* s)
134
{
135
doc_
=s;
136
}
137
138
inline
139
void
140
WsdlElement::addExtElement
(
int
id
)
141
{
142
extElems_
.push_back(
id
);
143
}
144
145
inline
146
void
147
WsdlElement::addExtAttribute
(
int
id
)
148
{
149
extAttributes_
.push_back(
id
);
150
}
151
}
152
#endif
/* */
Element.h
Qname.h
WsdlException.h
XmlUtils.h
WsdlPull::WsdlElement::getExtensibilityAttributes
bool getExtensibilityAttributes(const std::string &namespc, std::vector< int > &ids)
Definition
WsdlElement.cpp:58
WsdlPull::WsdlElement::print
virtual void print(std::ostream &out)
Definition
WsdlElement.cpp:25
WsdlPull::WsdlElement::extElems_
std::vector< int > extElems_
Definition
WsdlElement.h:87
WsdlPull::WsdlElement::wParser_
WsdlParser & wParser_
Definition
WsdlElement.h:91
WsdlPull::WsdlElement::setDocumentation
void setDocumentation(std::string *s)
Definition
WsdlElement.h:133
WsdlPull::WsdlElement::getDocumentation
const std::string getDocumentation() const
Definition
WsdlElement.h:117
WsdlPull::WsdlElement::setName
void setName(std::string nam)
Definition
WsdlElement.h:127
WsdlPull::WsdlElement::getName
std::string getName() const
Definition
WsdlElement.h:110
WsdlPull::WsdlElement::~WsdlElement
virtual ~WsdlElement()
Definition
WsdlElement.h:104
WsdlPull::WsdlElement::addExtElement
void addExtElement(int ident)
Definition
WsdlElement.h:140
WsdlPull::WsdlElement::getExtensibilityElements
bool getExtensibilityElements(const std::string &namespc, std::vector< int > &ids)
Definition
WsdlElement.cpp:39
WsdlPull::WsdlElement::doc_
std::string * doc_
Definition
WsdlElement.h:89
WsdlPull::WsdlElement::id_
int id_
Definition
WsdlElement.h:86
WsdlPull::WsdlElement::WsdlElement
WsdlElement(WsdlParser &w)
Definition
WsdlElement.h:95
WsdlPull::WsdlElement::extAttributes_
std::vector< int > extAttributes_
Definition
WsdlElement.h:88
WsdlPull::WsdlElement::addExtAttribute
void addExtAttribute(int ident)
Definition
WsdlElement.h:147
WsdlPull::WsdlElement::name_
std::string name_
Definition
WsdlElement.h:85
WsdlPull::WsdlParser
Definition
WsdlParser.h:44
Schema
Definition
Annotation.h:27
WsdlPull
Definition
Binding.h:27
wsdlpull_export.h
WSDLPULL_EXPORT
#define WSDLPULL_EXPORT
Definition
wsdlpull_export.h:30
Generated by
1.17.0