proj home

Files   Classes   Functions   Hierarchy  

stateevalquery Class Reference

#include <scopedependentfunctions.h>

Inheritance diagram for stateevalquery:
Collaboration diagram for stateevalquery:

List of all members.

Public Member Functions

 stateevalquery ()
 stateevalquery (deque< rpnbase * > &ds, bool const evaluate=true)
 ~stateevalquery ()
rpnbasecopy () const
string const name () const
void eval (deque< rpnbase * > &ds)


Detailed Description

Definition at line 43 of file scopedependentfunctions.h.


Constructor & Destructor Documentation

stateevalquery::stateevalquery (  )  [inline]

Definition at line 47 of file scopedependentfunctions.h.

Referenced by copy().

00047 {}

stateevalquery::stateevalquery ( deque< rpnbase * > &  ds,
bool const   evaluate = true 
)

Definition at line 80 of file scopedependentfunctions.cpp.

References eval().

00081 {
00082   if (evaluate)
00083     eval(ds);
00084   else
00085     ds.push_front(this);
00086 }

stateevalquery::~stateevalquery (  )  [inline]

Definition at line 49 of file scopedependentfunctions.h.

00049 {}


Member Function Documentation

rpnbase * stateevalquery::copy (  )  const [virtual]

Reimplemented from rpnfunction.

Definition at line 88 of file scopedependentfunctions.cpp.

References stateevalquery().

00089 {
00090   return new stateevalquery(); 
00091 }

void stateevalquery::eval ( deque< rpnbase * > &  ds  )  [virtual]

Reimplemented from rpnfunction.

Definition at line 93 of file scopedependentfunctions.cpp.

References inputstatescope::cscope, and rpnbase::dec().

Referenced by stateevalquery().

00094 {
00095   int val;
00096 
00097   if (inputstatescope::cscope->evaloverride)
00098   {
00099     if (inputstatescope::cscope->evalpreserved)
00100       val = 1;
00101     else 
00102       val = 0;
00103   }
00104   else
00105   {
00106     if (inputstatescope::cscope->evalimmediate)
00107       val = 1;
00108     else 
00109       val = 0;
00110   }
00111 
00112   new rpninteger(ds,val);
00113 
00114   dec();
00115 }

string const stateevalquery::name (  )  const [inline, virtual]

Reimplemented from rpnfunction.

Definition at line 52 of file scopedependentfunctions.h.

00053     { return string("stateevalis"); }


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

Generated on Fri Mar 4 00:50:18 2011 for Chelton Evans Source by  doxygen 1.5.8