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
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
TExpEnv Class Reference

#include <exp.h>

List of all members.

Public Member Functions

 TExpEnv ()
virtual ~TExpEnv ()
 TExpEnv (TSIn &SIn)
virtual void Save (TSOut &SOut) const
TExpEnvoperator= (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 TRndGetRnd ()

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 >

Detailed Description

Definition at line 73 of file exp.h.


Constructor & Destructor Documentation

TExpEnv::TExpEnv ( ) [inline]

Definition at line 77 of file exp.h.

: Rnd(){}
virtual TExpEnv::~TExpEnv ( ) [inline, virtual]

Definition at line 78 of file exp.h.

{}
TExpEnv::TExpEnv ( TSIn SIn) [inline]

Definition at line 79 of file exp.h.

: Rnd(SIn){}

Member Function Documentation

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]

Definition at line 99 of file exp.h.

{return Rnd;}
virtual void TExpEnv::GetVarNmVal ( const int &  ,
TStr ,
PExpVal  
) const [inline, virtual]

Definition at line 92 of file exp.h.

                                            {Fail;}
virtual int TExpEnv::GetVars ( ) const [inline, virtual]

Definition at line 91 of file exp.h.

{return 0;}
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]

Definition at line 89 of file exp.h.

                                              {
    bool IsVar; return GetVarVal(VarNm, IsVar);}
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]

Definition at line 80 of file exp.h.

{return new TExpEnv(SIn);}
TExpEnv& TExpEnv::operator= ( const TExpEnv ) [inline]

Definition at line 83 of file exp.h.

{Fail; return *this;}
bool TExpEnv::operator== ( const TExpEnv ) const [inline]

Definition at line 84 of file exp.h.

{Fail; return false;}
virtual void TExpEnv::PutVarVal ( const TStr ,
const PExpVal  
) [inline, virtual]

Definition at line 86 of file exp.h.

{Fail;}
virtual void TExpEnv::Save ( TSOut SOut) const [inline, virtual]

Definition at line 81 of file exp.h.

{Rnd.Save(SOut);}

Friends And Related Function Documentation

friend class TPt< TExpEnv > [friend]

Definition at line 73 of file exp.h.


Member Data Documentation

TCRef TExpEnv::CRef [private]

Definition at line 73 of file exp.h.

Definition at line 105 of file exp.h.

TRnd TExpEnv::Rnd [private]

Definition at line 75 of file exp.h.


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