Public Member Functions | Protected Attributes | List of all members
vsl_basic_xml_element Class Reference

#include <vsl_basic_xml_element.h>

Public Member Functions

 vsl_basic_xml_element (std::string tag)
 constructs with a name. More...
 
 vsl_basic_xml_element (std::string tag, std::vector< std::pair< std::string, std::string > > attrs)
 constructs with a name and a list of (attribute,value) pair. More...
 
 ~vsl_basic_xml_element ()=default
 
void add_attribute (std::string attr_name, std::string value)
 overloaded methods to add attribute values. More...
 
void add_attribute (std::string attr_name, double value)
 
void add_attribute (std::string attr_name, float value)
 
void add_attribute (std::string attr_name, long value)
 
void add_attribute (std::string attr_name, int value)
 
void add_attribute (std::string attr_name, size_t value)
 
void add_attribute (std::string attr_name, unsigned int value)
 
void add_attribute_list (std::vector< std::pair< std::string, std::string > > attrs)
 
void append_cdata (const std::string &cdata)
 
void append_cdata (double cdata)
 
void append_cdata (int cdata)
 
void x_write (std::ostream &ostr)
 
void x_write_open (std::ostream &ostr)
 writes the opening tag for this node to the stream. More...
 
void x_write_close (std::ostream &ostr)
 writes the closing tag for this node to the stream. More...
 

Protected Attributes

std::string tag_
 the node name More...
 
std::vector< std::pair< std::string, std::string > > attrs_
 the node attributes More...
 
std::string cdata_
 the text() content of this node More...
 

Detailed Description

Definition at line 27 of file vsl_basic_xml_element.h.

Constructor & Destructor Documentation

◆ vsl_basic_xml_element() [1/2]

vsl_basic_xml_element::vsl_basic_xml_element ( std::string  tag)
inline

constructs with a name.

Definition at line 31 of file vsl_basic_xml_element.h.

◆ vsl_basic_xml_element() [2/2]

vsl_basic_xml_element::vsl_basic_xml_element ( std::string  tag,
std::vector< std::pair< std::string, std::string > >  attrs 
)
inline

constructs with a name and a list of (attribute,value) pair.

Definition at line 35 of file vsl_basic_xml_element.h.

◆ ~vsl_basic_xml_element()

vsl_basic_xml_element::~vsl_basic_xml_element ( )
default

Member Function Documentation

◆ add_attribute() [1/7]

void vsl_basic_xml_element::add_attribute ( std::string  attr_name,
std::string  value 
)

overloaded methods to add attribute values.

Definition at line 13 of file vsl_basic_xml_element.cxx.

◆ add_attribute() [2/7]

void vsl_basic_xml_element::add_attribute ( std::string  attr_name,
double  value 
)

Definition at line 19 of file vsl_basic_xml_element.cxx.

◆ add_attribute() [3/7]

void vsl_basic_xml_element::add_attribute ( std::string  attr_name,
float  value 
)
inline

Definition at line 44 of file vsl_basic_xml_element.h.

◆ add_attribute() [4/7]

void vsl_basic_xml_element::add_attribute ( std::string  attr_name,
long  value 
)

Definition at line 26 of file vsl_basic_xml_element.cxx.

◆ add_attribute() [5/7]

void vsl_basic_xml_element::add_attribute ( std::string  attr_name,
int  value 
)
inline

Definition at line 46 of file vsl_basic_xml_element.h.

◆ add_attribute() [6/7]

void vsl_basic_xml_element::add_attribute ( std::string  attr_name,
size_t  value 
)
inline

Definition at line 47 of file vsl_basic_xml_element.h.

◆ add_attribute() [7/7]

void vsl_basic_xml_element::add_attribute ( std::string  attr_name,
unsigned int  value 
)
inline

Definition at line 49 of file vsl_basic_xml_element.h.

◆ add_attribute_list()

void vsl_basic_xml_element::add_attribute_list ( std::vector< std::pair< std::string, std::string > >  attrs)

Definition at line 6 of file vsl_basic_xml_element.cxx.

◆ append_cdata() [1/3]

void vsl_basic_xml_element::append_cdata ( const std::string &  cdata)

Definition at line 33 of file vsl_basic_xml_element.cxx.

◆ append_cdata() [2/3]

void vsl_basic_xml_element::append_cdata ( double  cdata)

Definition at line 40 of file vsl_basic_xml_element.cxx.

◆ append_cdata() [3/3]

void vsl_basic_xml_element::append_cdata ( int  cdata)

Definition at line 47 of file vsl_basic_xml_element.cxx.

◆ x_write()

void vsl_basic_xml_element::x_write ( std::ostream &  ostr)

Definition at line 62 of file vsl_basic_xml_element.cxx.

◆ x_write_close()

void vsl_basic_xml_element::x_write_close ( std::ostream &  ostr)

writes the closing tag for this node to the stream.

writes the closing tag to the stream.

Definition at line 85 of file vsl_basic_xml_element.cxx.

◆ x_write_open()

void vsl_basic_xml_element::x_write_open ( std::ostream &  ostr)

writes the opening tag for this node to the stream.

Definition at line 75 of file vsl_basic_xml_element.cxx.

Member Data Documentation

◆ attrs_

std::vector<std::pair<std::string, std::string> > vsl_basic_xml_element::attrs_
protected

the node attributes

Definition at line 68 of file vsl_basic_xml_element.h.

◆ cdata_

std::string vsl_basic_xml_element::cdata_
protected

the text() content of this node

Definition at line 69 of file vsl_basic_xml_element.h.

◆ tag_

std::string vsl_basic_xml_element::tag_
protected

the node name

Definition at line 67 of file vsl_basic_xml_element.h.


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