Xerces-C++: XSAttributeUse.hpp Source File

Xerces-C++ 3.2.0

XSAttributeUse.hpp
Go to the documentation of this file.
1 /*
2 * Licensed to the Apache Software Foundation (ASF) under one or more
3 * contributor license agreements. See the NOTICE file distributed with
4 * this work for additional information regarding copyright ownership.
5 * The ASF licenses this file to You under the Apache License, Version 2.0
6 * (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17
18 /*
19 * $Id: XSAttributeUse.hpp 527149 2007-04-10 14:56:39Z amassari $
20 */
21
22 #if !defined(XERCESC_INCLUDE_GUARD_XSATTRIBUTEUSE_HPP)
23 #define XERCESC_INCLUDE_GUARD_XSATTRIBUTEUSE_HPP
24
25 #include <xercesc/framework/psvi/XSObject.hpp>
26
27 XERCES_CPP_NAMESPACE_BEGIN
28
36 // forward declarations
37 class XSAttributeDeclaration;
38
39 class XMLPARSER_EXPORT XSAttributeUse : public XSObject
40 {
41 public:
42
43 // Constructors and Destructor
44 // -----------------------------------------------------------------------
47
54 XSAttributeUse
55 (
56 XSAttributeDeclaration* const xsAttDecl,
57 XSModel* const xsModel,
58 MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager
59 );
60
62
65 ~XSAttributeUse();
67
68 //---------------------
72
78 bool getRequired() const;
79
84 XSAttributeDeclaration *getAttrDeclaration() const;
85
89 XSConstants::VALUE_CONSTRAINT getConstraintType() const;
90
94 const XMLCh *getConstraintValue();
95
97
98 //----------------------------------
102
104
105 private:
106
107 // set data
108 void set
109 (
110 const bool isRequired
111 , XSConstants::VALUE_CONSTRAINT constraintType
112 , const XMLCh* const constraintValue
113 );
114
115 friend class XSObjectFactory;
116
117 // -----------------------------------------------------------------------
118 // Unimplemented constructors and operators
119 // -----------------------------------------------------------------------
120 XSAttributeUse(const XSAttributeUse&);
121 XSAttributeUse & operator=(const XSAttributeUse &);
122
123 protected:
124
125 // -----------------------------------------------------------------------
126 // data members
127 // -----------------------------------------------------------------------
128 bool fRequired;
129 XSConstants::VALUE_CONSTRAINT fConstraintType;
130 const XMLCh* fConstraintValue;
131 XSAttributeDeclaration* fXSAttributeDeclaration;
132 };
133
134 inline XSAttributeDeclaration *XSAttributeUse::getAttrDeclaration() const
135 {
136 return fXSAttributeDeclaration;
137 }
138
139 inline bool XSAttributeUse::getRequired() const
140 {
141 return fRequired;
142 }
143
144 inline XSConstants::VALUE_CONSTRAINT XSAttributeUse::getConstraintType() const
145 {
146 return fConstraintType;
147 }
148
149 inline const XMLCh *XSAttributeUse::getConstraintValue()
150 {
151 return fConstraintValue;
152 }
153
154 XERCES_CPP_NAMESPACE_END
155
156 #endif
XSAttributeUse
Definition: XSAttributeUse.hpp:39
XMLPlatformUtils::fgMemoryManager
static MemoryManager * fgMemoryManager
The configurable memory manager.
Definition: PlatformUtils.hpp:121
XSAttributeUse::getConstraintValue
const XMLCh * getConstraintValue()
Value Constraint: The actual value.
Definition: XSAttributeUse.hpp:149
XSAttributeUse::fConstraintValue
const XMLCh * fConstraintValue
Definition: XSAttributeUse.hpp:130
XSAttributeUse::fConstraintType
XSConstants::VALUE_CONSTRAINT fConstraintType
Definition: XSAttributeUse.hpp:129
XMLPARSER_EXPORT
#define XMLPARSER_EXPORT
Definition: XercesDefs.hpp:163
XSModel
Definition: XSModel.hpp:59
MemoryManager
Configurable memory manager.
Definition: MemoryManager.hpp:39
XMLCh
uint16_t XMLCh
Definition: Xerces_autoconf_config.hpp:118
XERCES_CPP_NAMESPACE_BEGIN
#define XERCES_CPP_NAMESPACE_BEGIN
Definition: XercesDefs.hpp:112
XSObject
Definition: XSObject.hpp:42
XERCES_CPP_NAMESPACE_END
#define XERCES_CPP_NAMESPACE_END
Definition: XercesDefs.hpp:113
XSAttributeUse::getConstraintType
XSConstants::VALUE_CONSTRAINT getConstraintType() const
Value Constraint: one of default, fixed.
Definition: XSAttributeUse.hpp:144
XSObject.hpp
XSAttributeUse::getAttrDeclaration
XSAttributeDeclaration * getAttrDeclaration() const
[attribute declaration]: provides the attribute declaration itself, which will in turn determine the ...
Definition: XSAttributeUse.hpp:134
XSAttributeUse::getRequired
bool getRequired() const
[required]: determines whether this use of an attribute declaration requires an appropriate attribute...
Definition: XSAttributeUse.hpp:139
XSConstants::VALUE_CONSTRAINT
VALUE_CONSTRAINT
Definition: XSConstants.hpp:172
XSAttributeDeclaration
Definition: XSAttributeDeclaration.hpp:42
XSAttributeUse::fRequired
bool fRequired
Definition: XSAttributeUse.hpp:128
XSAttributeUse::fXSAttributeDeclaration
XSAttributeDeclaration * fXSAttributeDeclaration
Definition: XSAttributeUse.hpp:131