Xerces-C++ 3.1.3

- Main Page
- Related Pages
- Classes
- Files

- File List
- File Members

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