evio  5.3
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
evio::evioDOMNode Class Referenceabstract

Virtual class represents an evio node in memory, concrete sub-classes evioDOMContainerNode and evioDOMLeafNode are hidden from users. More...

#include <evioUtil.hxx>

Inheritance diagram for evio::evioDOMNode:
evio::evioDOMLeafNode< uint32_t > evio::evioDOMContainerNode evio::evioDOMLeafNode< T > evio::evioCompositeDOMLeafNode

Public Member Functions

virtual ~evioDOMNode ()=default
 
virtual void addNode (evioDOMNodeP node)
 Adds node to container node. More...
 
void append (const string &s)
 Appends string to leaf node. More...
 
void append (const char *s)
 Appends const char* to leaf node. More...
 
void append (char *s)
 Appends char* to leaf node. More...
 
void append (const char **ca, int len)
 Appends array of const char* to leaf node. More...
 
void append (char **ca, int len)
 Appends array of const char* to leaf node. More...
 
template<typename T >
void append (T tVal)
 
template<typename T >
void append (const vector< T > &tVec)
 
template<typename T >
void append (const T *tBuf, int len)
 
template<typename T >
void replace (const vector< T > &tVec)
 
template<typename T >
void replace (const T *tBuf, int len)
 
virtual evioDOMNodeP cut ()
 Cleanly removes node from tree or node hierarchy. More...
 
virtual void cutAndDelete ()
 Cleanly removes node from tree or node hierarchy and recursively deletes node and its contents. More...
 
virtual evioDOMNodeP move (evioDOMNodeP newParent)
 Changes node parent. More...
 
virtual bool operator== (uint16_t tag) const
 True if node tag equals value. More...
 
virtual bool operator!= (uint16_t tag) const
 True if node tag does not equal value. More...
 
bool operator== (evioDictEntry tnPair) const
 True if node tag and num same as in evioDictEntry pair. More...
 
bool operator!= (evioDictEntry tnPair) const
 True if node tag and num NOT the same as in evioDictEntry pair. More...
 
evioDOMNodeoperator<< (evioDOMNodeP node)
 Adds node to container node. More...
 
evioDOMNodeoperator<< (const string &s)
 Appends single string to leaf node. More...
 
evioDOMNodeoperator<< (const char *s)
 Appends single const char* to leaf node. More...
 
evioDOMNodeoperator<< (char *s)
 Appends single char* to leaf node. More...
 
template<typename T >
evioDOMNodeoperator<< (T tVal)
 
template<typename T >
evioDOMNodeoperator<< (const vector< T > &tVec)
 
evioDOMNodeListgetChildList ()
 Returns pointer to child list of container node. More...
 
evioDOMNodeListP getChildren ()
 Returns copy of child list of container node. More...
 
template<class Predicate >
evioDOMNodeListP getChildren (Predicate pred)
 
template<typename T >
vector< T > * getVector ()
 
virtual string toString () const
 Returns XML string listing container node contents. More...
 
virtual string getHeader (int depth, const evioToStringConfig *config=&defaultToStringConfig) const =0
 
virtual string getBody (int depth, const evioToStringConfig *config=&defaultToStringConfig) const =0
 
virtual string getFooter (int depth, const evioToStringConfig *config=&defaultToStringConfig) const =0
 
virtual int getSize () const =0
 
evioDOMNodeP getParent () const
 Returns parent evioDOMNode. More...
 
int getContentType () const
 Returns content type. More...
 
evioDOMTreegetParentTree () const
 Returns parent evioDOMTree. More...
 
bool isContainer () const
 True if node is a container node. More...
 
bool isLeaf () const
 True if node is a leaf node. More...
 

Static Public Member Functions

static evioDOMNodeP createEvioDOMNode (uint16_t tag, uint8_t num, ContainerType cType=BANK)
 Static factory method to create container node. More...
 
template<typename T >
static evioDOMNodeP createEvioDOMNode (uint16_t tag, uint8_t num)
 
template<typename T >
static evioDOMNodeP createEvioDOMNode (uint16_t tag, uint8_t num, const vector< T > &tVec)
 
template<typename T >
static evioDOMNodeP createEvioDOMNode (uint16_t tag, uint8_t num, const T *t, int len)
 
static evioDOMNodeP createEvioDOMNode (uint16_t tag, uint8_t num, const evioSerializable &o, ContainerType cType=BANK)
 Static factory method to create container node holding evioSerializable object. More...
 
static evioDOMNodeP createEvioDOMNode (uint16_t tag, uint8_t num, void(*f)(evioDOMNodeP c, void *userArg), void *userArg, ContainerType cType=BANK)
 Static factory method to create container node using C function to fill container. More...
 
template<typename T >
static evioDOMNodeP createEvioDOMNode (uint16_t tag, uint8_t num, T *t, void *userArg, ContainerType cType=BANK)
 
template<typename T >
static evioDOMNodeP createEvioDOMNode (uint16_t tag, uint8_t num, T *t, void *T::*mfp(evioDOMNodeP c, void *userArg), void *userArg, ContainerType cType=BANK)
 
static evioDOMNodeP createEvioDOMNode (uint16_t tag, uint8_t num, uint16_t formatTag, const string &formatString, uint16_t dataTag, uint8_t dataNum, const vector< uint32_t > &tVec)
 Static factory method to create composite leaf node. More...
 
static evioDOMNodeP createEvioDOMNode (uint16_t tag, uint8_t num, uint16_t formatTag, const string &formatString, uint16_t dataTag, uint8_t dataNum, const uint32_t *t, int len)
 Static factory method to create composite leaf node. More...
 
static evioDOMNodeP createUnknownEvioDOMNode (uint16_t tag, uint8_t num, const vector< uint32_t > &tVec)
 Unknown type node constructor used internally. More...
 
static evioDOMNodeP createUnknownEvioDOMNode (uint16_t tag, uint8_t num, const uint32_t *t, int len)
 Unknown type node constructor used internally. More...
 
static evioDOMNodeP createEvioDOMNode (const string &name, const evioDictionary *dictionary, ContainerType cType=BANK)
 Static factory method to create container node. More...
 
template<typename T >
static evioDOMNodeP createEvioDOMNode (const string &name, const evioDictionary *dictionary)
 
template<typename T >
static evioDOMNodeP createEvioDOMNode (const string &name, const evioDictionary *dictionary, const vector< T > &tVec)
 
template<typename T >
static evioDOMNodeP createEvioDOMNode (const string &name, const evioDictionary *dictionary, const T *t, int len)
 
static evioDOMNodeP createEvioDOMNode (const string &name, const evioDictionary *dictionary, const evioSerializable &o, ContainerType cType=BANK)
 Static factory method to create container node holding evioSerializable object. More...
 
static evioDOMNodeP createEvioDOMNode (const string &name, const evioDictionary *dictionary, void(*f)(evioDOMNodeP c, void *userArg), void *userArg, ContainerType cType=BANK)
 Static factory method to create container node using C function to fill container. More...
 
template<typename T >
static evioDOMNodeP createEvioDOMNode (const string &name, const evioDictionary *dictionary, T *t, void *userArg, ContainerType cType=BANK)
 
template<typename T >
static evioDOMNodeP createEvioDOMNode (const string &name, const evioDictionary *dictionary, T *t, void *T::*mfp(evioDOMNodeP c, void *userArg), void *userArg, ContainerType cType=BANK)
 
static evioDOMNodeP createEvioDOMNode (const string &name, const evioDictionary *dictionary, uint16_t formatTag, const string &formatString, uint16_t dataTag, uint8_t dataNum, const vector< uint32_t > &tVec)
 Static factory method to create composite leaf node. More...
 
static evioDOMNodeP createEvioDOMNode (const string &name, const evioDictionary *dictionary, uint16_t formatTag, const string &formatString, uint16_t dataTag, uint8_t dataNum, const uint32_t *t, int len)
 Static factory method to create composite leaf node. More...
 
static evioDOMNodeP createUnknownEvioDOMNode (const string &name, const evioDictionary *dictionary, const vector< uint32_t > &tVec)
 Unknown type node constructor used internally. More...
 
static evioDOMNodeP createUnknownEvioDOMNode (const string &name, const evioDictionary *dictionary, const uint32_t *t, int len)
 Unknown type node constructor used internally. More...
 

Public Attributes

uint16_t tag
 The node tag, max 16-bits depending on container type. More...
 
uint8_t num
 The node num, max 8 bits, used by BANK and String container types (2-word header). More...
 

Protected Member Functions

 evioDOMNode (evioDOMNodeP parent, uint16_t tag, uint8_t num, int contentType)
 Container node constructor used internally. More...
 
 evioDOMNode (evioDOMNodeP parent, const string &name, const evioDictionary *dictionary, int contentType)
 Container node constructor used internally. More...
 

Static Protected Member Functions

static string getIndent (int depth, int size=3)
 Returns indent for pretty-printing, used internally. More...
 

Protected Attributes

evioDOMNodeP parent
 Pointer to node parent. More...
 
evioDOMTreeparentTree
 Pointer to parent tree if this node is the root. More...
 
int contentType
 Content type. More...
 

Friends

class evioDOMTree
 Allows evioDOMTree class to manipulate nodes. More...
 

Detailed Description

Virtual class represents an evio node in memory, concrete sub-classes evioDOMContainerNode and evioDOMLeafNode are hidden from users.

Users work with nodes via this class, and create nodes via factory method createEvioDOMNode. Factory model ensures nodes are created on heap.

Constructor & Destructor Documentation

◆ evioDOMNode() [1/2]

evioDOMNode::evioDOMNode ( evioDOMNodeP  par,
uint16_t  tag,
uint8_t  num,
int  contentType 
)
protected

Container node constructor used internally.

Parameters
parParent node
tagNode tag
numNode num
contentTypeContainer node content type

◆ evioDOMNode() [2/2]

evioDOMNode::evioDOMNode ( evioDOMNodeP  par,
const string &  name,
const evioDictionary dictionary,
int  contentType 
)
protected

Container node constructor used internally.

Parameters
parParent node
nameBank name @parem dictionary Dictionary to use
contentTypeContainer node content type

References evio::evioDictionary::getEntry(), evio::evioDictEntry::getNum(), evio::evioDictEntry::getTag(), num, and tag.

◆ ~evioDOMNode()

virtual evio::evioDOMNode::~evioDOMNode ( )
virtualdefault

Member Function Documentation

◆ addNode()

void evioDOMNode::addNode ( evioDOMNodeP  node)
virtual

Adds node to container node.

Parameters
nodeNode to be added

References isContainer(), and move().

Referenced by operator<<().

◆ append() [1/8]

void evioDOMNode::append ( char **  ca,
int  len 
)

Appends array of const char* to leaf node.

Parameters
saarray of char* to append

References append().

◆ append() [2/8]

void evioDOMNode::append ( char *  s)

Appends char* to leaf node.

Parameters
schar* to append

References append().

◆ append() [3/8]

void evioDOMNode::append ( const char **  ca,
int  len 
)

Appends array of const char* to leaf node.

Parameters
saarray of char* to append

References contentType, and evio::evioDOMLeafNode< T >::data.

◆ append() [4/8]

void evioDOMNode::append ( const char *  s)

Appends const char* to leaf node.

Parameters
schar* to append

References contentType, and evio::evioDOMLeafNode< T >::data.

◆ append() [5/8]

void evioDOMNode::append ( const string &  s)

Appends string to leaf node.

Parameters
sstring to append

References contentType, and evio::evioDOMLeafNode< T >::data.

Referenced by append(), and operator<<().

◆ append() [6/8]

template<typename T >
void evio::evioDOMNode::append ( const T *  tBuf,
int  len 
)

◆ append() [7/8]

template<typename T >
void evio::evioDOMNode::append ( const vector< T > &  tVec)

◆ append() [8/8]

template<typename T >
void evio::evioDOMNode::append ( tVal)

◆ createEvioDOMNode() [1/20]

template<typename T >
static evioDOMNodeP evio::evioDOMNode::createEvioDOMNode ( const string &  name,
const evioDictionary dictionary 
)
static

◆ createEvioDOMNode() [2/20]

evioDOMNodeP evioDOMNode::createEvioDOMNode ( const string &  name,
const evioDictionary dictionary,
const evioSerializable o,
ContainerType  cType = BANK 
)
static

Static factory method to create container node holding evioSerializable object.

Parameters
nameNode name
dictionaryDictionary to use
oevioSerializable object
cTypeContainer node content type
Returns
Pointer to new node

References evio::evioDictionary::getEntry(), evio::evioDictEntry::getNum(), evio::evioDictEntry::getTag(), and evio::evioSerializable::serialize().

◆ createEvioDOMNode() [3/20]

template<typename T >
static evioDOMNodeP evio::evioDOMNode::createEvioDOMNode ( const string &  name,
const evioDictionary dictionary,
const T *  t,
int  len 
)
static

◆ createEvioDOMNode() [4/20]

template<typename T >
static evioDOMNodeP evio::evioDOMNode::createEvioDOMNode ( const string &  name,
const evioDictionary dictionary,
const vector< T > &  tVec 
)
static

◆ createEvioDOMNode() [5/20]

evioDOMNodeP evioDOMNode::createEvioDOMNode ( const string &  name,
const evioDictionary dictionary,
ContainerType  cType = BANK 
)
static

Static factory method to create container node.

Parameters
nameNode name
dictionaryDictionary to use
cTypeContainer node content type
Returns
Pointer to new node

References evio::evioDictionary::getEntry(), evio::evioDictEntry::getNum(), and evio::evioDictEntry::getTag().

◆ createEvioDOMNode() [6/20]

template<typename T >
static evioDOMNodeP evio::evioDOMNode::createEvioDOMNode ( const string &  name,
const evioDictionary dictionary,
T *  t,
void *T::*  mfpevioDOMNodeP c, void *userArg,
void *  userArg,
ContainerType  cType = BANK 
)
static

◆ createEvioDOMNode() [7/20]

template<typename T >
static evioDOMNodeP evio::evioDOMNode::createEvioDOMNode ( const string &  name,
const evioDictionary dictionary,
T *  t,
void *  userArg,
ContainerType  cType = BANK 
)
static

◆ createEvioDOMNode() [8/20]

evioDOMNodeP evioDOMNode::createEvioDOMNode ( const string &  name,
const evioDictionary dictionary,
uint16_t  formatTag,
const string &  formatString,
uint16_t  dataTag,
uint8_t  dataNum,
const uint32_t *  t,
int  len 
)
static

Static factory method to create composite leaf node.

Parameters
nameNode name
dictionaryDictionary to use
formatTagFormat tag
formatStringFormat string
dataTagData tag
dataNumData num
tPointer to array of uint32_t data
lenLength of array
Returns
Pointer to new node

References evio::evioDictionary::getEntry(), evio::evioDictEntry::getNum(), and evio::evioDictEntry::getTag().

◆ createEvioDOMNode() [9/20]

evioDOMNodeP evioDOMNode::createEvioDOMNode ( const string &  name,
const evioDictionary dictionary,
uint16_t  formatTag,
const string &  formatString,
uint16_t  dataTag,
uint8_t  dataNum,
const vector< uint32_t > &  tVec 
)
static

Static factory method to create composite leaf node.

Parameters
nameNode name
dictionaryDictionary to use
formatTagFormat tag
formatStringFormat string
dataTagData tag
dataNumData num
tVecvector<uint32_t> of data
Returns
Pointer to new node

References evio::evioDictionary::getEntry(), evio::evioDictEntry::getNum(), and evio::evioDictEntry::getTag().

◆ createEvioDOMNode() [10/20]

evioDOMNodeP evioDOMNode::createEvioDOMNode ( const string &  name,
const evioDictionary dictionary,
void(*)(evioDOMNodeP c, void *userArg)  f,
void *  userArg,
ContainerType  cType = BANK 
)
static

Static factory method to create container node using C function to fill container.

Parameters
nameNode name
dictionaryDictionary to use
fC function that fills container node
userArgUser arg passed to C function
cTypeContainer node content type
Returns
Pointer to new node

References evio::evioDictionary::getEntry(), evio::evioDictEntry::getNum(), and evio::evioDictEntry::getTag().

◆ createEvioDOMNode() [11/20]

template<typename T >
static evioDOMNodeP evio::evioDOMNode::createEvioDOMNode ( uint16_t  tag,
uint8_t  num 
)
static

◆ createEvioDOMNode() [12/20]

evioDOMNodeP evioDOMNode::createEvioDOMNode ( uint16_t  tag,
uint8_t  num,
const evioSerializable o,
ContainerType  cType = BANK 
)
static

Static factory method to create container node holding evioSerializable object.

Parameters
tagNode tag
numNode num
oevioSerializable object
cTypeContainer node content type
Returns
Pointer to new node

References num, evio::evioSerializable::serialize(), and tag.

◆ createEvioDOMNode() [13/20]

template<typename T >
static evioDOMNodeP evio::evioDOMNode::createEvioDOMNode ( uint16_t  tag,
uint8_t  num,
const T *  t,
int  len 
)
static

◆ createEvioDOMNode() [14/20]

template<typename T >
static evioDOMNodeP evio::evioDOMNode::createEvioDOMNode ( uint16_t  tag,
uint8_t  num,
const vector< T > &  tVec 
)
static

◆ createEvioDOMNode() [15/20]

evioDOMNodeP evioDOMNode::createEvioDOMNode ( uint16_t  tag,
uint8_t  num,
ContainerType  cType = BANK 
)
static

Static factory method to create container node.

Parameters
tagNode tag
numNode num
cTypeContainer node content type
Returns
Pointer to new node

References num, and tag.

Referenced by evio::evioDOMTree::addBank(), evio::evioDOMTree::createNode(), createUnknownEvioDOMNode(), and evio::evioDOMTree::evioDOMTree().

◆ createEvioDOMNode() [16/20]

template<typename T >
static evioDOMNodeP evio::evioDOMNode::createEvioDOMNode ( uint16_t  tag,
uint8_t  num,
T *  t,
void *T::*  mfpevioDOMNodeP c, void *userArg,
void *  userArg,
ContainerType  cType = BANK 
)
static

◆ createEvioDOMNode() [17/20]

template<typename T >
static evioDOMNodeP evio::evioDOMNode::createEvioDOMNode ( uint16_t  tag,
uint8_t  num,
T *  t,
void *  userArg,
ContainerType  cType = BANK 
)
static

◆ createEvioDOMNode() [18/20]

evioDOMNodeP evioDOMNode::createEvioDOMNode ( uint16_t  tag,
uint8_t  num,
uint16_t  formatTag,
const string &  formatString,
uint16_t  dataTag,
uint8_t  dataNum,
const uint32_t *  t,
int  len 
)
static

Static factory method to create composite leaf node.

Parameters
tagNode tag
numNode num
formatTagFormat tag
formatStringFormat string
dataTagData tag
dataNumData num
tPointer to uint32_t data
lenLength of data array
Returns
Pointer to new node

References num, and tag.

◆ createEvioDOMNode() [19/20]

evioDOMNodeP evioDOMNode::createEvioDOMNode ( uint16_t  tag,
uint8_t  num,
uint16_t  formatTag,
const string &  formatString,
uint16_t  dataTag,
uint8_t  dataNum,
const vector< uint32_t > &  tVec 
)
static

Static factory method to create composite leaf node.

Parameters
tagNode tag
numNode num
formatTagFormat tag
formatStringFormat string
dataTagData tag
dataNumData num
tVecvector<uint32_t> of data
Returns
Pointer to new node

References num, and tag.

◆ createEvioDOMNode() [20/20]

evioDOMNodeP evioDOMNode::createEvioDOMNode ( uint16_t  tag,
uint8_t  num,
void(*)(evioDOMNodeP c, void *userArg)  f,
void *  userArg,
ContainerType  cType = BANK 
)
static

Static factory method to create container node using C function to fill container.

Parameters
tagNode tag
numNode num
fC function that fills container node
userArgUser arg passed to C function
cTypeContainer node content type
Returns
Pointer to new node

References num, and tag.

◆ createUnknownEvioDOMNode() [1/4]

evioDOMNodeP evioDOMNode::createUnknownEvioDOMNode ( const string &  name,
const evioDictionary dictionary,
const uint32_t *  t,
int  len 
)
static

Unknown type node constructor used internally.

Parameters
nameName
dictionaryDictionary
tPointer to array of uint32_t
lenLength of array
Returns
Pointer to new node

References contentType, createEvioDOMNode(), evio::evioDictionary::getEntry(), evio::evioDictEntry::getNum(), and evio::evioDictEntry::getTag().

◆ createUnknownEvioDOMNode() [2/4]

evioDOMNodeP evioDOMNode::createUnknownEvioDOMNode ( const string &  name,
const evioDictionary dictionary,
const vector< uint32_t > &  tVec 
)
static

Unknown type node constructor used internally.

Parameters
nameName
dictionaryDictionary
tVecVector of uint32_t
Returns
Pointer to new node

References contentType, createEvioDOMNode(), evio::evioDictionary::getEntry(), evio::evioDictEntry::getNum(), and evio::evioDictEntry::getTag().

◆ createUnknownEvioDOMNode() [3/4]

evioDOMNodeP evioDOMNode::createUnknownEvioDOMNode ( uint16_t  tag,
uint8_t  num,
const uint32_t *  t,
int  len 
)
static

Unknown type node constructor used internally.

Parameters
tagTag
numNum
tPointer to uint32_t array
lenLength of array
Returns
Pointer to new node

References contentType, createEvioDOMNode(), num, and tag.

◆ createUnknownEvioDOMNode() [4/4]

evioDOMNodeP evioDOMNode::createUnknownEvioDOMNode ( uint16_t  tag,
uint8_t  num,
const vector< uint32_t > &  tVec 
)
static

Unknown type node constructor used internally.

Parameters
tagTag
numNum
tVecVector of uint32_t
Returns
Pointer to new node

References contentType, createEvioDOMNode(), num, and tag.

◆ cut()

evioDOMNodeP evioDOMNode::cut ( )
virtual

Cleanly removes node from tree or node hierarchy.

Returns
Pointer to now liberated node

References evio::evioDOMContainerNode::childList, parent, parentTree, and evio::evioDOMTree::root.

Referenced by evio::evioDOMTree::addBank(), cutAndDelete(), and move().

◆ cutAndDelete()

void evioDOMNode::cutAndDelete ( )
virtual

Cleanly removes node from tree or node hierarchy and recursively deletes node and its contents.

References cut().

Referenced by evio::evioDOMTree::clear(), and evio::evioDOMTree::~evioDOMTree().

◆ getBody()

virtual string evio::evioDOMNode::getBody ( int  depth,
const evioToStringConfig config = &defaultToStringConfig 
) const
pure virtual

◆ getChildList()

evioDOMNodeList * evioDOMNode::getChildList ( )

Returns pointer to child list of container node.

Returns
Pointer to internal child list

References isContainer().

Referenced by getChildren().

◆ getChildren() [1/2]

evioDOMNodeListP evioDOMNode::getChildren ( )

Returns copy of child list of container node.

List must be deleted by user

Returns
Copy of child list

References getChildList().

◆ getChildren() [2/2]

template<class Predicate >
evioDOMNodeListP evio::evioDOMNode::getChildren ( Predicate  pred)

◆ getContentType()

int evioDOMNode::getContentType ( ) const

Returns content type.

Returns
Content type

References contentType.

Referenced by evio::evioDOMContainerNode::getFooter(), and evio::evioDOMContainerNode::getHeader().

◆ getFooter()

virtual string evio::evioDOMNode::getFooter ( int  depth,
const evioToStringConfig config = &defaultToStringConfig 
) const
pure virtual

◆ getHeader()

virtual string evio::evioDOMNode::getHeader ( int  depth,
const evioToStringConfig config = &defaultToStringConfig 
) const
pure virtual

◆ getIndent()

string evioDOMNode::getIndent ( int  depth,
int  size = 3 
)
staticprotected

Returns indent for pretty-printing, used internally.

Parameters
depthDepth level
sizeSize of indent per level
Returns
String containing proper number of indent spaces for this depth

Referenced by evio::evioCompositeDOMLeafNode::getBody(), evio::evioDOMContainerNode::getFooter(), and evio::evioDOMContainerNode::getHeader().

◆ getParent()

evioDOMNodeP evioDOMNode::getParent ( ) const

Returns parent evioDOMNode.

Returns
Pointer to parent evioDOMNode

References parent.

◆ getParentTree()

evioDOMTree * evioDOMNode::getParentTree ( ) const

Returns parent evioDOMTree.

Returns
Pointer to parent evioDOMTree

References parentTree.

◆ getSize()

virtual int evio::evioDOMNode::getSize ( ) const
pure virtual

◆ getVector()

template<typename T >
vector<T>* evio::evioDOMNode::getVector ( )

◆ isContainer()

bool evioDOMNode::isContainer ( ) const

True if node is a container node.

Returns
true if node is a container

References contentType.

Referenced by evio::evioDOMTree::addBank(), addNode(), getChildList(), and move().

◆ isLeaf()

bool evioDOMNode::isLeaf ( ) const

True if node is a leaf node.

Returns
true if node is a leaf

References contentType.

Referenced by toString().

◆ move()

evioDOMNodeP evioDOMNode::move ( evioDOMNodeP  newParent)
virtual

Changes node parent.

Parameters
newParentNew parent
Returns
Pointer to now node just moved

References evio::evioDOMContainerNode::childList, cut(), isContainer(), and parent.

Referenced by addNode().

◆ operator!=() [1/2]

bool evioDOMNode::operator!= ( evioDictEntry  tnPair) const

True if node tag and num NOT the same as in evioDictEntry pair.

Parameters
tnPairevioDictEntry pair to compare to
Returns
true if tag and num disagree

References evio::evioDictEntry::getNum(), and evio::evioDictEntry::getTag().

◆ operator!=() [2/2]

bool evioDOMNode::operator!= ( uint16_t  tg) const
virtual

True if node tag does not equal value.

Parameters
tgValue to compare to
Returns
true if tags disagree

◆ operator<<() [1/6]

evioDOMNode & evioDOMNode::operator<< ( char *  s)

Appends single char* to leaf node.

Parameters
schar* to be added
Returns
Reference to this

References append().

◆ operator<<() [2/6]

evioDOMNode & evioDOMNode::operator<< ( const char *  s)

Appends single const char* to leaf node.

Parameters
schar* to be added
Returns
Reference to this

References append().

◆ operator<<() [3/6]

evioDOMNode & evioDOMNode::operator<< ( const string &  s)

Appends single string to leaf node.

Parameters
sRefString to be added
Returns
Reference to this

References append().

◆ operator<<() [4/6]

template<typename T >
evioDOMNode& evio::evioDOMNode::operator<< ( const vector< T > &  tVec)

◆ operator<<() [5/6]

evioDOMNode & evioDOMNode::operator<< ( evioDOMNodeP  node)

Adds node to container node.

Parameters
nodeNode to be added
Returns
Reference to node to be added

References addNode().

◆ operator<<() [6/6]

template<typename T >
evioDOMNode& evio::evioDOMNode::operator<< ( tVal)

◆ operator==() [1/2]

bool evioDOMNode::operator== ( evioDictEntry  tnPair) const

True if node tag and num same as in evioDictEntry pair.

Parameters
tnPairevioDictEntry pair to compare to
Returns
true if tag and num agree

References evio::evioDictEntry::getNum(), and evio::evioDictEntry::getTag().

◆ operator==() [2/2]

bool evioDOMNode::operator== ( uint16_t  tg) const
virtual

True if node tag equals value.

Parameters
tgValue to compare to
Returns
true if tags agree

◆ replace() [1/2]

template<typename T >
void evio::evioDOMNode::replace ( const T *  tBuf,
int  len 
)

◆ replace() [2/2]

template<typename T >
void evio::evioDOMNode::replace ( const vector< T > &  tVec)

◆ toString()

string evioDOMNode::toString ( ) const
virtual

Returns XML string listing container node contents.

Returns
XML string listing contents

References getFooter(), getHeader(), getSize(), and isLeaf().

Friends And Related Function Documentation

◆ evioDOMTree

friend class evioDOMTree
friend

Allows evioDOMTree class to manipulate nodes.

Member Data Documentation

◆ contentType

◆ num

uint8_t evio::evioDOMNode::num

◆ parent

◆ parentTree

evioDOMTree* evio::evioDOMNode::parentTree
protected

Pointer to parent tree if this node is the root.

Referenced by evio::evioDOMTree::addBank(), cut(), evio::evioDOMTree::evioDOMTree(), and getParentTree().

◆ tag

uint16_t evio::evioDOMNode::tag

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