ANNA Suite  2020b
Multipurpose development suite for Telco applications
Public Member Functions | Protected Member Functions | Friends | List of all members
anna::xml::Data Class Reference

#include <Data.hpp>

Inheritance diagram for anna::xml::Data:
Inheritance graph
[legend]

Public Member Functions

const std::string & getValue () const
 
const char * getCStringValue () const
 
int getIntegerValue () const
 
void setValue (const char *value)
 
void setValue (const std::string &value)
 
void setValue (const int value)
 
virtual std::string asString () const
 

Protected Member Functions

 Data ()
 

Friends

class Node
 

Detailed Description

Dato generico de nodo XML.

Cada nodo XML puede tener una serie indeterminada de dato XMLs. Por ejemplo:

<broadcast>
<INetAddress Address="204.152.65.15" Port="2000"/>
<INetAddress Address="204.152.65.47" Port="2002"/>
</broadcast>
<Indicador>
Es es un texto libre
</Indicador>

Cada uno de los nodos INetAddress tiene dos dato XMLs (Address y Port).

Constructor & Destructor Documentation

◆ Data()

anna::xml::Data::Data ( )
inlineprotected

Contructor.

86 : a_owner(NULL) {;}

Member Function Documentation

◆ asString()

virtual std::string anna::xml::Data::asString ( ) const
virtual

Devuelve una cadena con toda la informacion relevante de esta instancia.

Returns
Una cadena con toda la informacion relevante de esta instancia.

Reimplemented in anna::xml::Attribute, and anna::xml::Text.

◆ getCStringValue()

const char* anna::xml::Data::getCStringValue ( ) const
inline

Devuelve el valor asociado a este dato XML.

Returns
El valor asociado a este dato XML.
50 { return a_value.c_str(); }

◆ getIntegerValue()

int anna::xml::Data::getIntegerValue ( ) const
inline

Devuelve el valor numerico asociado a este dato XML.

Returns
El valor numerico asociado a este dato XML.
56 { return atoi(a_value.c_str()); }

◆ getValue()

const std::string& anna::xml::Data::getValue ( void  ) const
inline

Devuelve el valor asociado a este dato XML.

Returns
El valor asociado a este dato XML.
44 { return a_value; }

◆ setValue() [1/3]

void anna::xml::Data::setValue ( const char *  value)
inline

Establece el valor de éste dato XML.

Parameters
valueValor que tomará éste dato XML.
62 { a_value = (value != NULL) ? value : ""; filter(a_value); }

◆ setValue() [2/3]

void anna::xml::Data::setValue ( const std::string &  value)
inline

Establece el valor de éste dato XML.

Parameters
valueValor que tomará éste dato XML.
68 { a_value = value; }
Here is the call graph for this function:

◆ setValue() [3/3]

void anna::xml::Data::setValue ( const int  value)

Establece el valor de éste dato XML.

Parameters
valueValor que tomará éste dato XML.

Friends And Related Function Documentation

◆ Node

friend class Node
friend

Representacion de un nodo de HTML.

See also
xml::Node;

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