libNuML 1.1.1
Library for reading / writing NuML documents
|
namespace class More...
#include <NUMLNamespaces.h>
Public Member Functions | |
NUMLNamespaces (unsigned int level=NUML_DEFAULT_LEVEL, unsigned int version=NUML_DEFAULT_VERSION) | |
Creates a new NUMLNamespaces object corresponding to the given NUML level and version . More... | |
~NUMLNamespaces () | |
Destroys this NUMLNamespaces object. More... | |
NUMLNamespaces (const NUMLNamespaces &orig) | |
Copy constructor; creates a copy of a NUMLNamespaces. More... | |
NUMLNamespaces & | operator= (const NUMLNamespaces &orig) |
Assignment operator for NUMLNamespaces. More... | |
NUMLNamespaces * | clone () const |
Creates and returns a deep copy of this NUMLNamespaces. More... | |
unsigned int | getLevel () |
Get the NUML Level of this NUMLNamespaces object. More... | |
unsigned int | getVersion () |
Get the NUML Version of this NUMLNamespaces object. More... | |
LIBSBML_CPP_NAMESPACE_QUALIFIER XMLNamespaces * | getNamespaces () |
Get the XML namespaces list for this NUMLNamespaces object. More... | |
void | addNamespaces (LIBSBML_CPP_NAMESPACE_QUALIFIER XMLNamespaces *xmlns) |
Add the XML namespaces list to the set of namespaces within this NUMLNamespaces object. More... | |
void | setLevel (unsigned int level) |
void | setVersion (unsigned int version) |
void | setNamespaces (LIBSBML_CPP_NAMESPACE_QUALIFIER XMLNamespaces *xmlns) |
Static Public Member Functions | |
static std::string | getNUMLNamespaceURI (unsigned int level, unsigned int version) |
Returns a string representing the NUML XML namespace for the given level and version of NUML. More... | |
Protected Attributes | |
unsigned int | mLevel |
unsigned int | mVersion |
LIBSBML_CPP_NAMESPACE_QUALIFIER XMLNamespaces * | mNamespaces |
namespace class
LIBNUML_CPP_NAMESPACE_BEGIN NUMLNamespaces::NUMLNamespaces | ( | unsigned int | level = NUML_DEFAULT_LEVEL , |
unsigned int | version = NUML_DEFAULT_VERSION |
||
) |
Creates a new NUMLNamespaces object corresponding to the given NUML level
and version
.
NUMLNamespaces objects are used in libNUML to communicate NUML Level and Version data between constructors and other methods. The NUMLNamespaces object class tracks 3-tuples (triples) consisting of NUML Level, Version, and the corresponding NUML XML namespace. Most constructors for NUML objects in libNUML take a NUMLNamespaces object as an argument, thereby allowing the constructor to produce the proper combination of attributes and other internal data structures for the given NUML Level and Version.
The plural name "NUMLNamespaces" is not a mistake, because in NUML Level 3, objects may have extensions added by Level 3 packages used by a given model; however, until the introduction of NUML Level 3, the NUMLNamespaces object only records one NUML Level/Version/namespace combination at a time.
level | the NUML level |
version | the NUML version |
@docnote The native C++ implementation of this method defines a default argument value. In the documentation generated for different libNUML language bindings, you may or may not see corresponding arguments in the method declarations. For example, in Java, a default argument is handled by declaring two separate methods, with one of them having the argument and the other one lacking the argument. However, the libNUML documentation will be identical for both methods. Consequently, if you are reading this and do not see an argument even though one is described, please look for descriptions of other variants of this method near where this one appears in the documentation.
NUMLNamespaces::~NUMLNamespaces | ( | ) |
Destroys this NUMLNamespaces object.
NUMLNamespaces::NUMLNamespaces | ( | const NUMLNamespaces & | orig | ) |
Copy constructor; creates a copy of a NUMLNamespaces.
orig | the NUMLNamespaces instance to copy. |
void NUMLNamespaces::addNamespaces | ( | LIBSBML_CPP_NAMESPACE_QUALIFIER XMLNamespaces * | xmlns | ) |
Add the XML namespaces list to the set of namespaces within this NUMLNamespaces object.
xmlns | the XML namespaces to be added. |
NUMLNamespaces * NUMLNamespaces::clone | ( | ) | const |
Creates and returns a deep copy of this NUMLNamespaces.
unsigned int NUMLNamespaces::getLevel | ( | ) |
Get the NUML Level of this NUMLNamespaces object.
LIBSBML_CPP_NAMESPACE_QUALIFIER XMLNamespaces * NUMLNamespaces::getNamespaces | ( | ) |
Get the XML namespaces list for this NUMLNamespaces object.
The plural is not a mistake, because in NUML Level 3, objects may have extensions added by Level 3 packages used by a given model, and therefore there may be multiple XML namespaces involved too. However, until the introduction of NUML Level 3, the NUMLNamespaces object only records one NUML Level/Version/namespace combination at a time, and so this method will also only return a list of one item.
|
static |
Returns a string representing the NUML XML namespace for the given level
and version
of NUML.
level | the NUML level |
version | the NUML version |
unsigned int NUMLNamespaces::getVersion | ( | ) |
Get the NUML Version of this NUMLNamespaces object.
NUMLNamespaces & NUMLNamespaces::operator= | ( | const NUMLNamespaces & | orig | ) |
Assignment operator for NUMLNamespaces.
void NUMLNamespaces::setLevel | ( | unsigned int | level | ) |
void NUMLNamespaces::setNamespaces | ( | LIBSBML_CPP_NAMESPACE_QUALIFIER XMLNamespaces * | xmlns | ) |
void NUMLNamespaces::setVersion | ( | unsigned int | version | ) |
|
protected |
|
protected |
|
protected |