class Poco::XML::NamePool
Overview
A hashtable that stores XML names consisting of an URI, a local name and a qualified name. Moreā¦
#include <NamePool.h> class NamePool { public: // construction NamePool(unsigned long size = POCO_XML_NAMEPOOL_DEFAULT_SIZE); // methods const Name& insert( const XMLString& qname, const XMLString& namespaceURI, const XMLString& localName ); const Name& insert(const Name& name); void duplicate(); void release(); protected: // methods unsigned long hash( const XMLString& qname, const XMLString& namespaceURI, const XMLString& localName ); };
Detailed Documentation
A hashtable that stores XML names consisting of an URI, a local name and a qualified name.
Construction
NamePool(unsigned long size = POCO_XML_NAMEPOOL_DEFAULT_SIZE)
Creates a name pool with room for up to size strings.
The given size should be a suitable prime number, e.g. 251, 509, 1021 or 4093.
Methods
const Name& insert( const XMLString& qname, const XMLString& namespaceURI, const XMLString& localName )
Returns a const reference to an Name for the given names.
Creates the Name if it does not already exist. Throws a PoolOverflowException if the name pool is full.
const Name& insert(const Name& name)
Returns a const reference to an Name for the given name.
Creates the Name if it does not already exist. Throws a PoolOverflowException if the name pool is full.
void duplicate()
Increments the reference count.
void release()
Decrements the reference count and deletes the object if the reference count reaches zero.