Poco::XSD::Types

class NamespaceManager

File Information

Library: XSD/Types
Package: XSDTypes
Header: Poco/XSD/Types/NamespaceManager.h

Description

A NamespaceManager stores all known namespaces and assigns an id to each namespace. Is a singleton.

Member Summary

Member Functions: end, get, getId, getNamespace, hasNamespace, instance, set

Types

IdMap

typedef std::map < NamespaceId, std::string > IdMap;

NamespaceId

typedef Poco::UInt32 NamespaceId;

NamespaceMap

typedef std::map < std::string, NamespaceId > NamespaceMap;

Constructors

Destructor

~NamespaceManager protected

~NamespaceManager();

Destroys the NamespaceManager.

Member Functions

end inline

NamespaceManager::NamespaceMap::const_iterator end() const;

Returns the end iterator.

get inline

NamespaceManager::NamespaceMap::const_iterator get(
    const std::string & ns
) const;

getId inline

NamespaceManager::NamespaceId getId(
    const std::string & ns
) const;

getNamespace inline

const std::string & getNamespace(
    NamespaceManager::NamespaceId id
) const;

hasNamespace inline

bool hasNamespace(
    const std::string & ns
) const;

hasNamespace

bool hasNamespace(
    NamespaceManager::NamespaceId id
) const;

instance static

static NamespaceManager & instance();

Returns the singleton.

set

NamespaceManager::NamespaceMap::const_iterator set(
    const std::string & ns
);

Inserts the namespace into the manager and returns the assigned id. If the namespace already exists, the insert is ignored and the id is returned.