LCIO  02.17
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Private Attributes | List of all members
UTIL::LCTokenizer Class Reference

Helper class for string tokenization. More...

#include <BitField64.h>

Public Member Functions

 LCTokenizer (std::vector< std::string > &tokens, char del)
 Only c'tor, give (empty) token vector and delimeter character. More...
 
void operator() (const char &c)
 Operator for use with algorithms, e.g. More...
 

Private Attributes

std::vector< std::string > & _tokens
 
char _del
 
char _last
 

Detailed Description

Helper class for string tokenization.

Usage:
std::vector<std::string> tokens ;
LCTokenizer t( tokens ,',') ;
std::for_each( aString.begin(), aString.end(), t ) ;

Definition at line 21 of file BitField64.h.

Constructor & Destructor Documentation

UTIL::LCTokenizer::LCTokenizer ( std::vector< std::string > &  tokens,
char  del 
)
inline

Only c'tor, give (empty) token vector and delimeter character.

Definition at line 30 of file BitField64.h.

Member Function Documentation

void UTIL::LCTokenizer::operator() ( const char &  c)
inline

Operator for use with algorithms, e.g.

for_each

Definition at line 37 of file BitField64.h.

References _del, _last, _tokens, std::vector< T >::back(), and std::vector< T >::push_back().

Member Data Documentation

char UTIL::LCTokenizer::_del
private

Definition at line 24 of file BitField64.h.

Referenced by operator()().

char UTIL::LCTokenizer::_last
private

Definition at line 25 of file BitField64.h.

Referenced by operator()().

std::vector< std::string >& UTIL::LCTokenizer::_tokens
private

Definition at line 23 of file BitField64.h.

Referenced by operator()().


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