Elm  2
ELM is a library providing generic data structures, OS-independent interface, plugins and XML.
Attribute< T > Class Template Reference

#include <elm/xom/dtd.h>

+ Inheritance diagram for Attribute< T >:

Public Member Functions

 Attribute (Element &element, xom::String name, const T &init, t::uint32 flags=0)
 
const T & operator* () const
 
- Public Member Functions inherited from AbstractAttribute
 AbstractAttribute (Element &element, xom::String name, t::uint32 flags=0)
 
virtual ~AbstractAttribute ()
 
xom::String name () const
 
Elementelement () const
 
bool isRequired () const
 
bool isStrict () const
 
bool isForward () const
 
bool isSet () const
 
bool operator== (const AbstractAttribute &a) const
 
bool operator!= (const AbstractAttribute &a) const
 

Protected Member Functions

bool process (Parser &parser, xom::String value) override
 
void reset () override
 
- Protected Member Functions inherited from AbstractAttribute
bool parse (Parser &parser)
 
virtual void postprocess (Parser &parser)
 

Additional Inherited Members

- Static Public Attributes inherited from AbstractAttribute
static const t::uint32 REQUIRED = 0x01
 
static const t::uint32 STRICT = 0x02
 
static const t::uint32 FORWARD = 0x04
 

Detailed Description

template<class T>
class elm::dtd::Attribute< T >

Generic attribute that uses io::Input to parse the value of an XML attribute.

Parameters
TType of the attribute.

Constructor & Destructor Documentation

◆ Attribute()

Attribute ( Element element,
xom::String  name,
const T &  init,
t::uint32  flags = 0 
)
inline

Member Function Documentation

◆ operator*()

const T & operator* ( ) const
inline

Get the value stored in the identifier.

Returns
Attribute value.

◆ process()

bool process ( Parser parser,
xom::String  value 
)
inlineoverrideprotectedvirtual

This function is called by parse() if a value is found for the attribute. The role of this function is to process the found value. The default implementation does nothing but it can overridden.

Reimplemented from AbstractAttribute.

◆ reset()

void reset ( )
inlineoverrideprotectedvirtual

Function called to reset the value stored in the attribute. The default implementation does nothing but it can be overridden.

Reimplemented from AbstractAttribute.

References AbstractAttribute::reset().


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