mUPnP for C++
uXML::Node Class Reference

#include <Node.h>

Public Member Functions

 Node ()
 
 Node (const std::string &name)
 
 Node (const std::string &ns, const std::string &name)
 
virtual ~Node ()
 
void setParentNode (Node *node)
 
NodegetParentNode ()
 
NodegetRootNode ()
 
void setName (const std::string &val)
 
void setName (const std::string &ns, const std::string &val)
 
const char * getName ()
 
bool isName (const std::string &val)
 
void setValue (const std::string &val)
 
void setValue (int val)
 
const char * getValue ()
 
bool isValue (const std::string &val)
 
void addValue (const std::string &val)
 
void addValue (const std::string &val, int len)
 
int getNAttributes ()
 
AttributegetAttribute (int index)
 
AttributegetAttribute (const std::string &name)
 
void addAttribute (Attribute *attr)
 
void insertAttributeAt (Attribute *attr, int index)
 
void addAttribute (const std::string &name, const std::string &value)
 
bool removeAttribute (Attribute *attr)
 
bool removeAttribute (const std::string &name)
 
bool hasAttributes ()
 
void setAttribute (const std::string &name, const std::string &value)
 
void setAttribute (const std::string &name, int value)
 
const char * getAttributeValue (const std::string &name)
 
int getAttributeIntegerValue (const std::string &name)
 
void setNameSpace (const std::string &ns, const std::string &val)
 
size_t getNNodes ()
 
mupnp_shared_ptr< NodegetNode (size_t index)
 
mupnp_shared_ptr< NodegetNode (const std::string &name)
 
mupnp_shared_ptr< NodegetNode (const std::string &name, const std::string &value)
 
mupnp_shared_ptr< NodegetNodeEndsWith (const std::string &name)
 
bool addNode (Node *node)
 
bool insertNode (Node *node, size_t index)
 
bool removeNode (mupnp_shared_ptr< Node > node)
 
bool removeNode (const std::string &name)
 
bool hasNodes ()
 
void removeAllNodes (void)
 
bool setNode (const std::string &name, const std::string &value)
 
const char * getNodeValue (const std::string &name)
 
void setUserData (NodeData *data)
 
NodeDatagetUserData ()
 
void outputAttributes (std::ostream &ps)
 
virtual void output (std::ostream &ps, int indentLevel, bool hasChildNode)
 
const char * toString (std::string &buf, bool hasChildNode=true)
 
void print (bool hasChildNode=true)
 

Protected Member Functions

const char * getIndentLevelString (int nIndentLevel, std::string &buf)
 

Private Attributes

NodeparentNode
 
std::string name
 
std::string value
 
AttributeList attrList
 
NodeList nodeList
 
NodeDatauserData
 

Constructor & Destructor Documentation

◆ Node() [1/3]

uXML::Node::Node ( )

◆ Node() [2/3]

uXML::Node::Node ( const std::string & name)

◆ Node() [3/3]

uXML::Node::Node ( const std::string & ns,
const std::string & name )

◆ ~Node()

virtual uXML::Node::~Node ( )
virtual

Member Function Documentation

◆ addAttribute() [1/2]

void uXML::Node::addAttribute ( Attribute * attr)
inline

◆ addAttribute() [2/2]

void uXML::Node::addAttribute ( const std::string & name,
const std::string & value )
inline

◆ addNode()

bool uXML::Node::addNode ( Node * node)
inline

◆ addValue() [1/2]

void uXML::Node::addValue ( const std::string & val)
inline

◆ addValue() [2/2]

void uXML::Node::addValue ( const std::string & val,
int len )
inline

◆ getAttribute() [1/2]

Attribute * uXML::Node::getAttribute ( const std::string & name)
inline

◆ getAttribute() [2/2]

Attribute * uXML::Node::getAttribute ( int index)
inline

◆ getAttributeIntegerValue()

int uXML::Node::getAttributeIntegerValue ( const std::string & name)

◆ getAttributeValue()

const char * uXML::Node::getAttributeValue ( const std::string & name)

◆ getIndentLevelString()

const char * uXML::Node::getIndentLevelString ( int nIndentLevel,
std::string & buf )
inlineprotected

◆ getName()

const char * uXML::Node::getName ( )
inline

◆ getNAttributes()

int uXML::Node::getNAttributes ( )
inline

◆ getNNodes()

size_t uXML::Node::getNNodes ( )
inline

◆ getNode() [1/3]

mupnp_shared_ptr< Node > uXML::Node::getNode ( const std::string & name)
inline

◆ getNode() [2/3]

mupnp_shared_ptr< Node > uXML::Node::getNode ( const std::string & name,
const std::string & value )
inline

◆ getNode() [3/3]

mupnp_shared_ptr< Node > uXML::Node::getNode ( size_t index)
inline

◆ getNodeEndsWith()

mupnp_shared_ptr< Node > uXML::Node::getNodeEndsWith ( const std::string & name)
inline

◆ getNodeValue()

const char * uXML::Node::getNodeValue ( const std::string & name)
inline

◆ getParentNode()

Node * uXML::Node::getParentNode ( )
inline

◆ getRootNode()

Node * uXML::Node::getRootNode ( )
inline

◆ getUserData()

NodeData * uXML::Node::getUserData ( )
inline

◆ getValue()

const char * uXML::Node::getValue ( )
inline

◆ hasAttributes()

bool uXML::Node::hasAttributes ( )
inline

◆ hasNodes()

bool uXML::Node::hasNodes ( )
inline

◆ insertAttributeAt()

void uXML::Node::insertAttributeAt ( Attribute * attr,
int index )
inline

◆ insertNode()

bool uXML::Node::insertNode ( Node * node,
size_t index )
inline

◆ isName()

bool uXML::Node::isName ( const std::string & val)
inline

◆ isValue()

bool uXML::Node::isValue ( const std::string & val)
inline

◆ output()

virtual void uXML::Node::output ( std::ostream & ps,
int indentLevel,
bool hasChildNode )
virtual

◆ outputAttributes()

void uXML::Node::outputAttributes ( std::ostream & ps)

◆ print()

void uXML::Node::print ( bool hasChildNode = true)

◆ removeAllNodes()

void uXML::Node::removeAllNodes ( void )
inline

◆ removeAttribute() [1/2]

bool uXML::Node::removeAttribute ( Attribute * attr)
inline

◆ removeAttribute() [2/2]

bool uXML::Node::removeAttribute ( const std::string & name)
inline

◆ removeNode() [1/2]

bool uXML::Node::removeNode ( const std::string & name)
inline

◆ removeNode() [2/2]

bool uXML::Node::removeNode ( mupnp_shared_ptr< Node > node)
inline

◆ setAttribute() [1/2]

void uXML::Node::setAttribute ( const std::string & name,
const std::string & value )

◆ setAttribute() [2/2]

void uXML::Node::setAttribute ( const std::string & name,
int value )

◆ setName() [1/2]

void uXML::Node::setName ( const std::string & ns,
const std::string & val )
inline

◆ setName() [2/2]

void uXML::Node::setName ( const std::string & val)
inline

◆ setNameSpace()

void uXML::Node::setNameSpace ( const std::string & ns,
const std::string & val )
inline

◆ setNode()

bool uXML::Node::setNode ( const std::string & name,
const std::string & value )
inline

◆ setParentNode()

void uXML::Node::setParentNode ( Node * node)
inline

◆ setUserData()

void uXML::Node::setUserData ( NodeData * data)

◆ setValue() [1/2]

void uXML::Node::setValue ( const std::string & val)
inline

◆ setValue() [2/2]

void uXML::Node::setValue ( int val)

◆ toString()

const char * uXML::Node::toString ( std::string & buf,
bool hasChildNode = true )

Field Documentation

◆ attrList

AttributeList uXML::Node::attrList
private

◆ name

std::string uXML::Node::name
private

◆ nodeList

NodeList uXML::Node::nodeList
private

◆ parentNode

Node* uXML::Node::parentNode
private

◆ userData

NodeData* uXML::Node::userData
private

◆ value

std::string uXML::Node::value
private

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