Main Page | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals

Ars::ExprParser::Context Class Reference


Public Member Functions

 Context (map< string, double > &aVar)
 Context (Context &ctx)
void Init (void)
Contextoperator= (Context &ctx)
Contextoperator+= (Context &ctx)
Contextoperator-= (Context &ctx)
Contextoperator *= (Context &ctx)
Contextoperator/= (Context &ctx)
Contextoperator|= (Context &ctx)

Data Fields

map< icstring, double > & variables
 association of the variable names and their values (for this case random)

double val

Constructor & Destructor Documentation

Ars::ExprParser::Context::Context map< string, double > &  aVar  )  [inline]
 

Definition at line 32 of file ars/exprint.h.

References Init(), val, and variables.

00033                 : variables( aVar ) , val( 0.0 )
00034                 {       Init(); }

Ars::ExprParser::Context::Context Context ctx  )  [inline]
 

Definition at line 36 of file ars/exprint.h.

References Init(), val, and variables.

00037                 : variables( ctx.variables ) , val( 0.0 )
00038                 {       Init(); }


Member Function Documentation

void Ars::ExprParser::Context::Init void   )  [inline]
 

Definition at line 40 of file ars/exprint.h.

References Cfg::GetCfg(), Cfg::Handler::GetCfgInt(), icstring, and variables.

Referenced by Context().

00041                 {
00042                         Cfg::Handler    &h = Cfg::GetCfg();
00043                         variables.insert( make_pair( icstring( "scrw" ) , h.GetCfgInt( "SetupScreen" , "screenw" ) ) );
00044                         variables.insert( make_pair( icstring( "scrh" ) , h.GetCfgInt( "SetupScreen" , "screenh" ) ) );
00045                 }

Context& Ars::ExprParser::Context::operator *= Context ctx  )  [inline]
 

Definition at line 63 of file ars/exprint.h.

References val.

00064                 {
00065                         val *= ctx.val;
00066                         return *this;
00067                 }

Context& Ars::ExprParser::Context::operator+= Context ctx  )  [inline]
 

Definition at line 53 of file ars/exprint.h.

References val.

00054                 {
00055                         val += ctx.val;
00056                         return *this;
00057                 }

Context& Ars::ExprParser::Context::operator-= Context ctx  )  [inline]
 

Definition at line 58 of file ars/exprint.h.

References val.

00059                 {
00060                         val -= ctx.val;
00061                         return *this;
00062                 }

Context& Ars::ExprParser::Context::operator/= Context ctx  )  [inline]
 

Definition at line 68 of file ars/exprint.h.

References val.

00069                 {
00070                         val /= ctx.val;
00071                         return *this;
00072                 }

Context& Ars::ExprParser::Context::operator= Context ctx  )  [inline]
 

Definition at line 47 of file ars/exprint.h.

References val.

00048                 {
00049                         val = ctx.val;
00050                         return *this;
00051                 }

Context& Ars::ExprParser::Context::operator|= Context ctx  )  [inline]
 

Definition at line 73 of file ars/exprint.h.

References val.

00074                 {
00075                         val = (int)val | (int)ctx.val;
00076                         return *this;
00077                 }


Field Documentation

double Ars::ExprParser::Context::val
 

Definition at line 30 of file ars/exprint.h.

Referenced by Context(), operator *=(), operator+=(), operator-=(), operator/=(), operator=(), operator|=(), and Ars::ExprParser::WalkTree().

map<icstring,double>& Ars::ExprParser::Context::variables
 

association of the variable names and their values (for this case random)

Definition at line 29 of file ars/exprint.h.

Referenced by Context(), Init(), and Ars::ExprParser::WalkTree().


The documentation for this class was generated from the following file:
Generated on Fri Dec 5 04:06:43 2003 for Borqueror by doxygen 1.3.3