Otclient  14/8/2020
OTMLNode Class Reference

#include <otmlnode.h>

Inheritance diagram for OTMLNode:
Collaboration diagram for OTMLNode:

Public Member Functions

virtual ~OTMLNode ()
 
std::string tag ()
 
int size ()
 
std::string source ()
 
std::string rawValue ()
 
bool isUnique ()
 
bool isNull ()
 
bool hasTag ()
 
bool hasValue ()
 
bool hasChildren ()
 
bool hasChildAt (const std::string &childTag)
 
bool hasChildAtIndex (int childIndex)
 
void setTag (const std::string &tag)
 
void setValue (const std::string &value)
 
void setNull (bool null)
 
void setUnique (bool unique)
 
void setSource (const std::string &source)
 
OTMLNodePtr get (const std::string &childTag)
 
OTMLNodePtr getIndex (int childIndex)
 
OTMLNodePtr at (const std::string &childTag)
 
OTMLNodePtr atIndex (int childIndex)
 
void addChild (const OTMLNodePtr &newChild)
 
bool removeChild (const OTMLNodePtr &oldChild)
 
bool replaceChild (const OTMLNodePtr &oldChild, const OTMLNodePtr &newChild)
 
void copy (const OTMLNodePtr &node)
 
void merge (const OTMLNodePtr &node)
 
void clear ()
 
OTMLNodeList children ()
 
OTMLNodePtr clone ()
 
template<typename T = std::string>
value ()
 
template<typename T = std::string>
valueAt (const std::string &childTag)
 
template<typename T = std::string>
valueAtIndex (int childIndex)
 
template<typename T = std::string>
valueAt (const std::string &childTag, const T &def)
 
template<typename T = std::string>
valueAtIndex (int childIndex, const T &def)
 
template<typename T >
void write (const T &v)
 
template<typename T >
void writeAt (const std::string &childTag, const T &v)
 
template<typename T >
void writeIn (const T &v)
 
virtual std::string emit ()
 
OTMLNodePtr asOTMLNode ()
 
- Public Member Functions inherited from stdext::shared_object
 shared_object ()
 
virtual ~shared_object ()
 
void add_ref ()
 
void dec_ref ()
 
refcount_t ref_count ()
 
template<typename T >
stdext::shared_object_ptr< T > static_self_cast ()
 
template<typename T >
stdext::shared_object_ptr< T > dynamic_self_cast ()
 
template<typename T >
stdext::shared_object_ptr< T > const_self_cast ()
 

Static Public Member Functions

static OTMLNodePtr create (std::string tag="", bool unique=false)
 
static OTMLNodePtr create (std::string tag, std::string value)
 

Protected Member Functions

 OTMLNode ()
 

Protected Attributes

OTMLNodeList m_children
 
std::string m_tag
 
std::string m_value
 
std::string m_source
 
bool m_unique
 
bool m_null
 

Detailed Description

Definition at line 28 of file otmlnode.h.

Constructor & Destructor Documentation

◆ ~OTMLNode()

virtual OTMLNode::~OTMLNode ( )
inlinevirtual

Definition at line 31 of file otmlnode.h.

◆ OTMLNode()

OTMLNode::OTMLNode ( )
inlineprotected

Definition at line 95 of file otmlnode.h.

Member Function Documentation

◆ addChild()

void OTMLNode::addChild ( const OTMLNodePtr newChild)

Definition at line 91 of file otmlnode.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ asOTMLNode()

OTMLNodePtr OTMLNode::asOTMLNode ( )
inline

Definition at line 92 of file otmlnode.h.

Here is the caller graph for this function:

◆ at()

OTMLNodePtr OTMLNode::at ( const std::string &  childTag)

Definition at line 70 of file otmlnode.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ atIndex()

OTMLNodePtr OTMLNode::atIndex ( int  childIndex)

Definition at line 84 of file otmlnode.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ children()

OTMLNodeList OTMLNode::children ( )

Definition at line 170 of file otmlnode.cpp.

Here is the caller graph for this function:

◆ clear()

void OTMLNode::clear ( )

Definition at line 165 of file otmlnode.cpp.

Here is the caller graph for this function:

◆ clone()

OTMLNodePtr OTMLNode::clone ( )

Definition at line 179 of file otmlnode.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ copy()

void OTMLNode::copy ( const OTMLNodePtr node)

Definition at line 145 of file otmlnode.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ create() [1/2]

OTMLNodePtr OTMLNode::create ( std::string  tag,
std::string  value 
)
static

Definition at line 35 of file otmlnode.cpp.

Here is the call graph for this function:

◆ create() [2/2]

OTMLNodePtr OTMLNode::create ( std::string  tag = "",
bool  unique = false 
)
static

Definition at line 27 of file otmlnode.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ emit()

std::string OTMLNode::emit ( )
virtual

Reimplemented in OTMLDocument.

Definition at line 192 of file otmlnode.cpp.

Here is the call graph for this function:

◆ get()

OTMLNodePtr OTMLNode::get ( const std::string &  childTag)

Definition at line 54 of file otmlnode.cpp.

Here is the caller graph for this function:

◆ getIndex()

OTMLNodePtr OTMLNode::getIndex ( int  childIndex)

Definition at line 63 of file otmlnode.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ hasChildAt()

bool OTMLNode::hasChildAt ( const std::string &  childTag)
inline

Definition at line 47 of file otmlnode.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ hasChildAtIndex()

bool OTMLNode::hasChildAtIndex ( int  childIndex)
inline

Definition at line 48 of file otmlnode.h.

Here is the call graph for this function:

◆ hasChildren()

bool OTMLNode::hasChildren ( )

Definition at line 44 of file otmlnode.cpp.

Here is the caller graph for this function:

◆ hasTag()

bool OTMLNode::hasTag ( )
inline

Definition at line 44 of file otmlnode.h.

Here is the caller graph for this function:

◆ hasValue()

bool OTMLNode::hasValue ( )
inline

Definition at line 45 of file otmlnode.h.

Here is the caller graph for this function:

◆ isNull()

bool OTMLNode::isNull ( )
inline

Definition at line 42 of file otmlnode.h.

Here is the caller graph for this function:

◆ isUnique()

bool OTMLNode::isUnique ( )
inline

Definition at line 41 of file otmlnode.h.

Here is the caller graph for this function:

◆ merge()

void OTMLNode::merge ( const OTMLNodePtr node)

Definition at line 157 of file otmlnode.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rawValue()

std::string OTMLNode::rawValue ( )
inline

Definition at line 39 of file otmlnode.h.

Here is the caller graph for this function:

◆ removeChild()

bool OTMLNode::removeChild ( const OTMLNodePtr oldChild)

Definition at line 124 of file otmlnode.cpp.

Here is the caller graph for this function:

◆ replaceChild()

bool OTMLNode::replaceChild ( const OTMLNodePtr oldChild,
const OTMLNodePtr newChild 
)

Definition at line 134 of file otmlnode.cpp.

Here is the caller graph for this function:

◆ setNull()

void OTMLNode::setNull ( bool  null)
inline

Definition at line 52 of file otmlnode.h.

Here is the caller graph for this function:

◆ setSource()

void OTMLNode::setSource ( const std::string &  source)
inline

Definition at line 54 of file otmlnode.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setTag()

void OTMLNode::setTag ( const std::string &  tag)
inline

Definition at line 50 of file otmlnode.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setUnique()

void OTMLNode::setUnique ( bool  unique)
inline

Definition at line 53 of file otmlnode.h.

Here is the caller graph for this function:

◆ setValue()

void OTMLNode::setValue ( const std::string &  value)
inline

Definition at line 51 of file otmlnode.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ size()

int OTMLNode::size ( )
inline

Definition at line 37 of file otmlnode.h.

Here is the caller graph for this function:

◆ source()

std::string OTMLNode::source ( )
inline

Definition at line 38 of file otmlnode.h.

Here is the caller graph for this function:

◆ tag()

std::string OTMLNode::tag ( )
inline

Definition at line 36 of file otmlnode.h.

Here is the caller graph for this function:

◆ value()

template<typename T >
T OTMLNode::value

Definition at line 122 of file otmlnode.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ valueAt() [1/2]

template<typename T >
T OTMLNode::valueAt ( const std::string &  childTag)

Definition at line 130 of file otmlnode.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ valueAt() [2/2]

template<typename T >
T OTMLNode::valueAt ( const std::string &  childTag,
const T &  def 
)

Definition at line 142 of file otmlnode.h.

Here is the call graph for this function:

◆ valueAtIndex() [1/2]

template<typename T >
T OTMLNode::valueAtIndex ( int  childIndex)

Definition at line 136 of file otmlnode.h.

Here is the call graph for this function:

◆ valueAtIndex() [2/2]

template<typename T >
T OTMLNode::valueAtIndex ( int  childIndex,
const T &  def 
)

Definition at line 150 of file otmlnode.h.

Here is the call graph for this function:

◆ write()

template<typename T >
void OTMLNode::write ( const T &  v)

Definition at line 157 of file otmlnode.h.

Here is the caller graph for this function:

◆ writeAt()

template<typename T >
void OTMLNode::writeAt ( const std::string &  childTag,
const T &  v 
)

Definition at line 162 of file otmlnode.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ writeIn()

template<typename T >
void OTMLNode::writeIn ( const T &  v)

Definition at line 170 of file otmlnode.h.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ m_children

OTMLNodeList OTMLNode::m_children
protected

Definition at line 97 of file otmlnode.h.

◆ m_null

bool OTMLNode::m_null
protected

Definition at line 102 of file otmlnode.h.

◆ m_source

std::string OTMLNode::m_source
protected

Definition at line 100 of file otmlnode.h.

◆ m_tag

std::string OTMLNode::m_tag
protected

Definition at line 98 of file otmlnode.h.

◆ m_unique

bool OTMLNode::m_unique
protected

Definition at line 101 of file otmlnode.h.

◆ m_value

std::string OTMLNode::m_value
protected

Definition at line 99 of file otmlnode.h.


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