libSBML C# API
libSBML 5.8.0 C# API
|
Representation of attributes on an XML node.
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.
Public Member Functions | |
int | add (string name, string value, string namespaceURI, string prefix) |
Adds an attribute (a name/value pair) to this XMLAttributes object, optionally with a prefix and URI defining a namespace. More... | |
int | add (string name, string value, string namespaceURI) |
Adds an attribute (a name/value pair) to this XMLAttributes object, optionally with a prefix and URI defining a namespace. More... | |
int | add (string name, string value) |
Adds an attribute (a name/value pair) to this XMLAttributes object, optionally with a prefix and URI defining a namespace. More... | |
int | add (XMLTriple triple, string value) |
Adds an attribute with the given XMLTriple/value pair to this XMLAttributes set. More... | |
int | clear () |
Clears (deletes) all attributes in this XMLAttributes object. More... | |
XMLAttributes | clone () |
Creates and returns a deep copy of this XMLAttributes set. More... | |
virtual void | Dispose () |
override bool | Equals (Object sb) |
override int | GetHashCode () |
int | getIndex (string name) |
Return the index of an attribute with the given name. More... | |
int | getIndex (string name, string uri) |
Return the index of an attribute with the given local name and namespace URI. More... | |
int | getIndex (XMLTriple triple) |
Return the index of an attribute with the given XMLTriple. More... | |
int | getLength () |
Return the number of attributes in the set. More... | |
string | getName (int index) |
Return the local name of an attribute in this XMLAttributes set (by position). More... | |
int | getNumAttributes () |
Return the number of attributes in the set. More... | |
string | getPrefix (int index) |
Return the prefix of an attribute in this XMLAttributes set (by position). More... | |
string | getPrefixedName (int index) |
Return the prefixed name of an attribute in this XMLAttributes set (by position). More... | |
string | getURI (int index) |
Return the namespace URI of an attribute in this XMLAttributes set (by position). More... | |
string | getValue (int index) |
Return the value of an attribute in this XMLAttributes set (by position). More... | |
string | getValue (string name) |
Return an attribute's value by name. More... | |
string | getValue (string name, string uri) |
Return a value of an attribute with the given local name and namespace URI. More... | |
string | getValue (XMLTriple triple) |
Return a value of an attribute with the given XMLTriple. More... | |
bool | hasAttribute (int index) |
Predicate returning true or false depending on whether an attribute with the given index exists in this XMLAttributes. More... | |
bool | hasAttribute (string name, string uri) |
Predicate returning true or false depending on whether an attribute with the given local name and namespace URI exists in this XMLAttributes. More... | |
bool | hasAttribute (string name) |
Predicate returning true or false depending on whether an attribute with the given local name and namespace URI exists in this XMLAttributes. More... | |
bool | hasAttribute (XMLTriple triple) |
Predicate returning true or false depending on whether an attribute with the given XML triple exists in this XMLAttributes. More... | |
bool | isEmpty () |
Predicate returning true or false depending on whether this XMLAttributes set is empty. More... | |
int | remove (int n) |
Removes an attribute with the given index from this XMLAttributes set. More... | |
int | remove (string name, string uri) |
Removes an attribute with the given local name and namespace URI from this XMLAttributes set. More... | |
int | remove (string name) |
Removes an attribute with the given local name and namespace URI from this XMLAttributes set. More... | |
int | remove (XMLTriple triple) |
Removes an attribute with the given XMLTriple from this XMLAttributes set. More... | |
int | removeResource (int n) |
Removes an attribute with the given index from this XMLAttributes set. More... | |
XMLAttributes () | |
Creates a new empty XMLAttributes set. More... | |
XMLAttributes (XMLAttributes orig) | |
Copy constructor; creates a copy of this XMLAttributes set. More... | |
Static Public Member Functions | |
static bool | operator!= (XMLAttributes lhs, XMLAttributes rhs) |
static bool | operator== (XMLAttributes lhs, XMLAttributes rhs) |
Protected Attributes | |
bool | swigCMemOwn |
libsbmlcs.XMLAttributes.XMLAttributes | ( | ) |
Creates a new empty XMLAttributes set.
libsbmlcs.XMLAttributes.XMLAttributes | ( | XMLAttributes | orig | ) |
Copy constructor; creates a copy of this XMLAttributes set.
orig
the XMLAttributes object to copy.
XMLConstructorException | Thrown if the argument orig is null . |
int libsbmlcs.XMLAttributes.add | ( | string | name, |
string | value, | ||
string | namespaceURI, | ||
string | prefix | ||
) |
Adds an attribute (a name/value pair) to this XMLAttributes object, optionally with a prefix and URI defining a namespace.
name | a string, the local name of the attribute. |
value | a string, the value of the attribute. |
namespaceURI | a string, the namespace URI of the attribute. |
prefix | a string, the prefix of the namespace |
int libsbmlcs.XMLAttributes.add | ( | string | name, |
string | value, | ||
string | namespaceURI | ||
) |
Adds an attribute (a name/value pair) to this XMLAttributes object, optionally with a prefix and URI defining a namespace.
name | a string, the local name of the attribute. |
value | a string, the value of the attribute. |
namespaceURI | a string, the namespace URI of the attribute. |
prefix | a string, the prefix of the namespace |
int libsbmlcs.XMLAttributes.add | ( | string | name, |
string | value | ||
) |
Adds an attribute (a name/value pair) to this XMLAttributes object, optionally with a prefix and URI defining a namespace.
name | a string, the local name of the attribute. |
value | a string, the value of the attribute. |
namespaceURI | a string, the namespace URI of the attribute. |
prefix | a string, the prefix of the namespace |
int libsbmlcs.XMLAttributes.add | ( | XMLTriple | triple, |
string | value | ||
) |
Adds an attribute with the given XMLTriple/value pair to this XMLAttributes set.
triple | an XMLTriple, the XML triple of the attribute. |
value | a string, the value of the attribute. |
int libsbmlcs.XMLAttributes.clear | ( | ) |
Clears (deletes) all attributes in this XMLAttributes object.
XMLAttributes libsbmlcs.XMLAttributes.clone | ( | ) |
Creates and returns a deep copy of this XMLAttributes set.
|
virtual |
override bool libsbmlcs.XMLAttributes.Equals | ( | Object | sb | ) |
override int libsbmlcs.XMLAttributes.GetHashCode | ( | ) |
int libsbmlcs.XMLAttributes.getIndex | ( | string | name | ) |
Return the index of an attribute with the given name.
name | a string, the local name of the attribute for which the index is required. |
int libsbmlcs.XMLAttributes.getIndex | ( | string | name, |
string | uri | ||
) |
Return the index of an attribute with the given local name and namespace URI.
name | a string, the local name of the attribute. |
uri | a string, the namespace URI of the attribute. |
int libsbmlcs.XMLAttributes.getIndex | ( | XMLTriple | triple | ) |
int libsbmlcs.XMLAttributes.getLength | ( | ) |
Return the number of attributes in the set.
string libsbmlcs.XMLAttributes.getName | ( | int | index | ) |
Return the local name of an attribute in this XMLAttributes set (by position).
index | an integer, the position of the attribute whose local name is required. |
int libsbmlcs.XMLAttributes.getNumAttributes | ( | ) |
Return the number of attributes in the set.
This function is an alias for getLength introduced for consistency with other XML classes.
string libsbmlcs.XMLAttributes.getPrefix | ( | int | index | ) |
Return the prefix of an attribute in this XMLAttributes set (by position).
index | an integer, the position of the attribute whose prefix is required. |
string libsbmlcs.XMLAttributes.getPrefixedName | ( | int | index | ) |
Return the prefixed name of an attribute in this XMLAttributes set (by position).
index | an integer, the position of the attribute whose prefixed name is required. |
string libsbmlcs.XMLAttributes.getURI | ( | int | index | ) |
Return the namespace URI of an attribute in this XMLAttributes set (by position).
index | an integer, the position of the attribute whose namespace URI is required. |
string libsbmlcs.XMLAttributes.getValue | ( | int | index | ) |
Return the value of an attribute in this XMLAttributes set (by position).
index | an integer, the position of the attribute whose value is required. |
string libsbmlcs.XMLAttributes.getValue | ( | string | name | ) |
Return an attribute's value by name.
name | a string, the local name of the attribute whose value is required. |
string libsbmlcs.XMLAttributes.getValue | ( | string | name, |
string | uri | ||
) |
Return a value of an attribute with the given local name and namespace URI.
name | a string, the local name of the attribute whose value is required. |
uri | a string, the namespace URI of the attribute. |
string libsbmlcs.XMLAttributes.getValue | ( | XMLTriple | triple | ) |
Return a value of an attribute with the given XMLTriple.
triple | an XMLTriple, the XML triple of the attribute whose value is required. |
bool libsbmlcs.XMLAttributes.hasAttribute | ( | int | index | ) |
Predicate returning true
or false
depending on whether an attribute with the given index exists in this XMLAttributes.
index | an integer, the position of the attribute. |
true
if an attribute with the given index exists in this XMLAttributes, false
otherwise. bool libsbmlcs.XMLAttributes.hasAttribute | ( | string | name, |
string | uri | ||
) |
Predicate returning true
or false
depending on whether an attribute with the given local name and namespace URI exists in this XMLAttributes.
name | a string, the local name of the attribute. |
uri | a string, the namespace URI of the attribute. |
true
if an attribute with the given local name and namespace URI exists in this XMLAttributes, false
otherwise. bool libsbmlcs.XMLAttributes.hasAttribute | ( | string | name | ) |
Predicate returning true
or false
depending on whether an attribute with the given local name and namespace URI exists in this XMLAttributes.
name | a string, the local name of the attribute. |
uri | a string, the namespace URI of the attribute. |
true
if an attribute with the given local name and namespace URI exists in this XMLAttributes, false
otherwise. bool libsbmlcs.XMLAttributes.hasAttribute | ( | XMLTriple | triple | ) |
Predicate returning true
or false
depending on whether an attribute with the given XML triple exists in this XMLAttributes.
triple | an XMLTriple, the XML triple of the attribute |
true
if an attribute with the given XML triple exists in this XMLAttributes, false
otherwise. bool libsbmlcs.XMLAttributes.isEmpty | ( | ) |
Predicate returning true
or false
depending on whether this XMLAttributes set is empty.
true
if this XMLAttributes set is empty, false
otherwise.
|
static |
|
static |
int libsbmlcs.XMLAttributes.remove | ( | int | n | ) |
Removes an attribute with the given index from this XMLAttributes set.
(This function is an alias of XMLAttributes::removeResource() ).
n | an integer the index of the resource to be deleted |
int libsbmlcs.XMLAttributes.remove | ( | string | name, |
string | uri | ||
) |
Removes an attribute with the given local name and namespace URI from this XMLAttributes set.
name | a string, the local name of the attribute. |
uri | a string, the namespace URI of the attribute. |
int libsbmlcs.XMLAttributes.remove | ( | string | name | ) |
Removes an attribute with the given local name and namespace URI from this XMLAttributes set.
name | a string, the local name of the attribute. |
uri | a string, the namespace URI of the attribute. |
int libsbmlcs.XMLAttributes.remove | ( | XMLTriple | triple | ) |
Removes an attribute with the given XMLTriple from this XMLAttributes set.
triple | an XMLTriple, the XML triple of the attribute. |
int libsbmlcs.XMLAttributes.removeResource | ( | int | n | ) |
Removes an attribute with the given index from this XMLAttributes set.
n | an integer the index of the resource to be deleted |
|
protected |