libSBML C API
5.18.0
|
This class of objects is defined by libSBML only and has no direct equivalent in terms of SBML components. This class is not prescribed by the SBML specifications, although it is used to implement features defined in SBML.
A "triple" in the libSBML XML layer encapsulates the notion of qualified name, meaning an element name or an attribute name with an optional namespace qualifier. Triples by themselves are not entities in an XML stream—they are not, for example, elements or attributes; rather, XMLTriple_t is used in libSBML to construct these other kinds of objects.
An XMLTriple_t instance carries up to three data items:
mysim
and it appears on both the element someelement
and the attribute attribA
. When both the element and the attribute are stored as XMLTriple_t objects, their prefix is mysim
. <mysim:someelement mysim:attribA="value" />
XMLTriple_t objects are the lowest-level data item in the XML layer of libSBML. Other objects such as XMLToken_t make use of XMLTriple_t objects.
Public Member Functions | |
LIBLAX_EXTERN XMLTriple_t * | XMLTriple_clone (const XMLTriple_t *triple) |
Creates a deep copy of the given XMLTriple_t structure. More... | |
LIBLAX_EXTERN XMLTriple_t * | XMLTriple_create (void) |
Creates a new empty XMLTriple_t structure and returns a pointer to it. More... | |
LIBLAX_EXTERN XMLTriple_t * | XMLTriple_createWith (const char *name, const char *uri, const char *prefix) |
Creates a new XMLTriple_t structure with name, prefix and uri. More... | |
LIBLAX_EXTERN int | XMLTriple_equalTo (const XMLTriple_t *lhs, const XMLTriple_t *rhs) |
Predicate returning 1 (true) or 0 (false) depending on whether the two XMLTriple_t structures are equal. More... | |
LIBLAX_EXTERN void | XMLTriple_free (XMLTriple_t *triple) |
Destroys this XMLTriple_t structure. More... | |
LIBLAX_EXTERN const char * | XMLTriple_getName (const XMLTriple_t *triple) |
Returns the name from this XMLTriple_t structure. More... | |
LIBLAX_EXTERN const char * | XMLTriple_getPrefix (const XMLTriple_t *triple) |
Returns the prefix from this XMLTriple_t structure. More... | |
LIBLAX_EXTERN const char * | XMLTriple_getPrefixedName (const XMLTriple_t *triple) |
Returns the prefixed name from this XMLTriple_t structure. More... | |
LIBLAX_EXTERN const char * | XMLTriple_getURI (const XMLTriple_t *triple) |
Returns the URI from this XMLTriple_t structure. More... | |
LIBLAX_EXTERN int | XMLTriple_isEmpty (const XMLTriple_t *triple) |
Predicate returning 1 (true) or 0 (false) depending on whether this XMLTriple_t is empty. More... | |
LIBLAX_EXTERN int | XMLTriple_notEqualTo (const XMLTriple_t *lhs, const XMLTriple_t *rhs) |
Predicate returning 1 (true) or 0 (false) depending on whether the two XMLTriple_t structures are not equal. More... | |
LIBLAX_EXTERN XMLTriple_t * XMLTriple_clone | ( | const XMLTriple_t * | triple | ) |
Creates a deep copy of the given XMLTriple_t structure.
triple | the XMLTriple_t structure to be copied. |
LIBLAX_EXTERN XMLTriple_t * XMLTriple_create | ( | void | ) |
Creates a new empty XMLTriple_t structure and returns a pointer to it.
LIBLAX_EXTERN XMLTriple_t * XMLTriple_createWith | ( | const char * | name, |
const char * | uri, | ||
const char * | prefix | ||
) |
Creates a new XMLTriple_t structure with name, prefix and uri.
name | a string, name for the XMLTriple_t structure. |
uri | a string, URI of the XMLTriple_t structure. |
prefix | a string, prefix for the URI of the XMLTriple_t structure. |
LIBLAX_EXTERN int XMLTriple_equalTo | ( | const XMLTriple_t * | lhs, |
const XMLTriple_t * | rhs | ||
) |
Predicate returning 1
(true) or 0
(false) depending on whether the two XMLTriple_t structures are equal.
lhs | the first XMLTriple_t structure to be compared. |
rhs | the second XMLTriple_t structure to be compared. |
1
(true) if the combination of name, URI, and prefix of the two XMLTriple_t structures are equal, 0
(false) otherwise. LIBLAX_EXTERN void XMLTriple_free | ( | XMLTriple_t * | triple | ) |
Destroys this XMLTriple_t structure.
triple | XMLTriple_t structure to be freed. |
LIBLAX_EXTERN const char * XMLTriple_getName | ( | const XMLTriple_t * | triple | ) |
Returns the name from this XMLTriple_t structure.
triple | XMLTriple_t structure to be queried. |
LIBLAX_EXTERN const char * XMLTriple_getPrefix | ( | const XMLTriple_t * | triple | ) |
Returns the prefix from this XMLTriple_t structure.
triple | XMLTriple_t structure to be queried. |
LIBLAX_EXTERN const char * XMLTriple_getPrefixedName | ( | const XMLTriple_t * | triple | ) |
Returns the prefixed name from this XMLTriple_t structure.
triple | XMLTriple_t structure to be queried. |
LIBLAX_EXTERN const char * XMLTriple_getURI | ( | const XMLTriple_t * | triple | ) |
Returns the URI from this XMLTriple_t structure.
triple | XMLTriple_t structure to be queried. |
LIBLAX_EXTERN int XMLTriple_isEmpty | ( | const XMLTriple_t * | triple | ) |
Predicate returning 1
(true) or 0
(false) depending on whether this XMLTriple_t is empty.
triple | XMLTriple_t structure to be queried. |
1
(true) if this XMLTriple_t is empty, 0
(false) otherwise. LIBLAX_EXTERN int XMLTriple_notEqualTo | ( | const XMLTriple_t * | lhs, |
const XMLTriple_t * | rhs | ||
) |
Predicate returning 1
(true) or 0
(false) depending on whether the two XMLTriple_t structures are not equal.
lhs | the first XMLTriple_t structure to be compared. |
rhs | the second XMLTriple_t structure to be compared. |
1
(true) if the combination of name, URI, or prefix of the two XMLTriple_t structures are not equal, 0
(false) otherwise.