wsdlpull svntrunk
Loading...
Searching...
No Matches
Attribute.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 */
21#ifndef _ATTRIBUTEH
22#define _ATTRIBUTEH
23#include <string>
25
26namespace Schema {
28{
29 public:
30 Attribute(const std::string & name,
31 int type_id,
32 bool qualified = false,
33 std::string defaultVal = "",
34 std::string fixedVal = "",
35 bool use = false);
36 Attribute(void);
37
38 std::string getName() const;
39 int getType() const;
40 bool isRequired() const;
41 std::string defaultVal()const;
42 std::string fixedVal()const;
43 bool isQualified()const ;
44 Attribute & operator = (const Attribute & a);
45
46 private:
47 std::string attName;
48 std::string dval, fval;
49 int attType;
50 bool bQualified, attUse;
51
52};
53#ifdef LOGGING
54std::ostream & operator << (std::ostream & stream, Attribute & a);
55#endif /* */
56
57inline
58Attribute::Attribute(const std::string & name,
59 int type_id,
60 bool qualified,
61 std::string defaultVal,
62 std::string fixedVal,
63 bool use)
64 :attName(name),
65 dval(defaultVal),
66 fval(fixedVal),
67 attType(type_id),
68 bQualified (qualified),
69 attUse (use)
70{
71}
72
73inline
75 :attType(0),
76 bQualified (false),
77 attUse (false)
78{
79}
80
81inline
82std::string
84{
85 return attName;
86}
87
88inline
89int
91{
92 return attType;
93}
94
95inline
96bool
98{
99 return attUse;
100}
101
102inline
103std::string
105{
106 return dval;
107}
108
109inline
110std::string
112{
113 return fval;
114}
115
116inline
117bool
119{
120 return bQualified;
121}
122
123inline
124Attribute &
126{
127 attName = a.attName;
128 attType = a.attType;
129 bQualified = a.isQualified();
130 dval = a.dval;
131 fval = a.fval;
132 attUse = a.attUse;
133 return *this;
134}
135}
136#endif /* */
int getType() const
Definition Attribute.h:90
std::string defaultVal() const
Definition Attribute.h:104
bool isQualified() const
Definition Attribute.h:118
std::string fixedVal() const
Definition Attribute.h:111
Attribute & operator=(const Attribute &a)
Definition Attribute.h:125
bool isRequired() const
Definition Attribute.h:97
std::string getName() const
Definition Attribute.h:83
std::ostream & operator<<(std::ostream &os, TypeContainer &tc)
#define WSDLPULL_EXPORT