Jameo Core Library
Loading...
Searching...
No Matches
Public Member Functions | List of all members
jm::SAXAttributes Class Reference

This class represents the attributes used in the SAX parser. More...

Inheritance diagram for jm::SAXAttributes:
jm::Object

Public Member Functions

 SAXAttributes ()
 Constructor.
 
 ~SAXAttributes () override
 Destructor.
 
 SAXAttributes (const SAXAttributes &other)
 Copy constructor.
 
SAXAttributesoperator= (const SAXAttributes &another)
 assigning operator
 
void addAttribute (const String &uri, const String &localname, const String &qName, const String &value)
 This method is needed by the parser to fill the list with content.
 
size_t indexOf (const String &qName) const
 This method searches for the index of an attribute.
 
size_t indexOf (const String &uri, const String &localName) const
 This method searches for the index of an attribute.
 
size_t count () const
 Returns the number of attributes.
 
String localName (size_t index) const
 Returns the local name of an attribute.
 
String qualifiedName (size_t index) const
 Returns the qualified name.
 
String type (size_t index) const
 Returns the attribute type.
 
String type (const String &qname) const
 Returns the attribute type.
 
String type (const String &uri, const String &localName) const
 Returns the attribute type.
 
String uri (size_t index) const
 Returns the URI.
 
String value (size_t index) const
 Returns the value of the attribute.
 
String value (const String &qname) const
 Returns the value.
 
int64 valueAsInt (const String &qname) const
 Returns the value as an integer.
 
float valueAsFloat (const String &qname) const
 Returns the value as a float.
 
double valueAsDouble (const String &qname) const
 Returns the value as a double.
 
bool valueAsBool (const String &qname) const
 Returns the value as a boolean.
 
bool hasValue (const String &qname) const
 Checks if the attribute is contained.
 
String value (const String &uri, const String &localName) const
 Returns the value.
 
- Public Member Functions inherited from jm::Object
 Object () noexcept
 Constructor.
 
virtual ~Object () noexcept
 Destructor.
 
void release () noexcept
 Decreases the reference counter and releases the object immediately when the reference counter becomes 0.
 
Objectretain () noexcept
 Increases the reference counter of this object by 1.
 
Objectautorelease () noexcept
 Same function as release(), but releases the object with a delay if the reference counter is 0. AutoreleasePool::drain() must be called in the to release the object.
 
int32 referenceCount () const noexcept
 Returns the value of the reference counter.
 
virtual bool equals (const Object *other) const
 Comparison of objects.
 
virtual String displayName () const
 Returns the display name of the object intended to present to a user.
 
virtual void printDiffInfo (DiffOperation operation, Object *other) const
 Output method for outputting the diff results for the diff algorithm.
 
void setHighBit (bool status) noexcept
 
bool highBit () const noexcept
 

Detailed Description

This class represents the attributes used in the SAX parser.

Constructor & Destructor Documentation

◆ SAXAttributes() [1/2]

jm::SAXAttributes::SAXAttributes ( )

Constructor.

◆ ~SAXAttributes()

jm::SAXAttributes::~SAXAttributes ( )
override

Destructor.

◆ SAXAttributes() [2/2]

jm::SAXAttributes::SAXAttributes ( const SAXAttributes other)

Copy constructor.

Member Function Documentation

◆ addAttribute()

void jm::SAXAttributes::addAttribute ( const String uri,
const String localname,
const String qName,
const String value 
)

This method is needed by the parser to fill the list with content.

◆ count()

size_t jm::SAXAttributes::count ( ) const

Returns the number of attributes.

◆ hasValue()

bool jm::SAXAttributes::hasValue ( const String qname) const

Checks if the attribute is contained.

Parameters
qnameThe qualified name of the attribute.

◆ indexOf() [1/2]

size_t jm::SAXAttributes::indexOf ( const String qName) const

This method searches for the index of an attribute.

Parameters
qNameThe qualified name of the attribute.
Returns
The index of the attribute, or -1 if not found.

◆ indexOf() [2/2]

size_t jm::SAXAttributes::indexOf ( const String uri,
const String localName 
) const

This method searches for the index of an attribute.

Parameters
localNameThe local name of the attribute.
Returns
The index of the attribute, or -1 if not found.

◆ localName()

String jm::SAXAttributes::localName ( size_t  index) const

Returns the local name of an attribute.

Parameters
indexThe 0-based index of the attribute.
Returns
The local name of the attribute.

◆ operator=()

SAXAttributes & jm::SAXAttributes::operator= ( const SAXAttributes another)

assigning operator

◆ qualifiedName()

String jm::SAXAttributes::qualifiedName ( size_t  index) const

Returns the qualified name.

Returns
The qualified name of the attribute.

◆ type() [1/3]

String jm::SAXAttributes::type ( const String qname) const

Returns the attribute type.

The attribute type is one of the following strings: "CDATA", "ID", "IDREF", "IDREFS", "NMTOKEN", "NMTOKENS", "ENTITY", "ENTITIES", or "NOTATION" (always in upper case).

Returns
The attribute type.

◆ type() [2/3]

String jm::SAXAttributes::type ( const String uri,
const String localName 
) const

Returns the attribute type.

The attribute type is one of the following strings: "CDATA", "ID", "IDREF", "IDREFS", "NMTOKEN", "NMTOKENS", "ENTITY", "ENTITIES", or "NOTATION" (always in upper case).

Parameters
uriThe URI of the attribute.
localNameThe local name of the attribute.
Returns
The attribute type.

◆ type() [3/3]

String jm::SAXAttributes::type ( size_t  index) const

Returns the attribute type.

The attribute type is one of the following strings: "CDATA", "ID", "IDREF", "IDREFS", "NMTOKEN", "NMTOKENS", "ENTITY", "ENTITIES", or "NOTATION" (always in upper case).

Returns
The attribute type.

◆ uri()

String jm::SAXAttributes::uri ( size_t  index) const

Returns the URI.

Returns
The URI of the attribute.

◆ value() [1/3]

String jm::SAXAttributes::value ( const String qname) const

Returns the value.

Parameters
qnameThe qualified name of the attribute.
Returns
The value.

◆ value() [2/3]

String jm::SAXAttributes::value ( const String uri,
const String localName 
) const

Returns the value.

Parameters
uriThe URI of the attribute.
localNameThe local name of the attribute.

◆ value() [3/3]

String jm::SAXAttributes::value ( size_t  index) const

Returns the value of the attribute.

Parameters
indexThe 0-based index of the attribute.
Returns
The value of the attribute.

◆ valueAsBool()

bool jm::SAXAttributes::valueAsBool ( const String qname) const

Returns the value as a boolean.

Parameters
qnameThe qualified name of the attribute.

◆ valueAsDouble()

double jm::SAXAttributes::valueAsDouble ( const String qname) const

Returns the value as a double.

Parameters
qnameThe qualified name of the attribute.

◆ valueAsFloat()

float jm::SAXAttributes::valueAsFloat ( const String qname) const

Returns the value as a float.

Parameters
qnameThe qualified name of the attribute.

◆ valueAsInt()

int64 jm::SAXAttributes::valueAsInt ( const String qname) const

Returns the value as an integer.

Parameters
qnameThe qualified name of the attribute.