Orcus
Public Member Functions | Friends | List of all members
orcus::xmlns_repository Class Reference

#include <xml_namespace.hpp>

Public Member Functions

ORCUS_PSR_DLLPUBLIC void add_predefined_values (const xmlns_id_t *predefined_ns)
 
ORCUS_PSR_DLLPUBLIC xmlns_context create_context ()
 
ORCUS_PSR_DLLPUBLIC xmlns_id_t get_identifier (size_t index) const
 
ORCUS_PSR_DLLPUBLIC std::string get_short_name (xmlns_id_t ns_id) const
 
ORCUS_PSR_DLLPUBLIC std::string get_short_name (size_t index) const
 

Friends

class xmlns_context
 

Detailed Description

Central XML namespace repository that stores all namespaces that are used in the current session.

Member Function Documentation

ORCUS_PSR_DLLPUBLIC void orcus::xmlns_repository::add_predefined_values ( const xmlns_id_t *  predefined_ns)

Add a set of predefined namespace values to the repository.

Parameters
predefined_nspredefined set of namespace values. This is a null-terminated array of xmlns_id_t. This xmlns_repository instance will assume that the instances of these xmlns_id_t values will be available throughout its life cycle; caller needs to ensure that they won't get deleted before the corresponding xmlns_repository instance is deleted.
ORCUS_PSR_DLLPUBLIC xmlns_id_t orcus::xmlns_repository::get_identifier ( size_t  index) const

Get XML namespace identifier from its numerical index.

Parameters
indexnumeric index of namespace.
Returns
valid namespace identifier, or XMLNS_UNKNOWN_ID if not found.