wsdlpull
1.23
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
src
wsdlparser
WsdlElement.cpp
Go to the documentation of this file.
1
/*
2
* wsdlpull - A C++ parser for WSDL (Web services description
3
* language) 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
#include "
wsdlparser/WsdlElement.h
"
21
#include "
wsdlparser/WsdlParser.h
"
22
23
namespace
WsdlPull {
24
void
25
WsdlElement::print
(std::ostream & out)
26
{
27
size_t
i;
28
out <<
extElems_
.size() <<
XmlUtils::dbsp
<<
XmlUtils::dbsp
;
29
for
(i = 0; i <
extElems_
.size(); i++)
30
out <<
extElems_
[i] << XmlUtils::dbsp;
31
out << std::endl;
32
out <<
extAttributes_
.size() << XmlUtils::dbsp <<
XmlUtils::dbsp
;
33
for
(i = 0; i <
extAttributes_
.size(); i++)
34
out <<
extAttributes_
[i] << XmlUtils::dbsp;
35
}
36
37
38
bool
39
WsdlElement::getExtensibilityElements
(
const
std::string & namespc,
40
std::vector<int>& ids)
41
{
42
WsdlExtension
* we =
wParser_
.
getExtensibilityHandler
(namespc);
43
if
(we == 0)
44
return
false
;
45
bool
ret =
false
;
46
for
(
size_t
i = 0 ;i<
extElems_
.size();i++){
47
48
if
(we->
getElementName
(
extElems_
[i])!=0){
49
ids.push_back(
extElems_
[i]);
50
ret =
true
;
51
}
52
}
53
return
ret;
54
}
55
56
57
bool
58
WsdlElement::getExtensibilityAttributes
(
const
std::string & namespc,
59
std::vector<int>& ids)
60
{
61
WsdlExtension
* we =
wParser_
.
getExtensibilityHandler
(namespc);
62
if
(we == 0)
63
return
false
;
64
bool
ret =
false
;
65
for
(
size_t
i = 0 ;i<
extAttributes_
.size();i++){
66
67
if
(we->
getAttributeName
(
extAttributes_
[i])!=0){
68
ids.push_back(
extAttributes_
[i]);
69
ret =
true
;
70
}
71
}
72
return
ret;
73
}
74
}
Generated by
1.8.4