wsdlpull svntrunk
Loading...
Searching...
No Matches
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
22
23namespace WsdlPull {
24void
25WsdlElement::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;
33 for (i = 0; i < extAttributes_.size(); i++)
34 out << extAttributes_[i] << XmlUtils::dbsp;
35}
36
37
38bool
39WsdlElement::getExtensibilityElements(const std::string & namespc,
40 std::vector<int>& ids)
41{
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
57bool
58WsdlElement::getExtensibilityAttributes(const std::string & namespc,
59 std::vector<int>& ids)
60{
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}
bool getExtensibilityAttributes(const std::string &namespc, std::vector< int > &ids)
virtual void print(std::ostream &out)
std::vector< int > extElems_
Definition WsdlElement.h:87
WsdlParser & wParser_
Definition WsdlElement.h:91
bool getExtensibilityElements(const std::string &namespc, std::vector< int > &ids)
std::vector< int > extAttributes_
Definition WsdlElement.h:88
virtual int getElementName(int id) const =0
virtual int getAttributeName(int id) const =0
WsdlExtension * getExtensibilityHandler(const std::string &ns)
std::ostream & dbsp(std::ostream &str)
Definition XmlUtils.cpp:103