SNAP Library 2.3, Developer Reference
2014-06-16 11:58:46
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
|
#include <env.h>
Public Member Functions | |
TEnv () | |
TEnv (const TEnv &) | |
TEnv (const int &_Args, char **_ArgV, const PNotify &_Notify=NULL) | |
TEnv (const TStr &_ArgStr, const PNotify &_Notify=NULL) | |
TEnv & | operator= (const TEnv &Env) |
int | GetArgs () const |
TStr | GetArg (const int &ArgN) const |
TStr | GetExeFNm () const |
TStr | GetExeFPath () const |
TStr | GetCmLn (const int &FromArgN=1) const |
bool | IsSilent () const |
int | GetPrefixArgN (const TStr &PrefixStr) const |
bool | IsArgPrefix (const TStr &PrefixStr) const |
TStr | GetArgPostfix (const TStr &PrefixStr) const |
void | PrepArgs (const TStr &_HdStr=TStr(), const int &_MnArgs=1, const bool &SilentP=false) |
TStr | GetHdStr () const |
int | GetMnArgs () const |
bool | IsEndOfRun () const |
bool | IsArgStr (const TStr &ArgStr) |
bool | IsArgStr (const TStr &ArgStr, const TStr &DNm) |
TStr | GetIfArgPrefixStr (const TStr &PrefixStr, const TStr &DfVal="", const TStr &DNm="") const |
TStrV | GetIfArgPrefixStrV (const TStr &PrefixStr, TStrV &DfValV, const TStr &DNm="") const |
TStrV | GetIfArgPrefixStrV (const TStr &PrefixStr, const TStr &DNm="") const |
TStrSet | GetIfArgPrefixStrSet (const TStr &PrefixStr, TStrV &DfValV, const TStr &DNm="") const |
TStrSet | GetIfArgPrefixStrSet (const TStr &PrefixStr, const TStr &DNm="") const |
bool | GetIfArgPrefixBool (const TStr &PrefixStr, const bool &DfVal=false, const TStr &DNm="") const |
int | GetIfArgPrefixInt (const TStr &PrefixStr, const int &DfVal=0, const TStr &DNm="") const |
TIntV | GetIfArgPrefixIntV (const TStr &PrefixStr, TIntV &DfValV, const TStr &DNm="") const |
TIntV | GetIfArgPrefixIntV (const TStr &PrefixStr, const TStr &DNm="") const |
double | GetIfArgPrefixFlt (const TStr &PrefixStr, const double &DfVal=0, const TStr &DNm="") const |
TStr | GetVarVal (const TStr &VarNm) const |
void | GetVarNmV (TStrV &VarNmV) |
void | GetVarNmValV (TStrV &NmValV) |
Static Public Member Functions | |
static void | PutVarVal (const TStr &VarNm, const TStr &VarVal) |
Private Attributes | |
TStrV | ArgV |
TStr | HdStr |
int | MnArgs |
bool | SilentP |
PNotify | Notify |
TEnv::TEnv | ( | const TEnv & | ) |
TEnv::TEnv | ( | const int & | _Args, |
char ** | _ArgV, | ||
const PNotify & | _Notify = NULL |
||
) |
Definition at line 3 of file env.cpp.
References TVec< TVal, TSizeTy >::Add(), and ArgV.
Definition at line 9 of file env.cpp.
References ArgV, and TStr::SplitOnAllCh().
|
inline |
Definition at line 28 of file env.h.
References ArgV, GetArgs(), and IAssert.
Referenced by GetArgPostfix(), GetCmLn(), GetExeFNm(), GetIfArgPrefixStrV(), GetPrefixArgN(), IsArgStr(), and PrepArgs().
Definition at line 40 of file env.cpp.
References GetArg(), GetPrefixArgN(), TStr::GetSubStr(), IAssert, and TStr::Len().
Referenced by GetIfArgPrefixBool(), GetIfArgPrefixFlt(), GetIfArgPrefixInt(), and GetIfArgPrefixStr().
|
inline |
Definition at line 25 of file env.h.
References ArgV, and TVec< TVal, TSizeTy >::Len().
Referenced by GetArg(), GetCmLn(), GetIfArgPrefixBool(), GetIfArgPrefixFlt(), GetIfArgPrefixInt(), GetIfArgPrefixStr(), GetIfArgPrefixStrV(), GetPrefixArgN(), IsArgStr(), IsEndOfRun(), and PrepArgs().
TStr TEnv::GetCmLn | ( | const int & | FromArgN = 1 | ) | const |
TStr TEnv::GetExeFNm | ( | ) | const |
Definition at line 14 of file env.cpp.
References GetArg(), TStr::GetSubStr(), TStr::IsPrefix(), and TStr::Len().
Referenced by GetExeFPath().
|
inline |
Definition at line 31 of file env.h.
References GetExeFNm(), and TStr::GetFPath().
|
inline |
bool TEnv::GetIfArgPrefixBool | ( | const TStr & | PrefixStr, |
const bool & | DfVal = false , |
||
const TStr & | DNm = "" |
||
) | const |
Definition at line 178 of file env.cpp.
References TStr::CStr(), TStr::DelSubStr(), Env, GetArgPostfix(), GetArgs(), TBool::GetStr(), TBool::GetValFromStr(), TBool::GetYesNoStr(), IsArgPrefix(), TStr::LastCh(), TStr::Len(), MnArgs, Notify, TNotify::OnStatus(), and SilentP.
Referenced by PrepArgs().
double TEnv::GetIfArgPrefixFlt | ( | const TStr & | PrefixStr, |
const double & | DfVal = 0 , |
||
const TStr & | DNm = "" |
||
) | const |
Definition at line 250 of file env.cpp.
References TStr::CStr(), Env, GetArgPostfix(), GetArgs(), TStr::GetFlt(), TFlt::GetStr(), IsArgPrefix(), MnArgs, Notify, TNotify::OnStatus(), and SilentP.
int TEnv::GetIfArgPrefixInt | ( | const TStr & | PrefixStr, |
const int & | DfVal = 0 , |
||
const TStr & | DNm = "" |
||
) | const |
Definition at line 209 of file env.cpp.
References TStr::CStr(), Env, GetArgPostfix(), GetArgs(), TStr::GetInt(), TInt::GetStr(), IsArgPrefix(), MnArgs, Notify, TNotify::OnStatus(), and SilentP.
TIntV TEnv::GetIfArgPrefixIntV | ( | const TStr & | PrefixStr, |
TIntV & | DfValV, | ||
const TStr & | DNm = "" |
||
) | const |
Definition at line 231 of file env.cpp.
References TVec< TVal, TSizeTy >::Add(), GetIfArgPrefixStrV(), TInt::GetStr(), and TVec< TVal, TSizeTy >::Len().
Referenced by GetIfArgPrefixIntV().
Definition at line 62 of file env.h.
References GetIfArgPrefixIntV().
TStr TEnv::GetIfArgPrefixStr | ( | const TStr & | PrefixStr, |
const TStr & | DfVal = "" , |
||
const TStr & | DNm = "" |
||
) | const |
Definition at line 110 of file env.cpp.
References TStr::CStr(), Env, GetArgPostfix(), GetArgs(), TStr::GetSubStr(), IsArgPrefix(), TStr::LastCh(), TStr::Len(), MnArgs, Notify, TNotify::OnStatus(), and SilentP.
|
inline |
Definition at line 55 of file env.h.
References GetIfArgPrefixStrV().
Definition at line 57 of file env.h.
References GetIfArgPrefixStrV().
TStrV TEnv::GetIfArgPrefixStrV | ( | const TStr & | PrefixStr, |
TStrV & | DfValV, | ||
const TStr & | DNm = "" |
||
) | const |
Definition at line 136 of file env.cpp.
References TVec< TVal, TSizeTy >::Add(), TStr::CStr(), TVec< TVal, TSizeTy >::Empty(), Env, GetArg(), GetArgs(), TStr::GetSubStr(), TVec< TVal, TSizeTy >::Last(), TStr::Len(), TVec< TVal, TSizeTy >::Len(), MnArgs, Notify, TNotify::OnStatus(), and SilentP.
Referenced by GetIfArgPrefixIntV(), GetIfArgPrefixStrSet(), and GetIfArgPrefixStrV().
Definition at line 53 of file env.h.
References GetIfArgPrefixStrV().
|
inline |
int TEnv::GetPrefixArgN | ( | const TStr & | PrefixStr | ) | const |
Definition at line 31 of file env.cpp.
References GetArg(), GetArgs(), and TStr::Len().
Referenced by GetArgPostfix(), and IsArgPrefix().
void TEnv::GetVarNmV | ( | TStrV & | VarNmV | ) |
Definition at line 272 of file env.cpp.
References TVec< TVal, TSizeTy >::Add(), TVec< TVal, TSizeTy >::Clr(), and TStr::SplitOnCh().
void TEnv::GetVarNmValV | ( | TStrV & | NmValV | ) |
Definition at line 281 of file env.cpp.
References TVec< TVal, TSizeTy >::Add(), and TVec< TVal, TSizeTy >::Clr().
Definition at line 293 of file env.cpp.
References TStr::CStr().
|
inline |
Definition at line 37 of file env.h.
References GetPrefixArgN().
Referenced by GetIfArgPrefixBool(), GetIfArgPrefixFlt(), GetIfArgPrefixInt(), and GetIfArgPrefixStr().
bool TEnv::IsArgStr | ( | const TStr & | ArgStr | ) |
Definition at line 86 of file env.cpp.
References GetArg(), and GetArgs().
Referenced by IsArgStr().
Definition at line 95 of file env.cpp.
References TStr::CStr(), Env, GetArgs(), IsArgStr(), MnArgs, Notify, TNotify::OnStatus(), and SilentP.
bool TEnv::IsEndOfRun | ( | ) | const |
Definition at line 72 of file env.cpp.
References TStr::Empty(), Env, GetArgs(), HdStr, TStr::Len(), MnArgs, and SilentP.
|
inline |
void TEnv::PrepArgs | ( | const TStr & | _HdStr = TStr() , |
const int & | _MnArgs = 1 , |
||
const bool & | SilentP = false |
||
) |
Definition at line 46 of file env.cpp.
References TStr::CStr(), TStr::Empty(), Env, GetArg(), GetArgs(), TStr::GetFBase(), GetIfArgPrefixBool(), HdStr, TStr::Len(), MnArgs, and SilentP.
Definition at line 288 of file env.cpp.
References TStr::CStr(), TStr::Fmt(), and IAssert.
|
private |
|
private |
Definition at line 8 of file env.h.
Referenced by GetHdStr(), IsEndOfRun(), operator=(), and PrepArgs().
|
private |
Definition at line 9 of file env.h.
Referenced by GetIfArgPrefixBool(), GetIfArgPrefixFlt(), GetIfArgPrefixInt(), GetIfArgPrefixStr(), GetIfArgPrefixStrV(), GetMnArgs(), IsArgStr(), IsEndOfRun(), operator=(), and PrepArgs().
|
private |
Definition at line 11 of file env.h.
Referenced by GetIfArgPrefixBool(), GetIfArgPrefixFlt(), GetIfArgPrefixInt(), GetIfArgPrefixStr(), GetIfArgPrefixStrV(), IsArgStr(), and operator=().
|
private |
Definition at line 10 of file env.h.
Referenced by GetIfArgPrefixBool(), GetIfArgPrefixFlt(), GetIfArgPrefixInt(), GetIfArgPrefixStr(), GetIfArgPrefixStrV(), IsArgStr(), IsEndOfRun(), IsSilent(), operator=(), and PrepArgs().