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: XSObject.hpp 1804272 2017-08-06 20:25:24Z scantor $
*/
#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
XMemory
This class makes it possible to override the C++ memory management by adding new/delete operators to ...
Definition: XMemory.hpp:40
XMLPlatformUtils::fgMemoryManager
static MemoryManager * fgMemoryManager
The configurable memory manager.
Definition: PlatformUtils.hpp:121
XSNamespaceItem
Definition: XSNamespaceItem.hpp:53
XSObject::fComponentType
XSConstants::COMPONENT_TYPE fComponentType
Definition: XSObject.hpp:139
XMLPARSER_EXPORT
#define XMLPARSER_EXPORT
Definition: XercesDefs.hpp:163
XSObject::fXSModel
XSModel * fXSModel
Definition: XSObject.hpp:140
XSModel
Definition: XSModel.hpp:59
XSObject::fMemoryManager
MemoryManager * fMemoryManager
Definition: XSObject.hpp:141
XSConstants.hpp
PlatformUtils.hpp
MemoryManager
Configurable memory manager.
Definition: MemoryManager.hpp:39
XSObject::getType
XSConstants::COMPONENT_TYPE getType() const
The type of this object, i.e.
Definition: XSObject.hpp:145
XMLCh
uint16_t XMLCh
Definition: Xerces_autoconf_config.hpp:120
XERCES_CPP_NAMESPACE_BEGIN
#define XERCES_CPP_NAMESPACE_BEGIN
Definition: XercesDefs.hpp:112
XSObject::fId
XMLSize_t fId
Definition: XSObject.hpp:142
XSObject
Definition: XSObject.hpp:42
XMLSize_t
size_t XMLSize_t
Definition: Xerces_autoconf_config.hpp:112
XERCES_CPP_NAMESPACE_END
#define XERCES_CPP_NAMESPACE_END
Definition: XercesDefs.hpp:113
XSConstants::COMPONENT_TYPE
COMPONENT_TYPE
Definition: XSConstants.hpp:61