Public Member Functions | Private Attributes | List of all members
gar::geo::Tokenizer Class Reference

#include <BitFieldCoder.h>

Public Member Functions

 Tokenizer (std::vector< std::string > &tokens, char del)
 
void operator() (const char &c)
 

Private Attributes

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

Detailed Description

Definition at line 21 of file BitFieldCoder.h.

Constructor & Destructor Documentation

gar::geo::Tokenizer::Tokenizer ( std::vector< std::string > &  tokens,
char  del 
)
inline

Definition at line 28 of file BitFieldCoder.h.

29  : _tokens(tokens), _del(del), _last(del)
30  {
31 
32  }
std::vector< std::string > & _tokens
Definition: BitFieldCoder.h:22

Member Function Documentation

void gar::geo::Tokenizer::operator() ( const char &  c)
inline

Definition at line 34 of file BitFieldCoder.h.

35  {
36  if( c != _del )
37  {
38  if( _last == _del ){
39  _tokens.push_back("") ;
40  }
41  _tokens.back() += c ;
42  }
43  _last = c ;
44  }
std::vector< std::string > & _tokens
Definition: BitFieldCoder.h:22

Member Data Documentation

char gar::geo::Tokenizer::_del
private

Definition at line 23 of file BitFieldCoder.h.

char gar::geo::Tokenizer::_last
private

Definition at line 24 of file BitFieldCoder.h.

std::vector< std::string >& gar::geo::Tokenizer::_tokens
private

Definition at line 22 of file BitFieldCoder.h.


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