English Français

Documentation / Developer's manual

Available modules

Calibration,  DataServer,  Launcher,  MetaModelOptim,  Modeler,  Optimizer,  ReLauncher,  Reliability,  ReOptimizer,  Sampler,  Sensitivity,  UncertModeler,  XmlProblem,   Uranie / DataServer: TTokenizer Class Reference
Uranie / DataServer v4.9.0
/* @license-end */
TTokenizer Class Reference

Tokenizer class for parsing strings. More...

#include <TTokenizer.h>

Collaboration diagram for TTokenizer:

Public Member Functions

 TTokenizer (const std::string &=" ,\t\n\r", const std::string &="\'\"", const int=-1)
 
std::vector< std::string > getTokens (const std::string &)
 
void setDelimiters (const std::string &)
 
void setQuotes (const std::string &)
 
void setComment (char)
 
bool isDelimiter (char)
 
bool isQuote (char)
 

Private Attributes

std::string quotes
 
std::string delimiters
 
int nQuotes
 
int nDelims
 
char comment
 

Detailed Description

Tokenizer class for parsing strings.

Constructor & Destructor Documentation

◆ TTokenizer()

TTokenizer::TTokenizer ( const std::string &  Delimiters = " ,\t\n\r",
const std::string &  Quotes = "\'\"",
const int  Comment = -1 
)

References comment, setDelimiters(), and setQuotes().

Member Function Documentation

◆ getTokens()

std::vector< std::string > TTokenizer::getTokens ( const std::string &  s)

References comment, isDelimiter(), isQuote(), and quotes.

◆ isDelimiter()

bool TTokenizer::isDelimiter ( char  chr)

References delimiters, and nDelims.

Referenced by getTokens().

◆ isQuote()

bool TTokenizer::isQuote ( char  chr)

References nQuotes, and quotes.

Referenced by getTokens().

◆ setComment()

void TTokenizer::setComment ( char  Comment)

References comment.

◆ setDelimiters()

void TTokenizer::setDelimiters ( const std::string &  Delimiters)

References delimiters, and nDelims.

Referenced by TTokenizer().

◆ setQuotes()

void TTokenizer::setQuotes ( const std::string &  Quotes)

References nQuotes, and quotes.

Referenced by TTokenizer().

Member Data Documentation

◆ comment

char TTokenizer::comment
private

Referenced by getTokens(), setComment(), and TTokenizer().

◆ delimiters

std::string TTokenizer::delimiters
private

Referenced by isDelimiter(), and setDelimiters().

◆ nDelims

int TTokenizer::nDelims
private

Referenced by isDelimiter(), and setDelimiters().

◆ nQuotes

int TTokenizer::nQuotes
private

Referenced by isQuote(), and setQuotes().

◆ quotes

std::string TTokenizer::quotes
private

Referenced by getTokens(), isQuote(), and setQuotes().