Marlin  01.17.01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Private Types | Private Attributes | List of all members
marlin::Tokenizer Class Reference

Helper class for LogicalExpressions that splits the expression into subexpressions - needs to be apllied iteratively. More...

#include <LogicalExpressions.h>

Public Member Functions

 Tokenizer (std::vector< Expression > &tokens)
 
void operator() (const char &c)
 Save the current character and change state if necessary. More...
 
 ~Tokenizer ()
 
std::vector< Expression > & result ()
 

Private Types

enum  state { newtoken, parenthesis, operation }
 

Private Attributes

std::vector< Expression > & _tokens
 
char _last
 
bool needToken
 
int openPar
 
int closedPar
 
state _state
 

Detailed Description

Helper class for LogicalExpressions that splits the expression into subexpressions - needs to be apllied iteratively.

Definition at line 39 of file LogicalExpressions.h.

Member Enumeration Documentation

Enumerator
newtoken 
parenthesis 
operation 

Definition at line 41 of file LogicalExpressions.h.

Constructor & Destructor Documentation

marlin::Tokenizer::Tokenizer ( std::vector< Expression > &  tokens)
inline

Definition at line 56 of file LogicalExpressions.h.

marlin::Tokenizer::~Tokenizer ( )
inline

Definition at line 130 of file LogicalExpressions.h.

Member Function Documentation

void marlin::Tokenizer::operator() ( const char &  c)
inline

Save the current character and change state if necessary.

Definition at line 63 of file LogicalExpressions.h.

References _last, _state, _tokens, marlin::Expression::AND, closedPar, needToken, newtoken, openPar, operation, marlin::Expression::OR, and parenthesis.

std::vector<Expression>& marlin::Tokenizer::result ( )
inline

Definition at line 133 of file LogicalExpressions.h.

References _tokens.

Member Data Documentation

char marlin::Tokenizer::_last
private

Definition at line 48 of file LogicalExpressions.h.

Referenced by operator()().

state marlin::Tokenizer::_state
private

Definition at line 52 of file LogicalExpressions.h.

Referenced by operator()().

std::vector< Expression >& marlin::Tokenizer::_tokens
private

Definition at line 47 of file LogicalExpressions.h.

Referenced by operator()(), and result().

int marlin::Tokenizer::closedPar
private

Definition at line 51 of file LogicalExpressions.h.

Referenced by operator()().

bool marlin::Tokenizer::needToken
private

Definition at line 49 of file LogicalExpressions.h.

Referenced by operator()().

int marlin::Tokenizer::openPar
private

Definition at line 50 of file LogicalExpressions.h.

Referenced by operator()().


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