Xerces-C++ 3.2.2

ValidationContext.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: ValidationContext.hpp 729944 2008-12-29 17:03:32Z amassari $
20 */
21
22 #if !defined(XERCESC_INCLUDE_GUARD_VALIDATION_CONTEXT_HPP)
23 #define XERCESC_INCLUDE_GUARD_VALIDATION_CONTEXT_HPP
24
25 #include <xercesc/util/PlatformUtils.hpp>
26 #include <xercesc/util/RefHashTableOf.hpp>
27 #include <xercesc/util/NameIdPool.hpp>
28 #include <xercesc/util/XMemory.hpp>
29
30 XERCES_CPP_NAMESPACE_BEGIN
31
32 class XMLRefInfo;
33 class DTDEntityDecl;
34 class DatatypeValidator;
35 class ElemStack;
36 class NamespaceScope;
37 class XMLScanner;
38
39 class XMLPARSER_EXPORT ValidationContext : public XMemory
40 {
41 public :
42 // -----------------------------------------------------------------------
44 // -----------------------------------------------------------------------
46
51 virtual ~ValidationContext(){};
53
54 // -----------------------------------------------------------------------
56 // -----------------------------------------------------------------------
58
63 virtual RefHashTableOf<XMLRefInfo>* getIdRefList() const = 0;
64
65 virtual void setIdRefList(RefHashTableOf<XMLRefInfo>* const) = 0;
66
67 virtual void clearIdRefList() = 0;
68
69 virtual void addId(const XMLCh * const ) = 0;
70
71 virtual void addIdRef(const XMLCh * const ) = 0;
72
73 virtual void toCheckIdRefList(bool) = 0;
74
79 virtual const NameIdPool<DTDEntityDecl>* getEntityDeclPool() const = 0;
80
81 virtual const NameIdPool<DTDEntityDecl>* setEntityDeclPool(const NameIdPool<DTDEntityDecl>* const) = 0;
82
83 virtual void checkEntity(const XMLCh * const ) const = 0 ;
84
90 virtual DatatypeValidator * getValidatingMemberType() const = 0 ;
91 virtual void setValidatingMemberType(DatatypeValidator * validatingMemberType) = 0 ;
92
97 virtual bool isPrefixUnknown(XMLCh* /* prefix */) { return true; };
98 virtual void setElemStack(ElemStack* /* elemStack */) {};
99 virtual const XMLCh* getURIForPrefix(XMLCh* /*prefix */) { return 0; };
100 virtual void setScanner(XMLScanner* /* scanner */) { };
101 virtual void setNamespaceScope(NamespaceScope* /* nsStack */) { };
102
104
105
106 protected :
107 // -----------------------------------------------------------------------
109 // -----------------------------------------------------------------------
111 ValidationContext(MemoryManager* const memMgr = XMLPlatformUtils::fgMemoryManager)
112 :fMemoryManager(memMgr)
113 {
114 };
116
117 // -----------------------------------------------------------------------
118 // Data members
119 //
120 // fMemoryManager
121 // Pluggable memory manager for dynamic allocation/deallocation.
122 // -----------------------------------------------------------------------
123 MemoryManager* fMemoryManager;
124
125 private :
126 // -----------------------------------------------------------------------
128 // -----------------------------------------------------------------------
130 ValidationContext(const ValidationContext& );
131 ValidationContext& operator=(const ValidationContext& );
133
134 };
135
136 XERCES_CPP_NAMESPACE_END
137
138 #endif
139
XMemory
This class makes it possible to override the C++ memory management by adding new/delete operators to ...
Definition: XMemory.hpp:40
ValidationContext::~ValidationContext
virtual ~ValidationContext()
virtual destructor
Definition: ValidationContext.hpp:51
XMLPlatformUtils::fgMemoryManager
static MemoryManager * fgMemoryManager
The configurable memory manager.
Definition: PlatformUtils.hpp:121
ValidationContext::setScanner
virtual void setScanner(XMLScanner *)
Definition: ValidationContext.hpp:100
ValidationContext::fMemoryManager
MemoryManager * fMemoryManager
Definition: ValidationContext.hpp:114
ValidationContext::setNamespaceScope
virtual void setNamespaceScope(NamespaceScope *)
Definition: ValidationContext.hpp:101
XMLPARSER_EXPORT
#define XMLPARSER_EXPORT
Definition: XercesDefs.hpp:163
ValidationContext::getURIForPrefix
virtual const XMLCh * getURIForPrefix(XMLCh *)
Definition: ValidationContext.hpp:99
ValidationContext
Definition: ValidationContext.hpp:39
PlatformUtils.hpp
MemoryManager
Configurable memory manager.
Definition: MemoryManager.hpp:39
XMLCh
uint16_t XMLCh
Definition: Xerces_autoconf_config.hpp:120
XERCES_CPP_NAMESPACE_BEGIN
#define XERCES_CPP_NAMESPACE_BEGIN
Definition: XercesDefs.hpp:112
ValidationContext::isPrefixUnknown
virtual bool isPrefixUnknown(XMLCh *)
QName datatype handling Create default implementations for source code compatibility.
Definition: ValidationContext.hpp:97
ValidationContext::ValidationContext
ValidationContext(MemoryManager *const memMgr=XMLPlatformUtils::fgMemoryManager)
Hidden Constructors.
Definition: ValidationContext.hpp:111
ValidationContext::setElemStack
virtual void setElemStack(ElemStack *)
Definition: ValidationContext.hpp:98
XERCES_CPP_NAMESPACE_END
#define XERCES_CPP_NAMESPACE_END
Definition: XercesDefs.hpp:113
XMemory.hpp