- Main Page
- Related Pages
- Classes
- Files

# ValidationContext.hpp

Go to the documentation of this file.

    00001 /*
    00002  * Licensed to the Apache Software Foundation (ASF) under one or more
    00003  * contributor license agreements.  See the NOTICE file distributed with
    00004  * this work for additional information regarding copyright ownership.
    00005  * The ASF licenses this file to You under the Apache License, Version 2.0
    00006  * (the "License"); you may not use this file except in compliance with
    00007  * the License.  You may obtain a copy of the License at
    00008  *
    00009  *      http://www.apache.org/licenses/LICENSE-2.0
    00010  *
    00011  * Unless required by applicable law or agreed to in writing, software
    00012  * distributed under the License is distributed on an "AS IS" BASIS,
    00013  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    00014  * See the License for the specific language governing permissions and
    00015  * limitations under the License.
    00016  */
    00017
    00018 /*
    00019  * $Id: ValidationContext.hpp 729944 2008-12-29 17:03:32Z amassari $
    00020  */
    00021
    00022 #if !defined(XERCESC_INCLUDE_GUARD_VALIDATION_CONTEXT_HPP)
    00023 #define XERCESC_INCLUDE_GUARD_VALIDATION_CONTEXT_HPP
    00024
    00025 #include <xercesc/util/PlatformUtils.hpp>
    00026 #include <xercesc/util/RefHashTableOf.hpp>
    00027 #include <xercesc/util/NameIdPool.hpp>
    00028 #include <xercesc/util/XMemory.hpp>
    00029
    00030 XERCES_CPP_NAMESPACE_BEGIN
    00031
    00032 class XMLRefInfo;
    00033 class DTDEntityDecl;
    00034 class DatatypeValidator;
    00035 class ElemStack;
    00036 class NamespaceScope;
    00037 class XMLScanner;
    00038
    00039 class XMLPARSER_EXPORT ValidationContext : public XMemory
    00040 {
    00041 public :
    00042     // -----------------------------------------------------------------------
    00044     // -----------------------------------------------------------------------
    00046
    00051     virtual ~ValidationContext(){};
    00053
    00054     // -----------------------------------------------------------------------
    00056     // -----------------------------------------------------------------------
    00058
    00063     virtual RefHashTableOf<XMLRefInfo>*  getIdRefList() const = 0;
    00064
    00065     virtual void                         setIdRefList(RefHashTableOf<XMLRefInfo>* const) = 0;
    00066
    00067     virtual void                         clearIdRefList() = 0;
    00068
    00069     virtual void                         addId(const XMLCh * const ) = 0;
    00070
    00071     virtual void                         addIdRef(const XMLCh * const ) = 0;
    00072
    00073     virtual void                         toCheckIdRefList(bool) = 0;
    00074
    00079     virtual const NameIdPool<DTDEntityDecl>* getEntityDeclPool() const = 0;
    00080
    00081     virtual const NameIdPool<DTDEntityDecl>* setEntityDeclPool(const NameIdPool<DTDEntityDecl>* const) = 0;
    00082
    00083     virtual void                             checkEntity(const XMLCh * const ) const = 0 ;
    00084
    00090     virtual DatatypeValidator * getValidatingMemberType() const = 0 ;
    00091     virtual void setValidatingMemberType(DatatypeValidator * validatingMemberType) = 0 ;
    00092
    00097     virtual bool isPrefixUnknown(XMLCh* /* prefix */) { return true; };
    00098     virtual void setElemStack(ElemStack* /* elemStack */) {};
    00099     virtual const XMLCh* getURIForPrefix(XMLCh* /*prefix */) { return 0; };
    00100     virtual void setScanner(XMLScanner* /* scanner */) { };
    00101     virtual void setNamespaceScope(NamespaceScope* /* nsStack */) { };
    00102
    00104
    00105
    00106 protected :
    00107     // -----------------------------------------------------------------------
    00109     // -----------------------------------------------------------------------
    00111     ValidationContext(MemoryManager* const memMgr = XMLPlatformUtils::fgMemoryManager)
    00112     :fMemoryManager(memMgr)
    00113     {
    00114     };
    00116
    00117     // -----------------------------------------------------------------------
    00118     //  Data members
    00119     //
    00120     //  fMemoryManager
    00121     //      Pluggable memory manager for dynamic allocation/deallocation.
    00122     // -----------------------------------------------------------------------
    00123     MemoryManager*                    fMemoryManager;
    00124
    00125 private :
    00126     // -----------------------------------------------------------------------
    00128     // -----------------------------------------------------------------------
    00130     ValidationContext(const ValidationContext& );
    00131     ValidationContext& operator=(const ValidationContext& );
    00133
    00134 };
    00135
    00136 XERCES_CPP_NAMESPACE_END
    00137
    00138 #endif
    00139