wsdlpull 1.23
Loading...
Searching...
No Matches
Group.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 GROUP_H
22#define GROUP_H
23// *********************************************************************
24// Include files:
25// *********************************************************************
26#include <string>
28#include "schemaparser/Schema.h"
30
31namespace Schema {
32
34{
35 public:
36 Group();
37 ~Group();
38 Group(const Group & g);
39 Group(const std::string & name,
40 int minimum,
41 int maximum);
42 int getMin()const;
43 void setMin(int m);
44
45 int getMax() const;
46 void setMax(int m);
47
48 std::string getName()const;
49 void setName(const std::string & n);
50
51 void setAnnotation(const std::string & s);
52 ContentModel * getContents()const;
53 void setContents(const ContentModel* cm,bool isRef=false);
54 private:
55 int maxOccurs_;
56 int minOccurs_;
57 std::string name_;
58 std::string annotation_;
59 ContentModel * cm_;
60 bool ref_;
61};
62
63
64inline
65std::string
67{
68 return name_;
69}
70
71inline
72void
73Group::setName(const std::string &n)
74{
75 name_=n;
76}
77
78inline
79void
80Group::setAnnotation(const std::string &s)
81{
82 annotation_=s;
83}
84
85inline
86int
88{
89 return maxOccurs_;
90}
91
92inline
93int
95{
96 return minOccurs_;
97}
98
99inline
100void
102{
103 minOccurs_=m;
104
105}
106
107inline
108void
110{
111 maxOccurs_=m;
112
113}
114
115inline
118{
119 return cm_;
120
121}
122
123inline
124void
125Group::setContents(const ContentModel* cm,bool setRef)
126{
127 cm_=const_cast<ContentModel*> (cm);
128 ref_=setRef;
129}
130
131}
132#endif // GROUP_H
void setMax(int m)
Definition: Group.h:109
std::string getName() const
Definition: Group.h:66
void setAnnotation(const std::string &s)
Definition: Group.h:80
void setContents(const ContentModel *cm, bool isRef=false)
Definition: Group.h:125
void setMin(int m)
Definition: Group.h:101
ContentModel * getContents() const
Definition: Group.h:117
int getMax() const
Definition: Group.h:87
int getMin() const
Definition: Group.h:94
void setName(const std::string &n)
Definition: Group.h:73
#define WSDLPULL_EXPORT