ValidationContext.hpp
Go to the documentation of this file.
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* $Id$
*/
#if !defined(XERCESC_INCLUDE_GUARD_VALIDATION_CONTEXT_HPP)
#define XERCESC_INCLUDE_GUARD_VALIDATION_CONTEXT_HPP
#include <xercesc/util/PlatformUtils.hpp>
#include <xercesc/util/RefHashTableOf.hpp>
#include <xercesc/util/NameIdPool.hpp>
#include <xercesc/util/XMemory.hpp>
XERCES_CPP_NAMESPACE_BEGIN
class XMLRefInfo;
class DTDEntityDecl;
class DatatypeValidator;
class ElemStack;
class NamespaceScope;
class XMLScanner;
class XMLPARSER_EXPORT ValidationContext : public XMemory
{
public :
// -----------------------------------------------------------------------
// -----------------------------------------------------------------------
virtual ~ValidationContext(){};
// -----------------------------------------------------------------------
// -----------------------------------------------------------------------
virtual RefHashTableOf<XMLRefInfo>* getIdRefList() const = 0;
virtual void setIdRefList(RefHashTableOf<XMLRefInfo>* const) = 0;
virtual void clearIdRefList() = 0;
virtual void addId(const XMLCh * const ) = 0;
virtual void addIdRef(const XMLCh * const ) = 0;
virtual void toCheckIdRefList(bool) = 0;
virtual const NameIdPool<DTDEntityDecl>* getEntityDeclPool() const = 0;
virtual const NameIdPool<DTDEntityDecl>* setEntityDeclPool(const NameIdPool<DTDEntityDecl>* const) = 0;
virtual void checkEntity(const XMLCh * const ) const = 0 ;
virtual DatatypeValidator * getValidatingMemberType() const = 0 ;
virtual void setValidatingMemberType(DatatypeValidator * validatingMemberType) = 0 ;
virtual bool isPrefixUnknown(XMLCh* /* prefix */) { return true; };
virtual void setElemStack(ElemStack* /* elemStack */) {};
virtual const XMLCh* getURIForPrefix(XMLCh* /*prefix */) { return 0; };
virtual void setScanner(XMLScanner* /* scanner */) { };
virtual void setNamespaceScope(NamespaceScope* /* nsStack */) { };
protected :
// -----------------------------------------------------------------------
// -----------------------------------------------------------------------
ValidationContext(MemoryManager* const memMgr = XMLPlatformUtils::fgMemoryManager)
:fMemoryManager(memMgr)
{
};
// -----------------------------------------------------------------------
// Data members
//
// fMemoryManager
// Pluggable memory manager for dynamic allocation/deallocation.
// -----------------------------------------------------------------------
MemoryManager* fMemoryManager;
private :
// -----------------------------------------------------------------------
// -----------------------------------------------------------------------
ValidationContext(const ValidationContext& );
ValidationContext& operator=(const ValidationContext& );
};
XERCES_CPP_NAMESPACE_END
#endif
PlatformUtils.hpp
XMemory.hpp
XMLPARSER_EXPORT
#define XMLPARSER_EXPORT
Definition XercesDefs.hpp:163
XERCES_CPP_NAMESPACE_BEGIN
#define XERCES_CPP_NAMESPACE_BEGIN
Definition XercesDefs.hpp:112
XERCES_CPP_NAMESPACE_END
#define XERCES_CPP_NAMESPACE_END
Definition XercesDefs.hpp:113
XMLCh
char16_t XMLCh
Definition Xerces_autoconf_config.hpp:120
MemoryManager
Configurable memory manager.
Definition MemoryManager.hpp:40
ValidationContext
Definition ValidationContext.hpp:40
ValidationContext::addIdRef
virtual void addIdRef(const XMLCh *const)=0
ValidationContext::setElemStack
virtual void setElemStack(ElemStack *)
Definition ValidationContext.hpp:98
ValidationContext::checkEntity
virtual void checkEntity(const XMLCh *const) const =0
ValidationContext::setNamespaceScope
virtual void setNamespaceScope(NamespaceScope *)
Definition ValidationContext.hpp:101
ValidationContext::setEntityDeclPool
virtual const NameIdPool< DTDEntityDecl > * setEntityDeclPool(const NameIdPool< DTDEntityDecl > *const)=0
ValidationContext::~ValidationContext
virtual ~ValidationContext()
virtual destructor
Definition ValidationContext.hpp:51
ValidationContext::fMemoryManager
MemoryManager * fMemoryManager
Definition ValidationContext.hpp:123
ValidationContext::toCheckIdRefList
virtual void toCheckIdRefList(bool)=0
ValidationContext::addId
virtual void addId(const XMLCh *const)=0
ValidationContext::getIdRefList
virtual RefHashTableOf< XMLRefInfo > * getIdRefList() const =0
IDRefList.
ValidationContext::setIdRefList
virtual void setIdRefList(RefHashTableOf< XMLRefInfo > *const)=0
ValidationContext::getURIForPrefix
virtual const XMLCh * getURIForPrefix(XMLCh *)
Definition ValidationContext.hpp:99
ValidationContext::isPrefixUnknown
virtual bool isPrefixUnknown(XMLCh *)
QName datatype handling Create default implementations for source code compatibility.
Definition ValidationContext.hpp:97
ValidationContext::setValidatingMemberType
virtual void setValidatingMemberType(DatatypeValidator *validatingMemberType)=0
ValidationContext::clearIdRefList
virtual void clearIdRefList()=0
ValidationContext::ValidationContext
ValidationContext(MemoryManager *const memMgr=XMLPlatformUtils::fgMemoryManager)
Hidden Constructors.
Definition ValidationContext.hpp:111
ValidationContext::getValidatingMemberType
virtual DatatypeValidator * getValidatingMemberType() const =0
Union datatype handling.
ValidationContext::setScanner
virtual void setScanner(XMLScanner *)
Definition ValidationContext.hpp:100
ValidationContext::getEntityDeclPool
virtual const NameIdPool< DTDEntityDecl > * getEntityDeclPool() const =0
EntityDeclPool.
XMLPlatformUtils::fgMemoryManager
static MemoryManager * fgMemoryManager
The configurable memory manager.
Definition PlatformUtils.hpp:121
XMemory
This class makes it possible to override the C++ memory management by adding new/delete operators to ...
Definition XMemory.hpp:41