evio::evioDictionary Class Reference

Parses XML dictionary string and holds two maps, one for each lookup direction. More...

#include <evioDictionary.hxx>

List of all members.

Public Member Functions

 evioDictionary ()
 No-arg constructor contains empty maps.
 evioDictionary (const string &dictXML, const string &sep=".")
 Constructor fills dictionary maps from string.
 evioDictionary (ifstream &dictIFS, const string &sep=".")
 Constructor fills dictionary maps from ifstream.
virtual ~evioDictionary ()
 Destructor.
bool parseDictionary (const string &dictionaryXML)
 Uses Expat to parse XML dictionary string and fill maps.
tagNum getTagNum (const string &name) const throw (evioException)
 Gets tagNum given name, throws exception if not found.
string getName (tagNum tn) const throw (evioException)
 Gets name given tagNum, throws exception if not found.
string getDictionaryXML (void) const
 Gets dictionary XML.
void setSeparator (const string &sep)
 Sets separator character.
string getSeparator (void) const
 Gets separator character.
string toString (void) const throw (evioException)
 Converts dictionary into string.

Public Attributes

map< tagNum, string > getNameMap
 Gets node name given tag/num.
map< string, tagNumgetTagNumMap
 Gets tag/num given node name.

Detailed Description

Parses XML dictionary string and holds two maps, one for each lookup direction.


Constructor & Destructor Documentation

evioDictionary::evioDictionary (  ) 

No-arg constructor contains empty maps.

evioDictionary::evioDictionary ( const string &  dictXML,
const string &  sep = "." 
)

Constructor fills dictionary maps from string.

Parameters:
dictionaryXML XML string parsed to create dictionary maps

References parseDictionary().

evioDictionary::evioDictionary ( ifstream &  dictIFS,
const string &  sep = "." 
)

Constructor fills dictionary maps from ifstream.

Parameters:
dictionaryXML XML string parsed to create dictionary maps

References parseDictionary().

evioDictionary::~evioDictionary (  )  [virtual]

Destructor.


Member Function Documentation

string evioDictionary::getDictionaryXML ( void   )  const

Gets dictionary XML.

Returns:
dictionary XML

Referenced by evio::evioSocketChannel::open(), evio::evioFileChannel::open(), and evio::evioBufferChannel::open().

string evioDictionary::getName ( tagNum  tn  )  const throw (evioException)

Gets name given tagNum, throws exception if not found.

Parameters:
tn tagNum of bank
Returns:
name

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

string evioDictionary::getSeparator ( void   )  const

Gets separator character.

Returns:
Separator character
tagNum evioDictionary::getTagNum ( const string &  name  )  const throw (evioException)

Gets tagNum given name, throws exception if not found.

Parameters:
name Name of bank
Returns:
tagNum

Referenced by evio::evioDOMTree::addBank(), evio::evioDOMNode::createEvioDOMNode(), and evio::evioDOMTree::evioDOMTree().

bool evioDictionary::parseDictionary ( const string &  dictionaryXML  ) 

Uses Expat to parse XML dictionary string and fill maps.

Parameters:
dictionaryXML XML string
Returns:
True if parsing succeeded

Referenced by evioDictionary().

void evioDictionary::setSeparator ( const string &  sep  ) 

Sets separator character.

Parameters:
sep Separator character
string evioDictionary::toString ( void   )  const throw (evioException)

Converts dictionary into string.

Returns:
String containing dictionary keys and values

References getTagNumMap.


Member Data Documentation

Gets tag/num given node name.

Referenced by evio::evioDOMTree::getNodeList(), and toString().


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

Generated on 4 Feb 2014 for evio by  doxygen 1.6.1