Simulacrum  1.2
Classes | Public Types | Public Member Functions | Static Public Member Functions | List of all members
Simulacrum::NNode Class Reference

#include <nnode.h>

Inheritance diagram for Simulacrum::NNode:
Inheritance graph
Collaboration diagram for Simulacrum::NNode:
Collaboration graph

Classes

struct  XMLParseRes
 

Public Types

typedef std::unordered_multimap< std::string, NNode * > ChildMap
 
typedef char XMLCharType
 
typedef std::vector< XMLCharTypeXMLDataStore
 

Public Member Functions

 NNode ()
 
 NNode (NNode &)
 
 NNode (const NNode &)
 
virtual ~NNode ()
 
void clear () override
 
void detachNode () override
 
bool removeNode () override
 
bool good () const
 
XMLParseRes loadFromXMLFile (const std::string &xmlfile)
 
XMLParseRes loadFromXML (std::stringstream &)
 
bool storeToXMLFile (const std::string &xmlfile, bool append=false)
 
bool storeToXML (std::stringstream &)
 
void printTree (unsigned depth=0)
 
unsigned childNodeCount (const std::string &)
 
bool hasChildNode (const std::string &)
 
NNodegetChildNode (const std::string &)
 
NNodexmlRootNode ()
 
ChildMapgetChildNodes ()
 
bool hasParentNode ()
 
NNodegetParentNode ()
 
NNodeaddChildNode (NNode &)
 
NNodeaddChildNode (NNode *)
 
NNodeoperator= (NNode &)
 
bool hasAttribute (const std::string &) override
 
std::string getAttribute (const std::string &) override
 
void setAttribute (const std::string &, const std::string &) override
 
const std::string & getName () const
 
void setName (const std::string &)
 
std::string getData () const
 
void setData (const std::string &)
 
XMLDataStoredata ()
 
std::string NodeID () override
 
void NodeID (const std::string &) override
 
std::string NodeType () override
 
unsigned long NodeSize () override
 
std::string NodeName () override
 
void NodeName (const std::string &) override
 
std::string NodeValue () override
 
void NodeValue (const std::string &) override
 
unsigned long NodeChildrenNum (bool strict=false) override
 
SAbsTreeNodeList_t NodeChildren (bool strict=false, bool simpleonly=false) override
 
bool NodePathExists (const std::string &) override
 
SAbsTreeNodeNodeByPath (const std::string &) override
 
SAbsTreeNodeNodeParent () override
 
bool hasNodeParent () override
 
bool NodeError () override
 
SAbsTreeNodeNewChild () override
 
std::map< std::string, std::string > getAttributes () override
 
bool isSpecial ()
 
- Public Member Functions inherited from Simulacrum::SAbsTreeNode
virtual void NodeType (const std::string &)
 
virtual void NodeSize (const std::string &)
 
virtual std::string NodeData ()
 
virtual void NodeData (const std::string &)
 
virtual SAbsTreeNodeNodeRoot ()
 
virtual std::string NodePath (bool skiptop=false)
 
virtual bool NodeEmph ()
 
virtual void copy (SAbsTreeNode &)
 
virtual ~SAbsTreeNode ()
 
virtual void clearChildren ()
 
SPtr< SAbsTreeNodequery (const std::string &)
 
virtual SAbsTreeNodequeryP (const std::string &)
 
virtual SimulacrumLibrary::str_enc stringEncoding ()
 

Static Public Member Functions

static std::string & normaliseString (std::string &)
 

Member Typedef Documentation

◆ ChildMap

typedef std::unordered_multimap<std::string, NNode*> Simulacrum::NNode::ChildMap

◆ XMLCharType

◆ XMLDataStore

Constructor & Destructor Documentation

◆ NNode() [1/3]

NNode::NNode ( )

◆ NNode() [2/3]

NNode::NNode ( NNode target)

◆ NNode() [3/3]

NNode::NNode ( const NNode )

◆ ~NNode()

NNode::~NNode ( )
virtual

Member Function Documentation

◆ addChildNode() [1/2]

NNode & NNode::addChildNode ( NNode newnode)

◆ addChildNode() [2/2]

NNode & NNode::addChildNode ( NNode newnode)

◆ childNodeCount()

unsigned NNode::childNodeCount ( const std::string &  getch)

◆ clear()

void NNode::clear ( )
overridevirtual

◆ data()

NNode::XMLDataStore & NNode::data ( )

◆ detachNode()

void NNode::detachNode ( )
overridevirtual

◆ getAttribute()

std::string NNode::getAttribute ( const std::string &  getat)
overridevirtual

Reimplemented from Simulacrum::SAbsTreeNode.

◆ getAttributes()

std::map< std::string, std::string > NNode::getAttributes ( )
overridevirtual

Reimplemented from Simulacrum::SAbsTreeNode.

◆ getChildNode()

NNode & NNode::getChildNode ( const std::string &  getch)

◆ getChildNodes()

NNode::ChildMap & NNode::getChildNodes ( )

◆ getData()

std::string NNode::getData ( ) const

◆ getName()

const std::string & NNode::getName ( ) const

◆ getParentNode()

NNode & NNode::getParentNode ( )

◆ good()

bool NNode::good ( ) const

◆ hasAttribute()

bool NNode::hasAttribute ( const std::string &  getat)
overridevirtual

Reimplemented from Simulacrum::SAbsTreeNode.

◆ hasChildNode()

bool NNode::hasChildNode ( const std::string &  getch)

◆ hasNodeParent()

bool NNode::hasNodeParent ( )
overridevirtual

◆ hasParentNode()

bool NNode::hasParentNode ( )

◆ isSpecial()

bool NNode::isSpecial ( )

◆ loadFromXML()

NNode::XMLParseRes NNode::loadFromXML ( std::stringstream &  xmlsource)

◆ loadFromXMLFile()

NNode::XMLParseRes NNode::loadFromXMLFile ( const std::string &  xmlfile)

◆ NewChild()

SAbsTreeNode & NNode::NewChild ( )
overridevirtual

◆ NodeByPath()

SAbsTreeNode & NNode::NodeByPath ( const std::string &  pathstr)
overridevirtual

◆ NodeChildren()

SAbsTreeNodeList_t NNode::NodeChildren ( bool  strict = false,
bool  simpleonly = false 
)
overridevirtual

◆ NodeChildrenNum()

long unsigned int NNode::NodeChildrenNum ( bool  strict = false)
overridevirtual

◆ NodeError()

bool NNode::NodeError ( )
overridevirtual

◆ NodeID() [1/2]

std::string NNode::NodeID ( )
overridevirtual

◆ NodeID() [2/2]

void NNode::NodeID ( const std::string &  newid)
overridevirtual

Reimplemented from Simulacrum::SAbsTreeNode.

◆ NodeName() [1/2]

std::string NNode::NodeName ( )
overridevirtual

◆ NodeName() [2/2]

void NNode::NodeName ( const std::string &  newname)
overridevirtual

Reimplemented from Simulacrum::SAbsTreeNode.

◆ NodeParent()

SAbsTreeNode & NNode::NodeParent ( )
overridevirtual

◆ NodePathExists()

bool NNode::NodePathExists ( const std::string &  pathstr)
overridevirtual

◆ NodeSize()

long unsigned int NNode::NodeSize ( )
overridevirtual

◆ NodeType()

std::string NNode::NodeType ( )
overridevirtual

◆ NodeValue() [1/2]

std::string NNode::NodeValue ( )
overridevirtual

◆ NodeValue() [2/2]

void NNode::NodeValue ( const std::string &  newdata)
overridevirtual

Reimplemented from Simulacrum::SAbsTreeNode.

◆ normaliseString()

std::string & NNode::normaliseString ( std::string &  targetstr)
static

◆ operator=()

NNode & NNode::operator= ( NNode rhs)

◆ printTree()

void NNode::printTree ( unsigned  depth = 0)

◆ removeNode()

bool NNode::removeNode ( )
overridevirtual

◆ setAttribute()

void NNode::setAttribute ( const std::string &  atn,
const std::string &  atv 
)
overridevirtual

Reimplemented from Simulacrum::SAbsTreeNode.

◆ setData()

void NNode::setData ( const std::string &  newdata)

◆ setName()

void NNode::setName ( const std::string &  newn)

◆ storeToXML()

bool NNode::storeToXML ( std::stringstream &  xmltarget)

◆ storeToXMLFile()

bool NNode::storeToXMLFile ( const std::string &  xmlfile,
bool  append = false 
)

◆ xmlRootNode()

NNode & NNode::xmlRootNode ( )

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