Xerces-C++  3.1.2
PSVIItem.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: PSVIItem.hpp 932887 2010-04-11 13:04:59Z borisk $
20  */
21 
22 #if !defined(XERCESC_INCLUDE_GUARD_PSVIITEM_HPP)
23 #define XERCESC_INCLUDE_GUARD_PSVIITEM_HPP
24 
26 
28 
36 // forward declarations
37 class XSTypeDefinition;
39 class XSValue;
40 
42 {
43 public:
44 
50  VALIDITY_NOTKNOWN = 0,
51 
56  VALIDITY_INVALID = 1,
57 
62  VALIDITY_VALID = 2
63  };
64 
69  VALIDATION_NONE = 0,
70 
74  VALIDATION_PARTIAL = 1,
75 
78  VALIDATION_FULL = 2
79  };
80 
81  // Constructors and Destructor
82  // -----------------------------------------------------------------------
85 
92 
94 
97  virtual ~PSVIItem();
99 
100  //---------------------
104 
114  const XMLCh *getValidationContext();
115 
123  VALIDITY_STATE getValidity() const;
124 
131  ASSESSMENT_TYPE getValidationAttempted() const;
132 
139  /***
140  const XMLCh ** getErrorCodes();
141  ****/
142 
149  const XMLCh *getSchemaNormalizedValue();
150 
156  virtual XSTypeDefinition *getTypeDefinition() = 0;
157 
167  virtual XSSimpleTypeDefinition *getMemberTypeDefinition() = 0;
168 
175  const XMLCh *getSchemaDefault();
176 
182  bool getIsSchemaSpecified() const;
183 
191  const XMLCh *getCanonicalRepresentation() const;
192 
194 
202  virtual XSValue *getActualValue() const;
203 
204  //----------------------------------
208 
209  void setValidationAttempted(PSVIItem::ASSESSMENT_TYPE attemptType);
210  void setValidity(PSVIItem::VALIDITY_STATE validity);
211 
218  void reset(
219  const XMLCh* const validationContext
220  , const XMLCh* const normalizedValue
221  , const VALIDITY_STATE validityState
222  , const ASSESSMENT_TYPE assessmentType
223  );
225 private:
226 
227  // -----------------------------------------------------------------------
228  // Unimplemented constructors and operators
229  // -----------------------------------------------------------------------
230  PSVIItem(const PSVIItem&);
231  PSVIItem & operator=(const PSVIItem &);
232 
233 
234 protected:
235  // -----------------------------------------------------------------------
236  // data members
237  // -----------------------------------------------------------------------
238  // fMemoryManager:
239  // used for any memory allocations
240  // fValidationContext
241  // corresponds to the schema [validation context] property
242  // fNormalizedValue
243  // The schema normalized value (when present)
244  // fDefaultValue
245  // default value specified in the schema, if any
246  // fCanonicalValue
247  // canonicalized version of normalizedValue
248  // fValidityState
249  // Whether this item is valid or not
250  // fAssessmentType
251  // The kind of assessment that produced the given validity outcome
252  // fIsSpecified
253  // Whether this item exists because a default was specified in the schema
254  // fType
255  // type responsible for validating this item
256  // fMemberType
257  // If fType is a union type, the member type that validated this item
268 };
269 
271 
273 {
274  return fValidationContext;
275 }
276 
278 {
279  return fNormalizedValue;
280 }
281 
283 {
284  return fDefaultValue;
285 }
286 
288 {
289  return fCanonicalValue;
290 }
291 
293 {
294  return fValidityState;
295 }
296 
298 {
299  return fIsSpecified;
300 }
301 
303 {
304  return fAssessmentType;
305 }
306 
308 
309 #endif
ASSESSMENT_TYPE fAssessmentType
Definition: PSVIItem.hpp:264
This class makes it possible to override the C++ memory management by adding new/delete operators to ...
Definition: XMemory.hpp:40
MemoryManager *const fMemoryManager
Definition: PSVIItem.hpp:258
static MemoryManager * fgMemoryManager
The configurable memory manager.
Definition: PlatformUtils.hpp:121
VALIDITY_STATE fValidityState
Definition: PSVIItem.hpp:263
XSSimpleTypeDefinition * fMemberType
Definition: PSVIItem.hpp:267
XSTypeDefinition * fType
Definition: PSVIItem.hpp:266
virtual ~PSVIItem()
Definition: PSVIItem.hpp:270
XMLCh * fCanonicalValue
Definition: PSVIItem.hpp:262
const XMLCh * fValidationContext
Definition: PSVIItem.hpp:259
Definition: XSValue.hpp:32
#define XMLPARSER_EXPORT
Definition: XercesDefs.hpp:163
VALIDITY_STATE getValidity() const
Determine the validity of the node with respect to the validation being attempted.
Definition: PSVIItem.hpp:292
const XMLCh * getSchemaNormalizedValue()
A list of error codes generated from validation attempts.
Definition: PSVIItem.hpp:277
bool fIsSpecified
Definition: PSVIItem.hpp:265
const XMLCh * fDefaultValue
Definition: PSVIItem.hpp:261
VALIDITY_STATE
Definition: PSVIItem.hpp:45
bool getIsSchemaSpecified() const
[schema specified]
Definition: PSVIItem.hpp:297
Configurable memory manager.
Definition: MemoryManager.hpp:39
const XMLCh * fNormalizedValue
Definition: PSVIItem.hpp:260
Definition: XSSimpleTypeDefinition.hpp:43
Definition: PSVIItem.hpp:41
const XMLCh * getCanonicalRepresentation() const
Return the canonical representation of this value.
Definition: PSVIItem.hpp:287
#define XERCES_CPP_NAMESPACE_BEGIN
Definition: XercesDefs.hpp:112
wchar_t XMLCh
Definition: Xerces_autoconf_config.borland.hpp:92
ASSESSMENT_TYPE getValidationAttempted() const
Determines the extent to which the item has been validated.
Definition: PSVIItem.hpp:302
#define XERCES_CPP_NAMESPACE_END
Definition: XercesDefs.hpp:113
const XMLCh * getSchemaDefault()
[schema default]
Definition: PSVIItem.hpp:282
const XMLCh * getValidationContext()
[validation context]
Definition: PSVIItem.hpp:272
ASSESSMENT_TYPE
Definition: PSVIItem.hpp:65
This class represents a complexType or simpleType definition.
Definition: XSTypeDefinition.hpp:39