C++ mpi module for stochmagnet_main Package
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
EXPR_Tokenizer Class Reference

This class manages the string manipulation. More...

#include <EXPR_Tokenizer.h>

Inheritance diagram for EXPR_Tokenizer:
Inheritance graph
[legend]
Collaboration diagram for EXPR_Tokenizer:
Collaboration graph
[legend]

Public Member Functions

void setTokens (const tString &tokens)
 set the tokens
 
void returnToPosition (const tInt &pos)
 rreturn the position of the cursor to pos More...
 
tInt getCurrentPosition ()
 get the current position of the token More...
 
tBoolean isAtEnd () const
 test if all the tokens has been reads More...
 
void skipWhiteSpace ()
 read all the white characters
 
tBoolean readUntil (const tChar &expected)
 read the tokens utile the char expected is found ]return tre if the expected char has been found
 
tBoolean readToken (tString &token)
 
tBoolean readRealValue (tReal &x)
 read the next value More...
 
tBoolean readArguments (std::vector< tString > &args)
 read the arguement of the form "[x,y,z,t]" More...
 
virtual tString toString () const override
 return the string representation of the class More...
 
- Public Member Functions inherited from EXPR_Object
virtual tMemSize getMemorySize () const override
 return the memory size of the class More...
 
virtual tMemSize getContentsMemorySize () const override
 return nthe memory size of the included associations More...
 
- Public Member Functions inherited from CORE_Object
template<class T >
std::shared_ptr< T > getSharedPointer ()
 return the shared pointer for this More...
 
template<class T >
std::shared_ptr< const T > getConstSharedPointer () const
 return a const shared pointer for this More...
 
template<class T >
tBoolean isInstanceOf () const
 test if the clas T is an instance of this class More...
 
tString getClassName () const
 return the name of the class More...
 
tString getPointerString () const
 retrun the pointer of the class as a string More...
 
tString getIdentityString () const
 retrun the string identification of the class More...
 

Static Public Member Functions

static CORE_UniquePointer< EXPR_TokenizerNew ()
 crete the new instance of this More...
 
- Static Public Member Functions inherited from CORE_Object
static tBoolean EnableMemoryStack (const tBoolean &isMemoryChecked)
 enable the memory stack More...
 
static void EnableMemoryStack ()
 enable the memory stack
 
static void DisableMemoryStack ()
 disable the memory stack
 
static tBoolean IsMemoryStackEnabled ()
 return trur if the memory stack is enabled
 
static tString MemoryStackToString ()
 get the memory stack in string More...
 
static tIndex GetRegisteredClassesNumber ()
 get the memory stack in string More...
 

Protected Member Functions

 EXPR_Tokenizer ()
 create the class
 
virtual ~EXPR_Tokenizer ()
 delete the class
 
- Protected Member Functions inherited from EXPR_Object
 EXPR_Object (void)
 create the class
 
virtual ~EXPR_Object (void)
 delete the class
 
- Protected Member Functions inherited from CORE_Object
 CORE_Object ()
 build an instance of the object
 
virtual ~CORE_Object ()
 destroy the instance of object std

 

Detailed Description

This class manages the string manipulation.

Author
Stephane Despreaux
Version
1.0

Member Function Documentation

◆ getCurrentPosition()

tInt EXPR_Tokenizer::getCurrentPosition ( )

get the current position of the token

Returns
the current position of the token

◆ isAtEnd()

tBoolean EXPR_Tokenizer::isAtEnd ( ) const

test if all the tokens has been reads

Returns
true if all the tokens have been read

◆ New()

static CORE_UniquePointer<EXPR_Tokenizer> EXPR_Tokenizer::New ( )
inlinestatic

crete the new instance of this

Returns
the shared pointer to this

◆ readArguments()

tBoolean EXPR_Tokenizer::readArguments ( std::vector< tString > &  args)

read the arguement of the form "[x,y,z,t]"

Parameters
argsthe arguments return as a vector of strings
Returns
always true

the arguements between coma may be a sequence of

  • characters a,...z,A,..Z
  • digits 0,...9
  • special characters : .,+,-,_,' ','{','}'

◆ readRealValue()

tBoolean EXPR_Tokenizer::readRealValue ( tReal &  x)

read the next value

Parameters
x!the value read
Returns
true if alpha numerical cahracter has been found

◆ returnToPosition()

void EXPR_Tokenizer::returnToPosition ( const tInt &  pos)

rreturn the position of the cursor to pos

Parameters
posposition of the token

◆ toString()

tString EXPR_Tokenizer::toString ( ) const
overridevirtual

return the string representation of the class

Returns
the string representation of the class

Reimplemented from CORE_Object.


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