SNAP Library 2.1, User Reference
2013-09-25 10:47:25
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
|
#include <exp.h>
Public Member Functions | |
TExpEnv () | |
virtual | ~TExpEnv () |
TExpEnv (TSIn &SIn) | |
virtual void | Save (TSOut &SOut) const |
TExpEnv & | operator= (const TExpEnv &) |
bool | operator== (const TExpEnv &) const |
virtual void | PutVarVal (const TStr &, const PExpVal &) |
virtual PExpVal | GetVarVal (const TStr &, bool &IsVar) |
virtual PExpVal | GetVarVal (const TStr &VarNm) |
virtual int | GetVars () const |
virtual void | GetVarNmVal (const int &, TStr &, PExpVal &) const |
virtual PExpVal | GetFuncVal (const TStr &, const TExpValV &, bool &IsFunc) |
virtual TRnd & | GetRnd () |
Static Public Member Functions | |
static PExpEnv | Load (TSIn &SIn) |
static bool | IsFuncOk (const TStr &RqFuncNm, const TExpFuncArgType &RqFuncArgType, const TStr &FuncNm, const TExpValV &ArgValV) |
Static Public Attributes | |
static PExpEnv | DfExpEnv = PExpEnv(new TExpEnv()) |
Private Attributes | |
TCRef | CRef |
TRnd | Rnd |
Friends | |
class | TPt< TExpEnv > |
TExpEnv::TExpEnv | ( | ) | [inline] |
virtual TExpEnv::~TExpEnv | ( | ) | [inline, virtual] |
TExpEnv::TExpEnv | ( | TSIn & | SIn | ) | [inline] |
virtual PExpVal TExpEnv::GetFuncVal | ( | const TStr & | , |
const TExpValV & | , | ||
bool & | IsFunc | ||
) | [inline, virtual] |
Definition at line 95 of file exp.h.
{ IsFunc=false; return TExpVal::GetUndefExpVal();}
virtual TRnd& TExpEnv::GetRnd | ( | ) | [inline, virtual] |
virtual void TExpEnv::GetVarNmVal | ( | const int & | , |
TStr & | , | ||
PExpVal & | |||
) | const [inline, virtual] |
virtual int TExpEnv::GetVars | ( | ) | const [inline, virtual] |
virtual PExpVal TExpEnv::GetVarVal | ( | const TStr & | , |
bool & | IsVar | ||
) | [inline, virtual] |
Definition at line 87 of file exp.h.
{ IsVar=false; return TExpVal::GetUndefExpVal();}
virtual PExpVal TExpEnv::GetVarVal | ( | const TStr & | VarNm | ) | [inline, virtual] |
bool TExpEnv::IsFuncOk | ( | const TStr & | RqFuncNm, |
const TExpFuncArgType & | RqFuncArgType, | ||
const TStr & | FuncNm, | ||
const TExpValV & | ArgValV | ||
) | [static] |
Definition at line 137 of file exp.cpp.
{ if (RqFuncNm.GetUc()!=FuncNm.GetUc()){return false;} switch (RqFuncArgType){ case efatVoid: return ArgValV.Len()==0; case efatFlt: if (ArgValV.Len()!=1){return false;} if (ArgValV[0]->GetValType()!=evtFlt){return false;} return true; case efatStr: if (ArgValV.Len()!=1){return false;} if (ArgValV[0]->GetValType()!=evtStr){return false;} return true; case efatFltFlt: if (ArgValV.Len()!=2){return false;} if (ArgValV[0]->GetValType()!=evtFlt){return false;} if (ArgValV[1]->GetValType()!=evtFlt){return false;} return true; case efatFltStr: if (ArgValV.Len()!=2){return false;} if (ArgValV[0]->GetValType()!=evtFlt){return false;} if (ArgValV[1]->GetValType()!=evtStr){return false;} return true; case efatStrFlt: if (ArgValV.Len()!=2){return false;} if (ArgValV[0]->GetValType()!=evtStr){return false;} if (ArgValV[1]->GetValType()!=evtFlt){return false;} return true; case efatStrStr: if (ArgValV.Len()!=2){return false;} if (ArgValV[0]->GetValType()!=evtStr){return false;} if (ArgValV[1]->GetValType()!=evtStr){return false;} return true; case efatStrAny: if (ArgValV.Len()!=2){return false;} if (ArgValV[0]->GetValType()!=evtStr){return false;} return true; default: Fail; return false; } }
static PExpEnv TExpEnv::Load | ( | TSIn & | SIn | ) | [inline, static] |
bool TExpEnv::operator== | ( | const TExpEnv & | ) | const [inline] |
virtual void TExpEnv::PutVarVal | ( | const TStr & | , |
const PExpVal & | |||
) | [inline, virtual] |
virtual void TExpEnv::Save | ( | TSOut & | SOut | ) | const [inline, virtual] |
TCRef TExpEnv::CRef [private] |
TRnd TExpEnv::Rnd [private] |