libCombine
C++ library for working with the COMBINE Archive format
|
Public Member Functions | |
CaNamespaces (unsigned int level=OMEX_DEFAULT_LEVEL, unsigned int version=OMEX_DEFAULT_VERSION) | |
Creates a new CaNamespaces object corresponding to the given OMEX level and version . More... | |
virtual | ~CaNamespaces () |
Destroys this CaNamespaces object. More... | |
CaNamespaces (const CaNamespaces &orig) | |
Copy constructor; creates a copy of a CaNamespaces. More... | |
CaNamespaces & | operator= (const CaNamespaces &rhs) |
Assignment operator for CaNamespaces. More... | |
virtual CaNamespaces * | clone () const |
Creates and returns a deep copy of this CaNamespaces object. More... | |
virtual std::string | getURI () const |
Returns a string representing the OMEX XML namespace of this object. More... | |
unsigned int | getLevel () |
Get the OMEX Level of this CaNamespaces object. More... | |
unsigned int | getLevel () const |
Get the OMEX Level of this CaNamespaces object. More... | |
unsigned int | getVersion () |
Get the OMEX Version of this CaNamespaces object. More... | |
unsigned int | getVersion () const |
Get the OMEX Version of this CaNamespaces object. More... | |
XMLNamespaces * | getNamespaces () |
Get the XML namespaces list for this CaNamespaces object. More... | |
const XMLNamespaces * | getNamespaces () const |
Get the XML namespaces list for this CaNamespaces object. More... | |
int | addNamespaces (const XMLNamespaces *xmlns) |
Add the given XML namespaces list to the set of namespaces within this CaNamespaces object. More... | |
int | addNamespace (const std::string &uri, const std::string &prefix) |
Add an XML namespace (a pair of URI and prefix) to the set of namespaces within this CaNamespaces object. More... | |
int | removeNamespace (const std::string &uri) |
Removes an XML namespace from the set of namespaces within this CaNamespaces object. More... | |
bool | isValidCombination () |
Predicate returning true if the given set of namespaces represent a valid set. More... | |
Static Public Member Functions | |
static std::string | getCaNamespaceURI (unsigned int level, unsigned int version) |
Returns a string representing the OMEX XML namespace for the given level and version of OMEX. More... | |
static const List * | getSupportedNamespaces () |
Returns a list of all supported CaNamespaces in this version of libcombine. More... | |
static void | freeCaNamespaces (List *supportedNS) |
Frees the list of supported namespaces as generated by getSupportedNamespaces(). More... | |
static bool | isCaNamespace (const std::string &uri) |
Predicate returning true if the given URL is one of OMEX XML namespaces. More... | |
CaNamespaces::CaNamespaces | ( | unsigned int | level = OMEX_DEFAULT_LEVEL , |
unsigned int | version = OMEX_DEFAULT_VERSION |
||
) |
Creates a new CaNamespaces object corresponding to the given OMEX level
and version
.
level | the OMEX level |
version | the OMEX version |
|
virtual |
Destroys this CaNamespaces object.
CaNamespaces::CaNamespaces | ( | const CaNamespaces & | orig | ) |
Copy constructor; creates a copy of a CaNamespaces.
orig | the CaNamespaces instance to copy. |
int CaNamespaces::addNamespace | ( | const std::string & | uri, |
const std::string & | prefix | ||
) |
Add an XML namespace (a pair of URI and prefix) to the set of namespaces within this CaNamespaces object.
uri | the XML namespace to be added. |
prefix | the prefix of the namespace to be added. |
int CaNamespaces::addNamespaces | ( | const XMLNamespaces * | xmlns | ) |
Add the given XML namespaces list to the set of namespaces within this CaNamespaces object.
xmlns | the XML namespaces to be added. |
|
virtual |
Creates and returns a deep copy of this CaNamespaces object.
|
static |
Frees the list of supported namespaces as generated by getSupportedNamespaces().
supportedNS | the list to be freed. |
|
static |
Returns a string representing the OMEX XML namespace for the given level
and version
of OMEX.
level | the OMEX level |
version | the OMEX version |
unsigned int CaNamespaces::getLevel | ( | ) |
Get the OMEX Level of this CaNamespaces object.
unsigned int CaNamespaces::getLevel | ( | ) | const |
Get the OMEX Level of this CaNamespaces object.
XMLNamespaces * CaNamespaces::getNamespaces | ( | ) |
Get the XML namespaces list for this CaNamespaces object.
const XMLNamespaces * CaNamespaces::getNamespaces | ( | ) | const |
Get the XML namespaces list for this CaNamespaces object.
|
static |
Returns a list of all supported CaNamespaces in this version of libcombine.
|
virtual |
Returns a string representing the OMEX XML namespace of this object.
unsigned int CaNamespaces::getVersion | ( | ) |
Get the OMEX Version of this CaNamespaces object.
unsigned int CaNamespaces::getVersion | ( | ) | const |
Get the OMEX Version of this CaNamespaces object.
|
static |
Predicate returning true
if the given URL is one of OMEX XML namespaces.
uri | the URI of namespace |
true
if the "uri" is one of OMEX namespaces, false
otherwise. bool CaNamespaces::isValidCombination | ( | ) |
Predicate returning true
if the given set of namespaces represent a valid set.
true
if the set of namespaces is valid, false
otherwise. CaNamespaces & CaNamespaces::operator= | ( | const CaNamespaces & | rhs | ) |
Assignment operator for CaNamespaces.
int CaNamespaces::removeNamespace | ( | const std::string & | uri | ) |
Removes an XML namespace from the set of namespaces within this CaNamespaces object.
uri | the XML namespace to be added. |