XSObject.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_XSOBJECT_HPP)
#define XERCESC_INCLUDE_GUARD_XSOBJECT_HPP
#include <xercesc/util/PlatformUtils.hpp>
#include <xercesc/framework/psvi/XSConstants.hpp>
XERCES_CPP_NAMESPACE_BEGIN
// forward declarations
class XSNamespaceItem;
class XSModel;
class XMLPARSER_EXPORT XSObject : public XMemory
{
public:
// Constructors and Destructor
// -----------------------------------------------------------------------
XSObject
(
XSConstants::COMPONENT_TYPE compType
, XSModel* const xsModel
, MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager
);
virtual ~XSObject();
//---------------------
XSConstants::COMPONENT_TYPE getType() const;
virtual const XMLCh* getName() const;
virtual const XMLCh* getNamespace() const;
virtual XSNamespaceItem *getNamespaceItem();
virtual XMLSize_t getId() const;
//----------------------------------
void setId(XMLSize_t id);
private:
// -----------------------------------------------------------------------
// Unimplemented constructors and operators
// -----------------------------------------------------------------------
XSObject(const XSObject&);
XSObject & operator=(const XSObject &);
protected:
// -----------------------------------------------------------------------
// data members
// -----------------------------------------------------------------------
// fMemoryManager:
// used for any memory allocations
// fComponentType
// the type of the actual component
XSConstants::COMPONENT_TYPE fComponentType;
XSModel* fXSModel;
MemoryManager* fMemoryManager;
XMLSize_t fId;
};
inline XSConstants::COMPONENT_TYPE XSObject::getType() const
{
return fComponentType;
}
XERCES_CPP_NAMESPACE_END
#endif
PlatformUtils.hpp
XSConstants.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
XMLSize_t
size_t XMLSize_t
Definition Xerces_autoconf_config.hpp:112
XMLCh
char16_t XMLCh
Definition Xerces_autoconf_config.hpp:120
MemoryManager
Configurable memory manager.
Definition MemoryManager.hpp:40
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
XSConstants::COMPONENT_TYPE
COMPONENT_TYPE
Definition XSConstants.hpp:61
XSModel
Definition XSModel.hpp:60
XSNamespaceItem
Definition XSNamespaceItem.hpp:54
XSObject
Definition XSObject.hpp:43
XSObject::~XSObject
virtual ~XSObject()
XSObject::getType
XSConstants::COMPONENT_TYPE getType() const
The type of this object, i.e.
Definition XSObject.hpp:145
XSObject::XSObject
XSObject(XSConstants::COMPONENT_TYPE compType, XSModel *const xsModel, MemoryManager *const manager=XMLPlatformUtils::fgMemoryManager)
The default constructor.
XSObject::getNamespaceItem
virtual XSNamespaceItem * getNamespaceItem()
A namespace schema information item corresponding to the target namespace of the component,...
XSObject::fXSModel
XSModel * fXSModel
Definition XSObject.hpp:140
XSObject::getId
virtual XMLSize_t getId() const
Optional.
XSObject::fId
XMLSize_t fId
Definition XSObject.hpp:142
XSObject::getName
virtual const XMLCh * getName() const
The name of type NCName of this declaration as defined in XML Namespaces.
XSObject::fMemoryManager
MemoryManager * fMemoryManager
Definition XSObject.hpp:141
XSObject::getNamespace
virtual const XMLCh * getNamespace() const
The [target namespace] of this object, or null if it is unspecified.
XSObject::fComponentType
XSConstants::COMPONENT_TYPE fComponentType
Definition XSObject.hpp:139
XSObject::setId
void setId(XMLSize_t id)
methods needed by implementation