wsdlpull
1.23
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
src
schemaparser
Constraint.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 CONSTRAINT_H
22
#define CONSTRAINT_H
23
// *********************************************************************
24
// Include files:
25
// *********************************************************************
26
#include <string>
27
#include <list>
28
#include "
xmlpull/wsdlpull_export.h
"
29
#include "
schemaparser/Schema.h
"
30
#include "
schemaparser/Annotation.h
"
// Proposed upgrade
31
32
namespace
Schema {
33
class
WSDLPULL_EXPORT
Constraint
34
{
35
public
:
36
Constraint
(
Schema::ConstraintType
c);
37
38
std::string getName()
const
;
39
void
setName(
const
std::string & n);
40
virtual
Schema::ConstraintType
getConstraintType();
41
void
setSelector(
const
std::string & xpath);
42
void
addField(
const
std::string &xpath);
43
std::string selector()
const
;
44
const
std::list<std::string>& fields();
45
virtual
~
Constraint
();
46
void
setAnnotation(
const
std::string & s);
47
48
private
:
49
Schema::ConstraintType
m_constraints;
50
std::string m_name,m_annotation;
51
std::string m_selector;
52
std::list<std::string> m_fields;
53
};
54
55
inline
56
Constraint::Constraint
(
Schema::ConstraintType
c)
57
:m_constraints(c)
58
{
59
m_fields.clear();
60
}
61
62
inline
63
void
64
Constraint::setSelector
(
const
std::string & xpath)
65
{
66
m_selector=xpath;
67
}
68
69
inline
70
std::string
71
Constraint::selector
()
const
72
{
73
return
m_selector;
74
}
75
76
inline
77
const
std::list<std::string>&
78
Constraint::fields
()
79
{
80
return
m_fields;
81
}
82
83
inline
84
void
85
Constraint::addField
(
const
std::string & xpath)
86
{
87
m_fields.push_back(xpath);
88
}
89
90
inline
91
std::string
92
Constraint::getName
()
const
93
{
94
return
m_name;
95
}
96
97
inline
98
void
99
Constraint::setName
(
const
std::string &n)
100
{
101
m_name=n;
102
}
103
104
inline
105
void
106
Constraint::setAnnotation
(
const
std::string &s)
107
{
108
m_annotation=s;
109
}
110
111
inline
112
Constraint::~Constraint
()
113
{
114
}
115
116
inline
117
Schema::ConstraintType
118
Constraint::getConstraintType
()
119
{
120
return
Schema::NoConstraint
;
121
}
122
123
}
124
#endif // GROUP_H
Generated by
1.8.1.2