![]() |
|
|
Generated: 18 Jul 2008 |
#include <Tokenizer.h>
Collaboration diagram for Tokenizer:

Definition at line 24 of file Tokenizer.h.
Public Types | |
| typedef Token | Item |
| typedef std::vector< Token > | Items |
Public Member Functions | |
| Tokenizer () | |
| Standard (dummy) constructor. | |
| Tokenizer (bool resolve) | |
| Initializing constructor. | |
| virtual | ~Tokenizer () |
| Standard destructor. | |
| void | analyse (const std::string &s, const char *delim, const char *tagBegin, const char *tagEnd, const char *eq, const char *valBegin, const char *valEnd) |
| Analyse tokens from string. | |
| void | analyse (const std::string &s, const char *delim, const char *tag, const char *eq, const char *val) |
| Analyse tokens from string. | |
| void | analyse (const std::string &s, const char *delim, const char *eq, const char *val) |
| Analyse tokens from string. | |
| void | analyse (const std::string &s, const char *delim=" ", const char *eq="=") |
| Analyse tokens from string. | |
| Items & | items () |
| Access token collection. | |
| const Items & | items () const |
| Access token collection (CONST). | |
Protected Attributes | |
| Items | m_tokens |
| Assigned tokens within string. | |
| bool | m_resolve |
| Flag to resolve environment. | |
Classes | |
| class | Token |
| Definition of the sub-class Token. More... | |
| typedef Token Tokenizer::Item |
Definition at line 68 of file Tokenizer.h.
| typedef std::vector<Token> Tokenizer::Items |
Definition at line 69 of file Tokenizer.h.
| Tokenizer::Tokenizer | ( | ) | [inline] |
| Tokenizer::Tokenizer | ( | bool | resolve | ) | [inline] |
| virtual Tokenizer::~Tokenizer | ( | ) | [inline, virtual] |
Standard destructor.
Definition at line 81 of file Tokenizer.h.
References std::vector< _Tp, _Alloc >::begin(), std::vector< _Tp, _Alloc >::end(), std::vector< _Tp, _Alloc >::erase(), and m_tokens.
| void Tokenizer::analyse | ( | const std::string & | s, | |
| const char * | delim, | |||
| const char * | tagBegin, | |||
| const char * | tagEnd, | |||
| const char * | eq, | |||
| const char * | valBegin, | |||
| const char * | valEnd | |||
| ) |
Analyse tokens from string.
Definition at line 35 of file Tokenizer.cpp.
References std::vector< _Tp, _Alloc >::begin(), std::vector< _Tp, _Alloc >::clear(), std::vector< _Tp, _Alloc >::end(), Tokenizer::Token::length(), m_resolve, m_tokens, Tokenizer::Token::make(), std::vector< _Tp, _Alloc >::push_back(), and Gaudi::Units::s.
Referenced by analyse(), THistSvc::connect(), TagCollectionSvc::connect(), NTupleSvc::connect(), IssueLogger::connect(), OutputStream::connectConversionSvc(), GFALStageFile::GFALStageFile(), CollectionCloneAlg::initialize(), EventSelectorDataStream::initialize(), and PoolDbEvtSelector::resetCriteria().
00035 { 00036 m_tokens.clear(); 00037 if ( valEnd == 0 ) valEnd = valBegin; 00038 long start = 0; 00039 Token tok; 00040 do { 00041 tok.make(s, start, delim, tagBegin, tagEnd, eq, valBegin, valEnd); 00042 if ( tok.length() > 0 ) { 00043 start += tok.length(); 00044 m_tokens.push_back(tok); 00045 } 00046 else { 00047 start += s.length(); 00048 } 00049 } while ( start < long(s.length()) ); 00050 if ( m_resolve ) { 00051 for(Items::iterator i=m_tokens.begin(); i != m_tokens.end(); ++i) { 00052 (*i).resolveValue(); 00053 } 00054 } 00055 }
| void Tokenizer::analyse | ( | const std::string & | s, | |
| const char * | delim, | |||
| const char * | tag, | |||
| const char * | eq, | |||
| const char * | val | |||
| ) | [inline] |
Analyse tokens from string.
Definition at line 87 of file Tokenizer.h.
References analyse(), and Gaudi::Units::s.
| void Tokenizer::analyse | ( | const std::string & | s, | |
| const char * | delim, | |||
| const char * | eq, | |||
| const char * | val | |||
| ) | [inline] |
Analyse tokens from string.
Definition at line 91 of file Tokenizer.h.
References analyse(), and Gaudi::Units::s.
| void Tokenizer::analyse | ( | const std::string & | s, | |
| const char * | delim = " ", |
|||
| const char * | eq = "=" | |||
| ) | [inline] |
Analyse tokens from string.
Definition at line 95 of file Tokenizer.h.
References analyse(), and Gaudi::Units::s.
| Items& Tokenizer::items | ( | ) | [inline] |
Access token collection.
Definition at line 99 of file Tokenizer.h.
References m_tokens.
Referenced by THistSvc::connect(), TagCollectionSvc::connect(), NTupleSvc::connect(), IssueLogger::connect(), OutputStream::connectConversionSvc(), GFALStageFile::GFALStageFile(), CollectionCloneAlg::initialize(), EventSelectorDataStream::initialize(), and PoolDbEvtSelector::resetCriteria().
00099 { 00100 return m_tokens; 00101 }
| const Items& Tokenizer::items | ( | ) | const [inline] |
Access token collection (CONST).
Definition at line 103 of file Tokenizer.h.
References m_tokens.
00103 { 00104 return m_tokens; 00105 }
Items Tokenizer::m_tokens [protected] |
Assigned tokens within string.
Definition at line 72 of file Tokenizer.h.
Referenced by analyse(), items(), and ~Tokenizer().
bool Tokenizer::m_resolve [protected] |