libNuML 1.1.1
Library for reading / writing NuML documents
NUMLNamespaces.cpp File Reference

Functions

LIBNUML_EXTERN NUMLNamespaces_tNUMLNamespaces_create (unsigned int level, unsigned int version)
 Creates a new NUMLNamespaces_t structure corresponding to the given NUML level and version. More...
 
LIBNUML_EXTERN unsigned int NUMLNamespaces_getLevel (NUMLNamespaces_t *numlns)
 Get the NUML Level of this NUMLNamespaces_t structure. More...
 
LIBNUML_EXTERN unsigned int NUMLNamespaces_getVersion (NUMLNamespaces_t *numlns)
 Get the NUML Version of this NUMLNamespaces_t structure. More...
 
LIBNUML_EXTERN LIBSBML_CPP_NAMESPACE_QUALIFIER XMLNamespaces_tNUMLNamespaces_getNamespaces (NUMLNamespaces_t *numlns)
 Get the NUML Version of this NUMLNamespaces_t structure. More...
 
LIBNUML_EXTERN const char * NUMLNamespaces_getNUMLNamespaceURI (unsigned int level, unsigned int version)
 Returns a string representing the NUML XML namespace for the given level and version of NUML. More...
 
LIBNUML_EXTERN void NUMLNamespaces_addNamespaces (NUMLNamespaces_t *numlns, LIBSBML_CPP_NAMESPACE_QUALIFIER XMLNamespaces_t *xmlns)
 Add the XML namespaces list to the set of namespaces within this NUMLNamespaces_t structure. More...
 

Function Documentation

◆ NUMLNamespaces_addNamespaces()

LIBNUML_EXTERN void NUMLNamespaces_addNamespaces ( NUMLNamespaces_t numlns,
LIBSBML_CPP_NAMESPACE_QUALIFIER XMLNamespaces_t xmlns 
)

Add the XML namespaces list to the set of namespaces within this NUMLNamespaces_t structure.

Parameters
numlnsthe NUMLNamespaces_t structure to add to
xmlnsthe XML namespaces to be added.

◆ NUMLNamespaces_create()

LIBNUML_EXTERN NUMLNamespaces_t * NUMLNamespaces_create ( unsigned int  level,
unsigned int  version 
)

Creates a new NUMLNamespaces_t structure 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.

Parameters
levelthe NUML level
versionthe NUML version
Returns
NUMLNamespaces_t structure created

@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_getLevel()

LIBNUML_EXTERN unsigned int NUMLNamespaces_getLevel ( NUMLNamespaces_t numlns)

Get the NUML Level of this NUMLNamespaces_t structure.

Parameters
numlnsthe NUMLNamespaces_t structure to query
Returns
the NUML Level of this NUMLNamespaces_t structure.

◆ NUMLNamespaces_getNamespaces()

LIBNUML_EXTERN LIBSBML_CPP_NAMESPACE_QUALIFIER XMLNamespaces_t * NUMLNamespaces_getNamespaces ( NUMLNamespaces_t numlns)

Get the NUML Version of this NUMLNamespaces_t structure.

Parameters
numlnsthe NUMLNamespaces_t structure to query
Returns
the XMLNamespaces_t structure of this NUMLNamespaces_t structure.

◆ NUMLNamespaces_getNUMLNamespaceURI()

LIBNUML_EXTERN const char * NUMLNamespaces_getNUMLNamespaceURI ( unsigned int  level,
unsigned int  version 
)

Returns a string representing the NUML XML namespace for the given level and version of NUML.

Parameters
levelthe NUML level
versionthe NUML version
Returns
a string representing the NUML namespace that reflects the NUML Level and Version specified.

◆ NUMLNamespaces_getVersion()

LIBNUML_EXTERN unsigned int NUMLNamespaces_getVersion ( NUMLNamespaces_t numlns)

Get the NUML Version of this NUMLNamespaces_t structure.

Parameters
numlnsthe NUMLNamespaces_t structure to query
Returns
the NUML Version of this NUMLNamespaces_t structure.