evio::evioDOMNode Class Reference

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::evioDOMContainerNode evio::evioDOMLeafNode< T > evio::evioDOMLeafNode< uint32_t > evio::evioCompositeDOMLeafNode

List of all members.

Public Member Functions

virtual ~evioDOMNode (void)
virtual void addNode (evioDOMNodeP node) throw (evioException)
 Adds node to container node.
void append (const string &s) throw (evioException)
 Appends string to leaf node.
void append (const char *s) throw (evioException)
 Appends const char* to leaf node.
void append (char *s) throw (evioException)
 Appends char* to leaf node.
void append (const char **ca, int len) throw (evioException)
 Appends array of const char* to leaf node.
void append (char **ca, int len) throw (evioException)
 Appends array of const char* to leaf node.
template<typename T >
void append (T tVal) throw (evioException)
 Appends one data element to leaf node.
template<typename T >
void append (const vector< T > &tVec) throw (evioException)
 Appends vector of data to leaf node.
template<typename T >
void append (const T *tBuf, int len) throw (evioException)
 Appends array of data to leaf node.
template<typename T >
void replace (const vector< T > &tVec) throw (evioException)
 Replaces data in leaf node.
template<typename T >
void replace (const T *tBuf, int len) throw (evioException)
 Replaces data in leaf node.
virtual evioDOMNodeP cut (void) throw (evioException)
 Cleanly removes node from tree or node hierarchy.
virtual void cutAndDelete (void) throw (evioException)
 Cleanly removes node from tree or node hierarchy and recursively deletes node and its contents.
virtual evioDOMNodeP move (evioDOMNodeP newParent) throw (evioException)
 Changes node parent.
virtual bool operator== (uint16_t tag) const
 True if node tag equals value.
virtual bool operator!= (uint16_t tag) const
 True if node tag does not equal value.
bool operator== (tagNum tnPair) const
 True if node tag and num same as in tagNum pair.
bool operator!= (tagNum tnPair) const
 True if node tag and num NOT the same as in tagNum pair.
evioDOMNodeoperator<< (evioDOMNodeP node) throw (evioException)
 Adds node to container node.
evioDOMNodeoperator<< (const string &s) throw (evioException)
 Appends single string to leaf node.
evioDOMNodeoperator<< (const char *s) throw (evioException)
 Appends single const char* to leaf node.
evioDOMNodeoperator<< (char *s) throw (evioException)
 Appends single char* to leaf node.
template<typename T >
evioDOMNodeoperator<< (T tVal) throw (evioException)
 Appends single data value to leaf node.
template<typename T >
evioDOMNodeoperator<< (const vector< T > &tVec) throw (evioException)
 Appends vector of data to leaf node.
evioDOMNodeListgetChildList (void) throw (evioException)
 Returns pointer to child list of container node.
evioDOMNodeListP getChildren (void) throw (evioException)
 Returns copy of child list of container node.
template<class Predicate >
evioDOMNodeListP getChildren (Predicate pred) throw (evioException)
 Returns list of children satisfying predicate.
template<typename T >
vector< T > * getVector (void) throw (evioException)
 Returns pointer to leaf node vector<T> of data Must be done this way because C++ forbids templated virtual functions...ejw, dec-2006.
virtual string toString (void) const
 Returns XML string listing container node contents.
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 (void) const =0
const evioDOMNodeP getParent (void) const
 Returns parent evioDOMNode.
int getContentType (void) const
 Returns content type.
const evioDOMTreegetParentTree (void) const
 Returns parent evioDOMTree.
bool isContainer (void) const
 True if node is a container node.
bool isLeaf (void) const
 True if node is a leaf node.

Static Public Member Functions

static evioDOMNodeP createEvioDOMNode (uint16_t tag, uint8_t num, ContainerType cType=BANK) throw (evioException)
 Static factory method to create container node.
template<typename T >
static evioDOMNodeP createEvioDOMNode (uint16_t tag, uint8_t num) throw (evioException)
 Static factory method to create empty leaf node of type T.
template<typename T >
static evioDOMNodeP createEvioDOMNode (uint16_t tag, uint8_t num, const vector< T > &tVec) throw (evioException)
 Static factory method to create leaf node of type T.
template<typename T >
static evioDOMNodeP createEvioDOMNode (uint16_t tag, uint8_t num, const T *t, int len) throw (evioException)
 Static factory method to create leaf node of type T.
static evioDOMNodeP createEvioDOMNode (uint16_t tag, uint8_t num, const evioSerializable &o, ContainerType cType=BANK) throw (evioException)
 Static factory method to create container node holding evioSerializable object.
static evioDOMNodeP createEvioDOMNode (uint16_t tag, uint8_t num, void(*f)(evioDOMNodeP c, void *userArg), void *userArg, ContainerType cType=BANK) throw (evioException)
 Static factory method to create container node using C function to fill container.
template<typename T >
static evioDOMNodeP createEvioDOMNode (uint16_t tag, uint8_t num, T *t, void *userArg, ContainerType cType=BANK) throw (evioException)
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) throw (evioException)
 Static factory method to create container node filled via object method pointer.
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) throw (evioException)
 Static factory method to create composite leaf node.
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) throw (evioException)
 Static factory method to create composite leaf node.
static evioDOMNodeP createUnknownEvioDOMNode (uint16_t tag, uint8_t num, const vector< uint32_t > &tVec) throw (evioException)
 Unknown type node constructor used internally.
static evioDOMNodeP createUnknownEvioDOMNode (uint16_t tag, uint8_t num, const uint32_t *t, int len) throw (evioException)
 Unknown type node constructor used internally.
static evioDOMNodeP createEvioDOMNode (const string &name, const evioDictionary *dictionary, ContainerType cType=BANK) throw (evioException)
 Static factory method to create container node.
template<typename T >
static evioDOMNodeP createEvioDOMNode (const string &name, const evioDictionary *dictionary) throw (evioException)
 Static factory method to create empty leaf node of type T.
template<typename T >
static evioDOMNodeP createEvioDOMNode (const string &name, const evioDictionary *dictionary, const vector< T > &tVec) throw (evioException)
 Static factory method to create leaf node of type T.
template<typename T >
static evioDOMNodeP createEvioDOMNode (const string &name, const evioDictionary *dictionary, const T *t, int len) throw (evioException)
 Static factory method to create leaf node of type T.
static evioDOMNodeP createEvioDOMNode (const string &name, const evioDictionary *dictionary, const evioSerializable &o, ContainerType cType=BANK) throw (evioException)
 Static factory method to create container node holding evioSerializable object.
static evioDOMNodeP createEvioDOMNode (const string &name, const evioDictionary *dictionary, void(*f)(evioDOMNodeP c, void *userArg), void *userArg, ContainerType cType=BANK) throw (evioException)
 Static factory method to create container node using C function to fill container.
template<typename T >
static evioDOMNodeP createEvioDOMNode (const string &name, const evioDictionary *dictionary, T *t, void *userArg, ContainerType cType=BANK) throw (evioException)
 Static factory method to create container node using serialize method to fill container.
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) throw (evioException)
 Static factory method to create container node filled via object method pointer.
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) throw (evioException)
 Static factory method to create composite leaf node.
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) throw (evioException)
 Static factory method to create composite leaf node.
static evioDOMNodeP createUnknownEvioDOMNode (const string &name, const evioDictionary *dictionary, const vector< uint32_t > &tVec) throw (evioException)
 Unknown type node constructor used internally.
static evioDOMNodeP createUnknownEvioDOMNode (const string &name, const evioDictionary *dictionary, const uint32_t *t, int len) throw (evioException)
 Unknown type node constructor used internally.

Public Attributes

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

Protected Member Functions

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

Static Protected Member Functions

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

Protected Attributes

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

Friends

class evioDOMTree
 Allows evioDOMTree class to manipulate nodes.

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::evioDOMNode ( evioDOMNodeP  par,
uint16_t  tag,
uint8_t  num,
int  contentType 
) throw (evioException) [protected]

Container node constructor used internally.

Parameters:
par Parent node
tag Node tag
num Node num
contentType Container node content type
evioDOMNode::evioDOMNode ( evioDOMNodeP  par,
const string &  name,
const evioDictionary dictionary,
int  contentType 
) throw (evioException) [protected]

Container node constructor used internally.

Parameters:
par Parent node
name Bank name dictionary Dictionary to use
contentType Container node content type
evioDOMNode::~evioDOMNode ( void   )  [virtual]

Member Function Documentation

void evioDOMNode::addNode ( evioDOMNodeP  node  )  throw (evioException) [virtual]

Adds node to container node.

Parameters:
node Node to be added
template<typename T >
void evio::evioDOMNode::append ( const T *  tBuf,
int  len 
) throw (evioException) [inline]

Appends array of data to leaf node.

Must be done this way because C++ forbids templated virtual functions...ejw, dec-2006

Parameters:
tBuf Buffer of data of type T
len Length of buffer
template<typename T >
void evio::evioDOMNode::append ( const vector< T > &  tVec  )  throw (evioException) [inline]

Appends vector of data to leaf node.

Must be done this way because C++ forbids templated virtual functions...ejw, dec-2006

Parameters:
tVec vector<T> of data to add to leaf node
template<typename T >
void evio::evioDOMNode::append ( tVal  )  throw (evioException) [inline]

Appends one data element to leaf node.

Must be done this way because C++ forbids templated virtual functions...ejw, dec-2006

Parameters:
tVal Data to be added.
void evioDOMNode::append ( char **  ca,
int  len 
) throw (evioException)

Appends array of const char* to leaf node.

Parameters:
sa array of char* to append
void evioDOMNode::append ( const char **  ca,
int  len 
) throw (evioException)

Appends array of const char* to leaf node.

Parameters:
sa array of char* to append

References evio::evioDOMLeafNode< T >::data.

void evioDOMNode::append ( char *  s  )  throw (evioException)

Appends char* to leaf node.

Parameters:
s char* to append
void evioDOMNode::append ( const char *  s  )  throw (evioException)

Appends const char* to leaf node.

Parameters:
s char* to append

References evio::evioDOMLeafNode< T >::data.

void evioDOMNode::append ( const string &  s  )  throw (evioException)

Appends string to leaf node.

Parameters:
s string to append

References evio::evioDOMLeafNode< T >::data.

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 
) throw (evioException) [static]

Static factory method to create composite leaf node.

Parameters:
name Node name
dictionary Dictionary to use
formatTag Format tag
formatString Format string
dataTag Data tag
dataNum Data num
t Pointer to array of uint32_t data
len Length of array
Returns:
Pointer to new node
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 
) throw (evioException) [static]

Static factory method to create composite leaf node.

Parameters:
name Node name
dictionary Dictionary to use
formatTag Format tag
formatString Format string
dataTag Data tag
dataNum Data num
tVec vector<uint32_t> of data
Returns:
Pointer to new node
template<typename T >
evioDOMNodeP evio::evioDOMNode::createEvioDOMNode ( const string &  name,
const evioDictionary dictionary,
T *  t,
void *T::*  mfpevioDOMNodeP c, void *userArg,
void *  userArg,
ContainerType  cType = BANK 
) throw (evioException) [inline, static]

Static factory method to create container node filled via object method pointer.

Parameters:
name Node name
dictionary Dictionary to use
t Pointer to object
mfp Pointer to object method used to fill container
userArg User arg passed to object method
cType Container node content type
Returns:
Pointer to new node
template<typename T >
evioDOMNodeP evio::evioDOMNode::createEvioDOMNode ( const string &  name,
const evioDictionary dictionary,
T *  t,
void *  userArg,
ContainerType  cType = BANK 
) throw (evioException) [inline, static]

Static factory method to create container node using serialize method to fill container.

Parameters:
name Node name
dictionary Dictionary to use
t Pointer to object having serialize method
userArg User arg passed to serialize method
cType Container node content type
Returns:
Pointer to new node
evioDOMNodeP evioDOMNode::createEvioDOMNode ( const string &  name,
const evioDictionary dictionary,
void(*)(evioDOMNodeP c, void *userArg)  f,
void *  userArg,
ContainerType  cType = BANK 
) throw (evioException) [static]

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

Parameters:
name Node name
dictionary Dictionary to use
f C function that fills container node
userArg User arg passed to C function
cType Container node content type
Returns:
Pointer to new node

References evio::evioDictionary::getTagNum().

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

Static factory method to create container node holding evioSerializable object.

Parameters:
name Node name
dictionary Dictionary to use
o evioSerializable object
cType Container node content type
Returns:
Pointer to new node
template<typename T >
evioDOMNodeP evio::evioDOMNode::createEvioDOMNode ( const string &  name,
const evioDictionary dictionary,
const T *  t,
int  len 
) throw (evioException) [inline, static]

Static factory method to create leaf node of type T.

Parameters:
name Node name
dictionary Dictionary to use
t Pointer to array containg data of type T
len Length of array
Returns:
Pointer to new node
template<typename T >
evioDOMNodeP evio::evioDOMNode::createEvioDOMNode ( const string &  name,
const evioDictionary dictionary,
const vector< T > &  tVec 
) throw (evioException) [inline, static]

Static factory method to create leaf node of type T.

Parameters:
name Node name
dictionary Dictionary to use
tVec vector<T> of data
Returns:
Pointer to new node
template<typename T >
evioDOMNodeP evio::evioDOMNode::createEvioDOMNode ( const string &  name,
const evioDictionary dictionary 
) throw (evioException) [inline, static]

Static factory method to create empty leaf node of type T.

Parameters:
name Node name
dictionary Dictionary to use
Returns:
Pointer to new node
evioDOMNodeP evioDOMNode::createEvioDOMNode ( const string &  name,
const evioDictionary dictionary,
ContainerType  cType = BANK 
) throw (evioException) [static]

Static factory method to create container node.

Parameters:
name Node name
dictionary Dictionary to use
cType Container node content type
Returns:
Pointer to new node
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 
) throw (evioException) [static]

Static factory method to create composite leaf node.

Parameters:
tag Node tag
num Node num
formatTag Format tag
formatString Format string
dataTag Data tag
dataNum Data num
t Pointer to uint32_t data
len Length of data array
Returns:
Pointer to new node
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 
) throw (evioException) [static]

Static factory method to create composite leaf node.

Parameters:
tag Node tag
num Node num
formatTag Format tag
formatString Format string
dataTag Data tag
dataNum Data num
tVec vector<uint32_t> of data
Returns:
Pointer to new node
template<typename T >
evioDOMNodeP evio::evioDOMNode::createEvioDOMNode ( uint16_t  tag,
uint8_t  num,
T *  t,
void *T::*  mfpevioDOMNodeP c, void *userArg,
void *  userArg,
ContainerType  cType = BANK 
) throw (evioException) [inline, static]

Static factory method to create container node filled via object method pointer.

Parameters:
tag Node tag
num Node num
t Pointer to object
mfp Pointer to object method used to fill container
userArg User arg passed to object method
cType Container node content type
Returns:
Pointer to new node
template<typename T >
static evioDOMNodeP evio::evioDOMNode::createEvioDOMNode ( uint16_t  tag,
uint8_t  num,
T *  t,
void *  userArg,
ContainerType  cType = BANK 
) throw (evioException) [inline, static]
evioDOMNodeP evioDOMNode::createEvioDOMNode ( uint16_t  tag,
uint8_t  num,
void(*)(evioDOMNodeP c, void *userArg)  f,
void *  userArg,
ContainerType  cType = BANK 
) throw (evioException) [static]

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

Parameters:
tag Node tag
num Node num
f C function that fills container node
userArg User arg passed to C function
cType Container node content type
Returns:
Pointer to new node
evioDOMNodeP evioDOMNode::createEvioDOMNode ( uint16_t  tag,
uint8_t  num,
const evioSerializable o,
ContainerType  cType = BANK 
) throw (evioException) [static]

Static factory method to create container node holding evioSerializable object.

Parameters:
tag Node tag
num Node num
o evioSerializable object
cType Container node content type
Returns:
Pointer to new node
template<typename T >
evioDOMNodeP evio::evioDOMNode::createEvioDOMNode ( uint16_t  tag,
uint8_t  num,
const T *  t,
int  len 
) throw (evioException) [inline, static]

Static factory method to create leaf node of type T.

Parameters:
tag Node tag
num Node num
t Pointer to array containg data of type T
len Length of array
Returns:
Pointer to new node
template<typename T >
evioDOMNodeP evio::evioDOMNode::createEvioDOMNode ( uint16_t  tag,
uint8_t  num,
const vector< T > &  tVec 
) throw (evioException) [inline, static]

Static factory method to create leaf node of type T.

Parameters:
tag Node tag
num Node num
tVec vector<T> of data
Returns:
Pointer to new node
template<typename T >
evioDOMNodeP evio::evioDOMNode::createEvioDOMNode ( uint16_t  tag,
uint8_t  num 
) throw (evioException) [inline, static]

Static factory method to create empty leaf node of type T.

Parameters:
tag Node tag
num Node num
Returns:
Pointer to new node
evioDOMNodeP evioDOMNode::createEvioDOMNode ( uint16_t  tag,
uint8_t  num,
ContainerType  cType = BANK 
) throw (evioException) [static]

Static factory method to create container node.

Parameters:
tag Node tag
num Node num
cType Container node content type
Returns:
Pointer to new node

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

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

Unknown type node constructor used internally.

Parameters:
name Name
dictionary Dictionary
t Pointer to array of uint32_t
len Length of array
Returns:
Pointer to new node

References contentType, and createEvioDOMNode().

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

Unknown type node constructor used internally.

Parameters:
name Name
dictionary Dictionary
tVec Vector of uint32_t
Returns:
Pointer to new node

References contentType, and createEvioDOMNode().

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

Unknown type node constructor used internally.

Parameters:
tag Tag
num Num
t Pointer to uint32_t array
len Length of array
Returns:
Pointer to new node

References contentType, and createEvioDOMNode().

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

Unknown type node constructor used internally.

Parameters:
tag Tag
num Num
tVec Vector of uint32_t
Returns:
Pointer to new node

References contentType, and createEvioDOMNode().

evioDOMNodeP evioDOMNode::cut ( void   )  throw (evioException) [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 cutAndDelete().

void evioDOMNode::cutAndDelete ( void   )  throw (evioException) [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().

virtual string evio::evioDOMNode::getBody ( int  depth,
const evioToStringConfig config = &defaultToStringConfig 
) const [pure virtual]
evioDOMNodeList * evioDOMNode::getChildList ( void   )  throw (evioException)

Returns pointer to child list of container node.

Returns:
Pointer to internal child list

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

Referenced by getChildren().

template<class Predicate >
evioDOMNodeListP evio::evioDOMNode::getChildren ( Predicate  pred  )  throw (evioException) [inline]

Returns list of children satisfying predicate.

Parameters:
pred Predicate
Returns:
List of children satisfying predicate
evioDOMNodeListP evioDOMNode::getChildren ( void   )  throw (evioException)

Returns copy of child list of container node.

List must be deleted by user

Returns:
Copy of child list

References getChildList().

int evioDOMNode::getContentType ( void   )  const

Returns content type.

Returns:
Content type

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

virtual string evio::evioDOMNode::getFooter ( int  depth,
const evioToStringConfig config = &defaultToStringConfig 
) const [pure virtual]
virtual string evio::evioDOMNode::getHeader ( int  depth,
const evioToStringConfig config = &defaultToStringConfig 
) const [pure virtual]
string evioDOMNode::getIndent ( int  depth,
int  size = 3 
) [static, protected]

Returns indent for pretty-printing, used internally.

Parameters:
depth Depth level
size Size 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().

const evioDOMNodeP evioDOMNode::getParent ( void   )  const

Returns parent evioDOMNode.

Returns:
Pointer to parent evioDOMNode

References parent.

const evioDOMTree * evioDOMNode::getParentTree ( void   )  const

Returns parent evioDOMTree.

Returns:
Pointer to parent evioDOMTree

References parentTree.

virtual int evio::evioDOMNode::getSize ( void   )  const [pure virtual]
template<typename T >
vector< T > * evio::evioDOMNode::getVector ( void   )  throw (evioException) [inline]

Returns pointer to leaf node vector<T> of data Must be done this way because C++ forbids templated virtual functions...ejw, dec-2006.

Returns:
Pointer to vector<T>
bool evioDOMNode::isContainer ( void   )  const

True if node is a container node.

Returns:
true if node is a container

Referenced by getChildList().

bool evioDOMNode::isLeaf ( void   )  const

True if node is a leaf node.

Returns:
true if node is a leaf

Referenced by toString().

evioDOMNodeP evioDOMNode::move ( evioDOMNodeP  newParent  )  throw (evioException) [virtual]

Changes node parent.

Parameters:
newParent New parent
Returns:
Pointer to now node just moved

References evio::evioDOMContainerNode::childList.

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

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

Parameters:
tnPair tagNum pair to compare to
Returns:
true if tag and num disagree
bool evioDOMNode::operator!= ( uint16_t  tg  )  const [virtual]

True if node tag does not equal value.

Parameters:
tg Value to compare to
Returns:
true if tags disagree
template<typename T >
evioDOMNode & evio::evioDOMNode::operator<< ( const vector< T > &  tVec  )  throw (evioException) [inline]

Appends vector of data to leaf node.

Parameters:
tVec vector<T> of data to add to leaf node
Returns:
Reference to this
template<typename T >
evioDOMNode & evio::evioDOMNode::operator<< ( tVal  )  throw (evioException) [inline]

Appends single data value to leaf node.

Parameters:
tVal Data to be added
Returns:
Reference to this
evioDOMNode & evioDOMNode::operator<< ( char *  s  )  throw (evioException)

Appends single char* to leaf node.

Parameters:
s char* to be added
Returns:
Reference to this
evioDOMNode & evioDOMNode::operator<< ( const char *  s  )  throw (evioException)

Appends single const char* to leaf node.

Parameters:
s char* to be added
Returns:
Reference to this
evioDOMNode & evioDOMNode::operator<< ( const string &  s  )  throw (evioException)

Appends single string to leaf node.

Parameters:
sRef String to be added
Returns:
Reference to this
evioDOMNode & evioDOMNode::operator<< ( evioDOMNodeP  node  )  throw (evioException)

Adds node to container node.

Parameters:
node Node to be added
Returns:
Reference to node to be added
bool evioDOMNode::operator== ( tagNum  tnPair  )  const

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

Parameters:
tnPair tagNum pair to compare to
Returns:
true if tag and num agree
bool evioDOMNode::operator== ( uint16_t  tg  )  const [virtual]

True if node tag equals value.

Parameters:
tg Value to compare to
Returns:
true if tags agree
template<typename T >
void evio::evioDOMNode::replace ( const T *  tBuf,
int  len 
) throw (evioException) [inline]

Replaces data in leaf node.

Must be done this way because C++ forbids templated virtual functions...ejw, dec-2006

Parameters:
tBuf Buffer of data of type T
len Length of buffer
template<typename T >
void evio::evioDOMNode::replace ( const vector< T > &  tVec  )  throw (evioException) [inline]

Replaces data in leaf node.

Must be done this way because C++ forbids templated virtual functions...ejw, dec-2006

Parameters:
tVec vector<T> of data
string evioDOMNode::toString ( void   )  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

friend class evioDOMTree [friend]

Allows evioDOMTree class to manipulate nodes.


Member Data Documentation

Content type.

Referenced by createUnknownEvioDOMNode().

The node num, max 8 bits, used by BANK and String container types (2-word header).

Referenced by evio::evioToStringConfig::skipNode().

Pointer to parent tree if this node is the root.

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

The node tag, max 16-bits depending on container type.

Referenced by evio::evioToStringConfig::skipNode().


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

Generated on 4 Feb 2014 for evio by  doxygen 1.6.1