OmniEvents
OmniEvents::PersistNode Class Reference

#include <PersistNode.h>

Public Member Functions

 PersistNode ()
 Create an empty node. More...
 
 PersistNode (istream &is)
 Create root node and read tree from stream. More...
 
 ~PersistNode ()
 Free node and all its children. More...
 
void output (ostream &os, string name) const
 
bool readnode (istream &is)
 
bool readtoken (istream &is, string &tok)
 
PersistNodeaddnode (const string &name)
 
void delnode (const string &name)
 
void addattr (const string &keyvalue)
 
void addattr (const string &key, long value)
 
bool hasAttr (const string &key) const
 
string attrString (const string &key, const string &fallback="") const
 
long attrLong (const string &key, long fallback=0) const
 
PersistNodechild (const string &key) const
 

Public Attributes

map< string, PersistNode * > _child
 
map< string, string > _attr
 

Friends

class omniEventsLog
 

Detailed Description

Definition at line 48 of file PersistNode.h.

Constructor & Destructor Documentation

◆ PersistNode() [1/2]

OmniEvents::PersistNode::PersistNode ( )
inline

Create an empty node.

Definition at line 51 of file PersistNode.h.

Referenced by addnode().

◆ PersistNode() [2/2]

OmniEvents::PersistNode::PersistNode ( istream &  is)

Create root node and read tree from stream.

Definition at line 33 of file PersistNode.cc.

References readnode().

◆ ~PersistNode()

OmniEvents::PersistNode::~PersistNode ( )

Free node and all its children.

Definition at line 38 of file PersistNode.cc.

References _child.

Member Function Documentation

◆ addattr() [1/2]

void OmniEvents::PersistNode::addattr ( const string &  key,
long  value 
)

Definition at line 144 of file PersistNode.cc.

References _attr.

◆ addattr() [2/2]

void OmniEvents::PersistNode::addattr ( const string &  keyvalue)

Definition at line 138 of file PersistNode.cc.

References _attr.

Referenced by OmniEvents::omniEventsLog::bootstrap(), and readnode().

◆ addnode()

PersistNode * OmniEvents::PersistNode::addnode ( const string &  name)

Definition at line 98 of file PersistNode.cc.

References _child, addnode(), and PersistNode().

Referenced by addnode(), OmniEvents::omniEventsLog::bootstrap(), and readnode().

◆ attrLong()

long OmniEvents::PersistNode::attrLong ( const string &  key,
long  fallback = 0 
) const

◆ attrString()

string OmniEvents::PersistNode::attrString ( const string &  key,
const string &  fallback = "" 
) const

◆ child()

◆ delnode()

void OmniEvents::PersistNode::delnode ( const string &  name)

Definition at line 119 of file PersistNode.cc.

References _child.

Referenced by readnode().

◆ hasAttr()

bool OmniEvents::PersistNode::hasAttr ( const string &  key) const

Definition at line 151 of file PersistNode.cc.

References _attr.

Referenced by OmniEvents::ConsumerAdmin_i::ConsumerAdmin_i().

◆ output()

void OmniEvents::PersistNode::output ( ostream &  os,
string  name 
) const

Definition at line 44 of file PersistNode.cc.

References _attr, and _child.

Referenced by OmniEvents::EventChannel_i::output().

◆ readnode()

bool OmniEvents::PersistNode::readnode ( istream &  is)
inline

Definition at line 67 of file PersistNode.cc.

References addattr(), addnode(), delnode(), and readtoken().

Referenced by PersistNode().

◆ readtoken()

bool OmniEvents::PersistNode::readtoken ( istream &  is,
string &  tok 
)
inline

Definition at line 84 of file PersistNode.cc.

Referenced by readnode().

Friends And Related Function Documentation

◆ omniEventsLog

friend class omniEventsLog
friend

Definition at line 74 of file PersistNode.h.

Member Data Documentation

◆ _attr

map<string,string> OmniEvents::PersistNode::_attr

◆ _child


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