Xerces-C++  3.1.2
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 
26 
28 
36 // forward declarations
38 
40 {
41 public:
42 
43  // Constructors and Destructor
44  // -----------------------------------------------------------------------
47 
55  (
56  XSAttributeDeclaration* const xsAttDecl,
57  XSModel* const xsModel,
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  // -----------------------------------------------------------------------
121  XSAttributeUse & operator=(const XSAttributeUse &);
122 
123 protected:
124 
125  // -----------------------------------------------------------------------
126  // data members
127  // -----------------------------------------------------------------------
128  bool fRequired;
132 };
133 
135 {
137 }
138 
139 inline bool XSAttributeUse::getRequired() const
140 {
141  return fRequired;
142 }
143 
145 {
146  return fConstraintType;
147 }
148 
150 {
151  return fConstraintValue;
152 }
153 
155 
156 #endif
Definition: XSAttributeUse.hpp:39
static MemoryManager * fgMemoryManager
The configurable memory manager.
Definition: PlatformUtils.hpp:121
const XMLCh * getConstraintValue()
Value Constraint: The actual value.
Definition: XSAttributeUse.hpp:149
const XMLCh * fConstraintValue
Definition: XSAttributeUse.hpp:130
XSConstants::VALUE_CONSTRAINT fConstraintType
Definition: XSAttributeUse.hpp:129
#define XMLPARSER_EXPORT
Definition: XercesDefs.hpp:163
Definition: XSModel.hpp:59
Configurable memory manager.
Definition: MemoryManager.hpp:39
#define XERCES_CPP_NAMESPACE_BEGIN
Definition: XercesDefs.hpp:112
wchar_t XMLCh
Definition: Xerces_autoconf_config.borland.hpp:92
XSAttributeDeclaration * getAttrDeclaration() const
[attribute declaration]: provides the attribute declaration itself, which will in turn determine the ...
Definition: XSAttributeUse.hpp:134
Definition: XSObject.hpp:42
#define XERCES_CPP_NAMESPACE_END
Definition: XercesDefs.hpp:113
XSConstants::VALUE_CONSTRAINT getConstraintType() const
Value Constraint: one of default, fixed.
Definition: XSAttributeUse.hpp:144
bool getRequired() const
[required]: determines whether this use of an attribute declaration requires an appropriate attribute...
Definition: XSAttributeUse.hpp:139
VALUE_CONSTRAINT
Definition: XSConstants.hpp:172
Definition: XSAttributeDeclaration.hpp:42
bool fRequired
Definition: XSAttributeUse.hpp:128
XSAttributeDeclaration * fXSAttributeDeclaration
Definition: XSAttributeUse.hpp:131