Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:14:52

0001 /*
0002  * Licensed to the Apache Software Foundation (ASF) under one or more
0003  * contributor license agreements.  See the NOTICE file distributed with
0004  * this work for additional information regarding copyright ownership.
0005  * The ASF licenses this file to You under the Apache License, Version 2.0
0006  * (the "License"); you may not use this file except in compliance with
0007  * the License.  You may obtain a copy of the License at
0008  * 
0009  *      http://www.apache.org/licenses/LICENSE-2.0
0010  * 
0011  * Unless required by applicable law or agreed to in writing, software
0012  * distributed under the License is distributed on an "AS IS" BASIS,
0013  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
0014  * See the License for the specific language governing permissions and
0015  * limitations under the License.
0016  */
0017 
0018 /*
0019  * $Id$
0020  */
0021 
0022 #if !defined(XERCESC_INCLUDE_GUARD_VALIDATION_CONTEXT_HPP)
0023 #define XERCESC_INCLUDE_GUARD_VALIDATION_CONTEXT_HPP
0024 
0025 #include <xercesc/util/PlatformUtils.hpp>
0026 #include <xercesc/util/RefHashTableOf.hpp>
0027 #include <xercesc/util/NameIdPool.hpp>
0028 #include <xercesc/util/XMemory.hpp>
0029 
0030 XERCES_CPP_NAMESPACE_BEGIN
0031 
0032 class XMLRefInfo;
0033 class DTDEntityDecl;
0034 class DatatypeValidator;
0035 class ElemStack;
0036 class NamespaceScope;
0037 class XMLScanner;
0038 
0039 class XMLPARSER_EXPORT ValidationContext : public XMemory
0040 {
0041 public :
0042     // -----------------------------------------------------------------------
0043     /** @name Virtual destructor for derived classes */
0044     // -----------------------------------------------------------------------
0045     //@{
0046 
0047     /**
0048       * virtual destructor
0049       *
0050       */
0051     virtual ~ValidationContext(){};
0052     //@}
0053 
0054     // -----------------------------------------------------------------------
0055     /** @name The ValidationContext Interface */
0056     // -----------------------------------------------------------------------
0057     //@{
0058 
0059     /**
0060       * IDRefList
0061       *
0062       */
0063     virtual RefHashTableOf<XMLRefInfo>*  getIdRefList() const = 0;
0064 
0065     virtual void                         setIdRefList(RefHashTableOf<XMLRefInfo>* const) = 0;
0066 
0067     virtual void                         clearIdRefList() = 0;
0068 
0069     virtual void                         addId(const XMLCh * const ) = 0;
0070 
0071     virtual void                         addIdRef(const XMLCh * const ) = 0;
0072 
0073     virtual void                         toCheckIdRefList(bool) = 0;
0074 
0075     /**
0076       * EntityDeclPool
0077       *
0078       */
0079     virtual const NameIdPool<DTDEntityDecl>* getEntityDeclPool() const = 0;
0080 
0081     virtual const NameIdPool<DTDEntityDecl>* setEntityDeclPool(const NameIdPool<DTDEntityDecl>* const) = 0;    
0082            
0083     virtual void                             checkEntity(const XMLCh * const ) const = 0 ;
0084 
0085     /**
0086       * Union datatype handling
0087       *
0088       */
0089 
0090     virtual DatatypeValidator * getValidatingMemberType() const = 0 ;
0091     virtual void setValidatingMemberType(DatatypeValidator * validatingMemberType) = 0 ;
0092 
0093     /**
0094       * QName datatype handling
0095       * Create default implementations for source code compatibility
0096       */
0097     virtual bool isPrefixUnknown(XMLCh* /* prefix */) { return true; };
0098     virtual void setElemStack(ElemStack* /* elemStack */) {};
0099     virtual const XMLCh* getURIForPrefix(XMLCh* /*prefix */) { return 0; };
0100     virtual void setScanner(XMLScanner* /* scanner */) { };
0101     virtual void setNamespaceScope(NamespaceScope* /* nsStack */) { };
0102 
0103     //@}
0104 
0105    
0106 protected :
0107     // -----------------------------------------------------------------------
0108     /**  Hidden Constructors */
0109     // -----------------------------------------------------------------------
0110     //@{
0111     ValidationContext(MemoryManager* const memMgr = XMLPlatformUtils::fgMemoryManager)
0112     :fMemoryManager(memMgr)
0113     {
0114     };
0115     //@}
0116 
0117     // -----------------------------------------------------------------------
0118     //  Data members
0119     //
0120     //  fMemoryManager
0121     //      Pluggable memory manager for dynamic allocation/deallocation.
0122     // -----------------------------------------------------------------------
0123     MemoryManager*                    fMemoryManager;
0124 
0125 private :
0126     // -----------------------------------------------------------------------
0127     /** name  Unimplemented copy constructor and operator= */
0128     // -----------------------------------------------------------------------
0129     //@{
0130     ValidationContext(const ValidationContext& );
0131     ValidationContext& operator=(const ValidationContext& );
0132     //@}
0133 
0134 };
0135 
0136 XERCES_CPP_NAMESPACE_END
0137 
0138 #endif
0139