Parses XML dictionary string and holds two maps, one for each lookup direction. More...
#include <evioDictionary.hxx>
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, tagNum > | getTagNumMap |
Gets tag/num given node name. |
Parses XML dictionary string and holds two maps, one for each lookup direction.
evioDictionary::evioDictionary | ( | ) |
No-arg constructor contains empty maps.
evioDictionary::evioDictionary | ( | const string & | dictXML, | |
const string & | sep = "." | |||
) |
Constructor fills dictionary maps from string.
dictionaryXML | XML string parsed to create dictionary maps |
References parseDictionary().
evioDictionary::evioDictionary | ( | ifstream & | dictIFS, | |
const string & | sep = "." | |||
) |
Constructor fills dictionary maps from ifstream.
dictionaryXML | XML string parsed to create dictionary maps |
References parseDictionary().
evioDictionary::~evioDictionary | ( | ) | [virtual] |
Destructor.
string evioDictionary::getDictionaryXML | ( | void | ) | const |
Gets 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.
tn | tagNum of bank |
Referenced by evio::evioToStringConfig::skipNode().
string evioDictionary::getSeparator | ( | void | ) | const |
Gets separator character.
tagNum evioDictionary::getTagNum | ( | const string & | name | ) | const throw (evioException) |
Gets tagNum given name, throws exception if not found.
name | Name of bank |
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.
dictionaryXML | XML string |
Referenced by evioDictionary().
void evioDictionary::setSeparator | ( | const string & | sep | ) |
Sets separator character.
sep | Separator character |
string evioDictionary::toString | ( | void | ) | const throw (evioException) |
Converts dictionary into string.
References getTagNumMap.
map<tagNum,string> evio::evioDictionary::getNameMap |
Gets node name given tag/num.
Referenced by evio::evioDOMContainerNode::getFooter(), evio::evioDOMContainerNode::getHeader(), and evio::evioToStringConfig::skipNode().
map<string,tagNum> evio::evioDictionary::getTagNumMap |
Gets tag/num given node name.
Referenced by evio::evioDOMTree::getNodeList(), and toString().