DD4hep  1.28.0
Detector Description Toolkit for High Energy Physics
Public Member Functions | Private Attributes | List of all members
dd4hep::DDSegmentation::StringTokenizer Class Reference

Helper class for string tokenization. More...

#include <BitFieldCoder.h>

Public Member Functions

 StringTokenizer (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

Helper class for string tokenization.

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

Author
F.Gaede, DESY
Date
2013-06

Definition at line 253 of file BitFieldCoder.h.

Constructor & Destructor Documentation

◆ StringTokenizer()

dd4hep::DDSegmentation::StringTokenizer::StringTokenizer ( std::vector< std::string > &  tokens,
char  del 
)
inline

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

Definition at line 261 of file BitFieldCoder.h.

Member Function Documentation

◆ operator()()

void dd4hep::DDSegmentation::StringTokenizer::operator() ( const char &  c)
inline

Operator for use with algorithms, e.g. for_each

Definition at line 268 of file BitFieldCoder.h.

Member Data Documentation

◆ _del

char dd4hep::DDSegmentation::StringTokenizer::_del
private

Definition at line 255 of file BitFieldCoder.h.

◆ _last

char dd4hep::DDSegmentation::StringTokenizer::_last
private

Definition at line 256 of file BitFieldCoder.h.

◆ _tokens

std::vector< std::string >& dd4hep::DDSegmentation::StringTokenizer::_tokens
private

Definition at line 254 of file BitFieldCoder.h.


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