cphot 0.1
A C++ tool for computing photometry from spectra.
rapidxml::xml_attribute< Ch > Class Template Reference

Class representing attribute node of XML document. More...

#include <rapidxml.hpp>

Public Member Functions

 xml_attribute ()
 Constructs an empty attribute with the specified type. More...
 
xml_document< Ch > * document () const
 Gets document of which attribute is a child. More...
 
Ch * xmlns () const
 
std::size_t xmlns_size () const
 
xml_attribute< Ch > * previous_attribute (const Ch *name=0, std::size_t name_size=0, bool case_sensitive=true) const
 Gets previous attribute, optionally matching attribute name. More...
 
xml_attribute< Ch > * next_attribute (const Ch *name=0, std::size_t name_size=0, bool case_sensitive=true) const
 Gets next attribute, optionally matching attribute name. More...
 
Ch * local_name () const
 
std::size_t local_name_size () const
 

Friends

class xml_node< Ch >
 

Detailed Description

template<class Ch = char>
class rapidxml::xml_attribute< Ch >

Class representing attribute node of XML document.

Each attribute has name and value strings, which are available through name() and value() functions (inherited from xml_base). Note that after parse, both name and value of attribute will point to interior of source text used for parsing. Thus, this text must persist in memory for the lifetime of attribute.

Parameters
ChCharacter type to use.

Definition at line 141 of file rapidxml.hpp.

Constructor & Destructor Documentation

◆ xml_attribute()

template<class Ch = char>
rapidxml::xml_attribute< Ch >::xml_attribute ( )
inline

Constructs an empty attribute with the specified type.

Consider using memory_pool of appropriate xml_document if allocating attributes manually.

Definition at line 855 of file rapidxml.hpp.

Member Function Documentation

◆ document()

template<class Ch = char>
xml_document<Ch>* rapidxml::xml_attribute< Ch >::document ( ) const
inline

Gets document of which attribute is a child.

Returns
Pointer to document that contains this attribute, or 0 if there is no parent document.

Definition at line 864 of file rapidxml.hpp.

◆ local_name()

template<class Ch = char>
Ch* rapidxml::xml_attribute< Ch >::local_name ( ) const
inline

Definition at line 936 of file rapidxml.hpp.

◆ local_name_size()

template<class Ch = char>
std::size_t rapidxml::xml_attribute< Ch >::local_name_size ( ) const
inline

Definition at line 948 of file rapidxml.hpp.

◆ next_attribute()

template<class Ch = char>
xml_attribute<Ch>* rapidxml::xml_attribute< Ch >::next_attribute ( const Ch *  name = 0,
std::size_t  name_size = 0,
bool  case_sensitive = true 
) const
inline

Gets next attribute, optionally matching attribute name.

Parameters
nameName of attribute to find, or 0 to return next attribute regardless of its name; this string doesn't have to be zero-terminated if name_size is non-zero
name_sizeSize of name, in characters, or 0 to have size calculated automatically from string
case_sensitiveShould name comparison be case-sensitive; non case-sensitive comparison works properly only for ASCII characters
Returns
Pointer to found attribute, or 0 if not found.

Definition at line 921 of file rapidxml.hpp.

◆ previous_attribute()

template<class Ch = char>
xml_attribute<Ch>* rapidxml::xml_attribute< Ch >::previous_attribute ( const Ch *  name = 0,
std::size_t  name_size = 0,
bool  case_sensitive = true 
) const
inline

Gets previous attribute, optionally matching attribute name.

Parameters
nameName of attribute to find, or 0 to return previous attribute regardless of its name; this string doesn't have to be zero-terminated if name_size is non-zero
name_sizeSize of name, in characters, or 0 to have size calculated automatically from string
case_sensitiveShould name comparison be case-sensitive; non case-sensitive comparison works properly only for ASCII characters
Returns
Pointer to found attribute, or 0 if not found.

Definition at line 901 of file rapidxml.hpp.

◆ xmlns()

template<class Ch = char>
Ch* rapidxml::xml_attribute< Ch >::xmlns ( ) const
inline

Definition at line 876 of file rapidxml.hpp.

◆ xmlns_size()

template<class Ch = char>
std::size_t rapidxml::xml_attribute< Ch >::xmlns_size ( ) const
inline

Definition at line 892 of file rapidxml.hpp.

Friends And Related Function Documentation

◆ xml_node< Ch >

template<class Ch = char>
friend class xml_node< Ch >
friend

Definition at line 846 of file rapidxml.hpp.


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