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 577322 2007-09-19 14:58:04Z cargilld $
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 XMLScanner;
00037 
00038 class XMLPARSER_EXPORT ValidationContext : public XMemory
00039 {
00040 public :
00041     // -----------------------------------------------------------------------
00043     // -----------------------------------------------------------------------
00045 
00050     virtual ~ValidationContext(){};
00052 
00053     // -----------------------------------------------------------------------
00055     // -----------------------------------------------------------------------
00057 
00062     virtual RefHashTableOf<XMLRefInfo>*  getIdRefList() const = 0;
00063 
00064     virtual void                         setIdRefList(RefHashTableOf<XMLRefInfo>* const) = 0;
00065 
00066     virtual void                         clearIdRefList() = 0;
00067 
00068     virtual void                         addId(const XMLCh * const ) = 0;
00069 
00070     virtual void                         addIdRef(const XMLCh * const ) = 0;
00071 
00072     virtual void                         toCheckIdRefList(bool) = 0;
00073 
00078     virtual const NameIdPool<DTDEntityDecl>* getEntityDeclPool() const = 0;
00079 
00080     virtual const NameIdPool<DTDEntityDecl>* setEntityDeclPool(const NameIdPool<DTDEntityDecl>* const) = 0;    
00081            
00082     virtual void                             checkEntity(const XMLCh * const ) const = 0 ;
00083 
00089     virtual DatatypeValidator * getValidatingMemberType() const = 0 ;
00090     virtual void setValidatingMemberType(DatatypeValidator * validatingMemberType) = 0 ;
00091 
00096     virtual bool isPrefixUnknown(XMLCh* /* prefix */) { return true; };
00097     virtual void setElemStack(ElemStack* /* elemStack */) {};
00098     virtual const XMLCh* getURIForPrefix(XMLCh* /*prefix */) { return 0; };
00099     virtual void setScanner(XMLScanner* /* scanner */) { };
00100 
00102 
00103    
00104 protected :
00105     // -----------------------------------------------------------------------
00107     // -----------------------------------------------------------------------
00109     ValidationContext(MemoryManager* const memMgr = XMLPlatformUtils::fgMemoryManager)
00110     :fMemoryManager(memMgr)
00111     {
00112     };
00114 
00115     // -----------------------------------------------------------------------
00116     //  Data members
00117     //
00118     //  fMemoryManager
00119     //      Pluggable memory manager for dynamic allocation/deallocation.
00120     // -----------------------------------------------------------------------
00121     MemoryManager*                    fMemoryManager;
00122 
00123 private :
00124     // -----------------------------------------------------------------------
00126     // -----------------------------------------------------------------------
00128     ValidationContext(const ValidationContext& );
00129     ValidationContext& operator=(const ValidationContext& );
00131 
00132 };
00133 
00134 XERCES_CPP_NAMESPACE_END
00135 
00136 #endif
00137 

Generated on Wed Sep 24 16:36:33 2008 for Xerces-C++ by  doxygen 1.5.4