Xerces-C++ 3.3.0
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$
20 */
21
22#if !defined(XERCESC_INCLUDE_GUARD_PSVIITEM_HPP)
23#define XERCESC_INCLUDE_GUARD_PSVIITEM_HPP
24
26
28
36// forward declarations
37class XSTypeDefinition;
39class XSValue;
40
42{
43public:
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
157
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
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 );
225private:
226
227 // -----------------------------------------------------------------------
228 // Unimplemented constructors and operators
229 // -----------------------------------------------------------------------
230 PSVIItem(const PSVIItem&);
231 PSVIItem & operator=(const PSVIItem &);
232
233
234protected:
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
296
298{
299 return fIsSpecified;
300}
301
306
308
309#endif
#define XMLPARSER_EXPORT
Definition XercesDefs.hpp:163
#define XERCES_CPP_NAMESPACE_BEGIN
Definition XercesDefs.hpp:112
#define XERCES_CPP_NAMESPACE_END
Definition XercesDefs.hpp:113
char16_t XMLCh
Definition Xerces_autoconf_config.hpp:120
Configurable memory manager.
Definition MemoryManager.hpp:40
Definition PSVIItem.hpp:42
XSSimpleTypeDefinition * fMemberType
Definition PSVIItem.hpp:267
ASSESSMENT_TYPE fAssessmentType
Definition PSVIItem.hpp:264
bool fIsSpecified
Definition PSVIItem.hpp:265
const XMLCh * getSchemaNormalizedValue()
A list of error codes generated from validation attempts.
Definition PSVIItem.hpp:277
MemoryManager *const fMemoryManager
Definition PSVIItem.hpp:258
const XMLCh * getCanonicalRepresentation() const
Return the canonical representation of this value.
Definition PSVIItem.hpp:287
void reset(const XMLCh *const validationContext, const XMLCh *const normalizedValue, const VALIDITY_STATE validityState, const ASSESSMENT_TYPE assessmentType)
reset the object
void setValidity(PSVIItem::VALIDITY_STATE validity)
VALIDITY_STATE getValidity() const
Determine the validity of the node with respect to the validation being attempted.
Definition PSVIItem.hpp:292
const XMLCh * getSchemaDefault()
[schema default]
Definition PSVIItem.hpp:282
const XMLCh * fDefaultValue
Definition PSVIItem.hpp:261
ASSESSMENT_TYPE getValidationAttempted() const
Determines the extent to which the item has been validated.
Definition PSVIItem.hpp:302
VALIDITY_STATE
Definition PSVIItem.hpp:45
virtual XSSimpleTypeDefinition * getMemberTypeDefinition()=0
If and only if that type definition is a simple type definition with {variety} union,...
const XMLCh * fValidationContext
Definition PSVIItem.hpp:259
virtual XSValue * getActualValue() const
Get actual value in the form of XSValue, caller needs to delete the object returned.
bool getIsSchemaSpecified() const
[schema specified]
Definition PSVIItem.hpp:297
VALIDITY_STATE fValidityState
Definition PSVIItem.hpp:263
const XMLCh * fNormalizedValue
Definition PSVIItem.hpp:260
const XMLCh * getValidationContext()
[validation context]
Definition PSVIItem.hpp:272
void setValidationAttempted(PSVIItem::ASSESSMENT_TYPE attemptType)
methods needed by implementation
PSVIItem(MemoryManager *const manager=XMLPlatformUtils::fgMemoryManager)
The default constructor.
XSTypeDefinition * fType
Definition PSVIItem.hpp:266
virtual ~PSVIItem()
Definition PSVIItem.hpp:270
ASSESSMENT_TYPE
Definition PSVIItem.hpp:65
virtual XSTypeDefinition * getTypeDefinition()=0
An item isomorphic to the type definition used to validate this element.
XMLCh * fCanonicalValue
Definition PSVIItem.hpp:262
static MemoryManager * fgMemoryManager
The configurable memory manager.
Definition PlatformUtils.hpp:121
This class makes it possible to override the C++ memory management by adding new/delete operators to ...
Definition XMemory.hpp:41
Definition XSSimpleTypeDefinition.hpp:44
This class represents a complexType or simpleType definition.
Definition XSTypeDefinition.hpp:40
Definition XSValue.hpp:33