exml::Attribute Class Reference

#include <Attribute.hpp>

Inheritance diagram for exml::Attribute:
exml::Node

Public Member Functions

 Attribute (ememory::SharedPtr< exml::internal::Node > _internalNode)
 
 Attribute (const exml::Attribute &_obj)
 
 Attribute (const std::string &_name="", const std::string &_value="")
 
exml::Attributeoperator= (const exml::Attribute &_obj)
 
virtual void setName (const std::string &_name)
 
virtual const std::string & getName () const
 
std::pair< std::string, std::string > getPair () const
 
void clear () override
 
- Public Member Functions inherited from exml::Node
 Node (const ememory::SharedPtr< exml::internal::Node > &_internalNode)
 
 Node ()
 
virtual ~Node ()=default
 
bool exist () const
 
exml::FilePos getPos () const
 
virtual void setValue (std::string _value)
 
const std::string & getValue () const
 
enum nodeType getType () const
 
exml::Document toDocument ()
 
const exml::Document toDocument () const
 
exml::Attribute toAttribute ()
 
const exml::Attribute toAttribute () const
 
exml::Comment toComment ()
 
const exml::Comment toComment () const
 
exml::Declaration toDeclaration ()
 
const exml::Declaration toDeclaration () const
 
exml::Element toElement ()
 
const exml::Element toElement () const
 
exml::Text toText ()
 
const exml::Text toText () const
 
bool isDocument () const
 
bool isAttribute () const
 
bool isComment () const
 
bool isDeclaration () const
 
bool isElement () const
 
bool isText () const
 

Friends

class exml::AttributeListData
 

Additional Inherited Members

- Protected Attributes inherited from exml::Node
ememory::SharedPtr< exml::internal::Nodem_data
 

Detailed Description

Single attribute element.

Constructor & Destructor Documentation

§ Attribute() [1/3]

exml::Attribute::Attribute ( ememory::SharedPtr< exml::internal::Node _internalNode)

Constructor.

Parameters
[in]_internalNodeInternal Node to set data

§ Attribute() [2/3]

exml::Attribute::Attribute ( const exml::Attribute _obj)

Copy constructor.

Parameters
[in]_objObject to copy Copy constructor
[in]_objObject to copy

§ Attribute() [3/3]

exml::Attribute::Attribute ( const std::string &  _name = "",
const std::string &  _value = "" 
)

Constructor.

Parameters
[in]_nameName of the attribute.
[in]_valueValue of the attribute.

Member Function Documentation

§ clear()

void exml::Attribute::clear ( )
overridevirtual

clear the Node

Reimplemented from exml::Node.

§ getName()

virtual const std::string& exml::Attribute::getName ( ) const
virtual

get the current name of the Attribute

Returns
String of the attribute

§ getPair()

std::pair<std::string, std::string> exml::Attribute::getPair ( ) const

get attribute name and value

Returns
Name and value of the attribute

§ operator=()

exml::Attribute& exml::Attribute::operator= ( const exml::Attribute _obj)

Copy constructor.

Parameters
[in]_objObject to copy
Returns
Local reference on this object

§ setName()

virtual void exml::Attribute::setName ( const std::string &  _name)
virtual

set the name of the attribute

Parameters
[in]_nameNew name of the attribute

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