source: NonGTP/Xerces/xerces/include/xercesc/framework/ValidationContext.hpp @ 358

Revision 358, 4.2 KB checked in by bittner, 19 years ago (diff)

xerces added

Line 
1/*
2 * Copyright 1999-2004 The Apache Software Foundation.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17/*
18 * $Log: ValidationContext.hpp,v $
19 * Revision 1.3  2004/09/08 13:55:58  peiyongz
20 * Apache License Version 2.0
21 *
22 * Revision 1.2  2003/11/24 05:10:26  neilg
23 * implement method for determining member type of union that validated some value
24 *
25 * Revision 1.1  2003/11/12 20:28:16  peiyongz
26 * Stateless Grammar: ValidationContext
27 *
28 * $Id: ValidationContext.hpp,v 1.3 2004/09/08 13:55:58 peiyongz Exp $
29 *
30 */
31
32#if !defined(VALIDATION_CONTEXT_HPP)
33#define VALIDATION_CONTEXT_HPP
34
35#include <xercesc/util/PlatformUtils.hpp>
36#include <xercesc/util/RefHashTableOf.hpp>
37#include <xercesc/util/NameIdPool.hpp>
38#include <xercesc/util/XMemory.hpp>
39
40XERCES_CPP_NAMESPACE_BEGIN
41
42class XMLRefInfo;
43class DTDEntityDecl;
44class DatatypeValidator;
45
46class XMLPARSER_EXPORT ValidationContext : public XMemory
47{
48public :
49    // -----------------------------------------------------------------------
50    /** @name Virtual destructor for derived classes */
51    // -----------------------------------------------------------------------
52    //@{
53
54    /**
55      * virtual destructor
56      *
57      */
58    virtual ~ValidationContext(){};
59    //@}
60
61    // -----------------------------------------------------------------------
62    /** @name The ValidationContext Interface */
63    // -----------------------------------------------------------------------
64    //@{
65
66    /**
67      * IDRefList
68      *
69      */
70    virtual RefHashTableOf<XMLRefInfo>*  getIdRefList() const = 0;
71
72    virtual void                         setIdRefList(RefHashTableOf<XMLRefInfo>* const) = 0;
73
74    virtual void                         clearIdRefList() = 0;
75
76    virtual void                         addId(const XMLCh * const ) = 0;
77
78    virtual void                         addIdRef(const XMLCh * const ) = 0;
79
80    virtual void                         toCheckIdRefList(bool) = 0;
81
82    /**
83      * EntityDeclPool
84      *
85      */
86    virtual const NameIdPool<DTDEntityDecl>* getEntityDeclPool() const = 0;
87
88    virtual const NameIdPool<DTDEntityDecl>* setEntityDeclPool(const NameIdPool<DTDEntityDecl>* const) = 0;   
89           
90    virtual void                             checkEntity(const XMLCh * const ) const = 0 ;
91
92    /**
93      * Union datatype handling
94      *
95      */
96
97    virtual DatatypeValidator * getValidatingMemberType() const = 0 ;
98    virtual void setValidatingMemberType(DatatypeValidator * validatingMemberType) = 0 ;
99
100    //@}
101
102   
103protected :
104    // -----------------------------------------------------------------------
105    /**  Hidden Constructors */
106    // -----------------------------------------------------------------------
107    //@{
108    ValidationContext(MemoryManager* const memMgr = XMLPlatformUtils::fgMemoryManager)
109    :fMemoryManager(memMgr)
110    {
111    };
112    //@}
113
114    // -----------------------------------------------------------------------
115    //  Data members
116    //
117    //  fMemoryManager
118    //      Pluggable memory manager for dynamic allocation/deallocation.
119    // -----------------------------------------------------------------------
120    MemoryManager*                    fMemoryManager;
121
122private :
123    // -----------------------------------------------------------------------
124    /** name  Unimplemented copy constructor and operator= */
125    // -----------------------------------------------------------------------
126    //@{
127    ValidationContext(const ValidationContext& );
128    ValidationContext& operator=(const ValidationContext& );
129    //@}
130
131};
132
133XERCES_CPP_NAMESPACE_END
134
135#endif
136
Note: See TracBrowser for help on using the repository browser.