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 <macro.h>
Public Member Functions | |
TMacro (const TStr &TxtStr, const char &_MacroCh='$', const char &_VarCh='#') | |
~TMacro () | |
TMacro (TSIn &) | |
void | Save (TSOut &) const |
TMacro & | operator= (const TMacro &) |
bool | IsOk () const |
TStr | GetMsgStr () const |
TStr | GetSrcTxtStr () const |
TStr | GetDstTxtStr () const |
int | GetSubstStrs () const |
TStr | GetSrcSubstStr (const int &SubstStrN) const |
bool | IsSrcSubstStr (const TStr &SrcSubstStr, int &SubstStrN) const |
int | GetSrcSubstStrN (const TStr &SrcSubstStr) const |
void | GetSrcSubstStrV (TStrV &SubstStrV) const |
TStr | GetDstSubstStr (const int &SubstStrN=0) const |
void | PutSubstValStr (const int &SubstStrN, const TStr &ValStr) |
TStr | GetSubstValStr (const int &SubstStrN) const |
TStr | GetAllSubstValStr () const |
int | GetVars () const |
TStr | GetVarNm (const int &VarN) const |
void | GetVarNmV (TStrV &VarNmV) const |
void | PutVarVal (const TStr &VarNm, const TStr &ValStr) |
TStr | GetVarVal (const TStr &VarNm) const |
Static Public Member Functions | |
static PMacro | New (const TStr &TxtStr, const char &MacroCh='$', const char &VarCh='#') |
static PMacro | Load (TSIn &) |
static void | SplitVarNm (const TStr &VarNm, TStr &CapStr, bool &IsComboBox, TStr &TbNm, TStr &ListFldNm, TStr &DataFldNm) |
Public Attributes | |
bool | Ok |
TStr | MsgStr |
char | MacroCh |
char | VarCh |
TStr | TxtStr |
TStrStrH | SubstToValStrH |
TStrStrH | VarNmToValStrH |
Private Attributes | |
TCRef | CRef |
Friends | |
class | TPt< TMacro > |
TMacro::TMacro | ( | const TStr & | TxtStr, |
const char & | _MacroCh = '$' , |
||
const char & | _VarCh = '#' |
||
) |
Definition at line 3 of file macro.cpp.
References THash< TKey, TDat, THashFunc >::AddDat(), TChA::Len(), TStr::Len(), MacroCh, MsgStr, Ok, SubstToValStrH, TxtStr, VarCh, and VarNmToValStrH.
|
inline |
TStr TMacro::GetAllSubstValStr | ( | ) | const |
Definition at line 87 of file macro.cpp.
References GetSubstStrs(), and GetSubstValStr().
TStr TMacro::GetDstSubstStr | ( | const int & | SubstStrN = 0 | ) | const |
Definition at line 67 of file macro.cpp.
References THash< TKey, TDat, THashFunc >::GetKey(), GetVarVal(), IAssert, TStr::Len(), SubstToValStrH, and VarCh.
TStr TMacro::GetDstTxtStr | ( | ) | const |
Definition at line 38 of file macro.cpp.
References THash< TKey, TDat, THashFunc >::IsKey(), TStr::Len(), MacroCh, SubstToValStrH, and TxtStr.
|
inline |
Definition at line 33 of file macro.h.
References THash< TKey, TDat, THashFunc >::GetKey().
Referenced by GetSrcSubstStrV().
|
inline |
Definition at line 37 of file macro.h.
References THash< TKey, TDat, THashFunc >::GetKeyId().
void TMacro::GetSrcSubstStrV | ( | TStrV & | SubstStrV | ) | const |
Definition at line 60 of file macro.cpp.
References TVec< TVal, TSizeTy >::Add(), TVec< TVal, TSizeTy >::Gen(), GetSrcSubstStr(), and GetSubstStrs().
|
inline |
Definition at line 32 of file macro.h.
References THash< TKey, TDat, THashFunc >::Len().
Referenced by GetAllSubstValStr(), and GetSrcSubstStrV().
|
inline |
Definition at line 43 of file macro.h.
Referenced by GetAllSubstValStr().
|
inline |
Definition at line 48 of file macro.h.
References THash< TKey, TDat, THashFunc >::GetKey().
Referenced by GetVarNmV().
void TMacro::GetVarNmV | ( | TStrV & | VarNmV | ) | const |
Definition at line 96 of file macro.cpp.
References TVec< TVal, TSizeTy >::Add(), TVec< TVal, TSizeTy >::Gen(), GetVarNm(), and GetVars().
|
inline |
Definition at line 47 of file macro.h.
References THash< TKey, TDat, THashFunc >::Len().
Referenced by GetVarNmV().
Definition at line 52 of file macro.h.
References THash< TKey, TDat, THashFunc >::GetDat().
Referenced by GetDstSubstStr().
|
inline |
Definition at line 35 of file macro.h.
References THash< TKey, TDat, THashFunc >::IsKey().
|
inlinestatic |
Definition at line 16 of file macro.h.
|
inline |
Definition at line 50 of file macro.h.
References THash< TKey, TDat, THashFunc >::AddDat().
|
inline |
|
static |
Definition at line 103 of file macro.cpp.
References TStr::GetSubStr(), IAssert, TStr::Len(), and TStr::SearchCh().
char TMacro::MacroCh |
Definition at line 9 of file macro.h.
Referenced by GetDstTxtStr(), and TMacro().
TStrStrH TMacro::SubstToValStrH |
Definition at line 12 of file macro.h.
Referenced by GetDstSubstStr(), GetDstTxtStr(), and TMacro().
TStr TMacro::TxtStr |
Definition at line 11 of file macro.h.
Referenced by GetDstTxtStr(), and TMacro().
char TMacro::VarCh |
Definition at line 10 of file macro.h.
Referenced by GetDstSubstStr(), and TMacro().