libcrn  3.9.5
A document image processing library
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Friends | List of all members
crn::xml::Element::Attribute Class Reference

#include <CRNXml.h>

Public Member Functions

 Attribute (const Attribute &)=default
 
 Attribute (Attribute &&)=default
 
Attributeoperator= (const Attribute &)=default
 
Attributeoperator= (Attribute &&)=default
 
 ~Attribute ()
 Destructor. More...
 
Attributeoperator++ ()
 Move to next attribute. More...
 
Attribute operator++ (int)
 Move to next attribute. More...
 
Attribute Next ()
 Gets next attribute. More...
 
bool operator== (const Attribute &other) const noexcept
 Comparison operator. More...
 
bool operator!= (const Attribute &other) const noexcept
 Comparison operator. More...
 
StringUTF8 GetName () const
 Gets the name of the attribute. More...
 
template<typename T >
GetValue (bool silent=true) const
 Gets the value of the attribute. More...
 
void SetValue (const StringUTF8 &value)
 Sets the value of the attribute. More...
 

Friends

class Element
 

Detailed Description

Definition at line 236 of file CRNXml.h.

Constructor & Destructor Documentation

crn::xml::Element::Attribute::Attribute ( const Attribute )
default
crn::xml::Element::Attribute::Attribute ( Attribute &&  )
default
crn::xml::Element::Attribute::~Attribute ( )
inline

Destructor.

Definition at line 244 of file CRNXml.h.

Member Function Documentation

StringUTF8 Element::Attribute::GetName ( ) const

Gets the name of the attribute.

Gets the name of the attribute

Returns
the name of the attribute

Definition at line 777 of file CRNXml.cpp.

template<typename T >
T crn::xml::Element::Attribute::GetValue ( bool  silent = true) const
inline

Gets the value of the attribute.

Exceptions
ExceptionInvalidArgumentempty attribute name
ExceptionNotFoundattribute not found
ExceptionDomaincannot convert attribute
Parameters
[in]silentshall exceptions be dropped?
Returns
the attribute's value (or 0 if silent and not found or cannot convert)

Definition at line 267 of file CRNXml.h.

Element::Attribute Element::Attribute::Next ( )

Gets next attribute.

Gets next attribute

Returns
the next attribute

Definition at line 769 of file CRNXml.cpp.

bool crn::xml::Element::Attribute::operator!= ( const Attribute other) const
inlinenoexcept

Comparison operator.

Definition at line 256 of file CRNXml.h.

Element::Attribute & Element::Attribute::operator++ ( )

Move to next attribute.

Move to next attribute

Returns
the next attribute

Definition at line 750 of file CRNXml.cpp.

Element::Attribute Element::Attribute::operator++ ( int  )

Move to next attribute.

Move to next attribute

Returns
the current attribute

Definition at line 759 of file CRNXml.cpp.

Attribute& crn::xml::Element::Attribute::operator= ( const Attribute )
default
Attribute& crn::xml::Element::Attribute::operator= ( Attribute &&  )
default
bool crn::xml::Element::Attribute::operator== ( const Attribute other) const
inlinenoexcept

Comparison operator.

Definition at line 254 of file CRNXml.h.

void Element::Attribute::SetValue ( const StringUTF8 value)

Sets the value of the attribute.

Sets the value of the attribute

Exceptions
CharsetConverter::ExceptionInvalidCharacterinvalid character
CharsetConverter::ExceptionIncompleteCodeincomplete multibyte character
Parameters
[in]valuethe new value

Definition at line 787 of file CRNXml.cpp.

Friends And Related Function Documentation

friend class Element
friend

Definition at line 302 of file CRNXml.h.


The documentation for this class was generated from the following files: