/* * Comparison (equal-to) operator for XMLTriple. * * @return @c non-zero (true) if the combination of name, URI, and * prefix of lhs is equal to that of rhs @c zero (false) otherwise. */ bool operator==(const XMLTriple& lhs, const XMLTriple& rhs) { if (lhs.getName() != rhs.getName() ) return false; if (lhs.getURI() != rhs.getURI() ) return false; if (lhs.getPrefix() != rhs.getPrefix()) return false; return true; }
/* * Adds an attribute with the given triple/value pair to this XMLAttributes set. * If name with the same namespaceURI already exists in this attribute set, * its value will be replaced. */ int XMLAttributes::add ( const XMLTriple& triple, const std::string& value) { return add(triple.getName(), value, triple.getURI(), triple.getPrefix()); }
/* * Adds an attribute with the given triple/value pair to this XMLAttributes set. * If name with the same namespaceURI already exists in this attribute set, * its value will be replaced. */ int XMLAttributes::add ( const XMLTriple& triple, const std::string& value) { if (&triple == NULL || &value == NULL) return LIBSBML_INVALID_OBJECT; return add(triple.getName(), value, triple.getURI(), triple.getPrefix()); }