|
SNAP Library, Developer Reference
2012-10-15 15:06:59
SNAP, a general purpose network analysis and graph mining library
|

Go to the source code of this file.
Classes | |
| class | TTypeNm< Type > |
| class | TNullNotify |
| class | TCallbackNotify |
| class | TNativeCallbackNotify |
| class | TStdNotify |
| class | TStdErrNotify |
| class | TLogNotify |
Defines | |
| #define | Try try { |
| #define | Catch } catch (PExcept Except){ErrNotify(Except->GetMsgStr());} |
| #define | CatchFull } catch (PExcept Except){ErrNotify(Except->GetStr());} |
| #define | CatchAll } catch (...){} |
Typedefs | |
| typedef void(__stdcall * | TCallbackF )(const TNotifyType &Type, const TStr &MsgStr) |
| typedef void(__stdcall * | TNativeCallbackF )(int Type, const char *MsgStr) |
| typedef void(* | TOnExceptF )(const TStr &MsgStr) |
Enumerations | |
| enum | TNotifyType { ntInfo, ntWarn, ntErr, ntStat } |
Functions | |
| template<class Type > | |
| TStr | GetTypeNm (const Type &Var) |
| void | InfoNotify (const TStr &MsgStr) |
| void | WarnNotify (const TStr &MsgStr) |
| void | ErrNotify (const TStr &MsgStr) |
| void | StatNotify (const TStr &MsgStr) |
| ClassTP(TNotify, PNotify) private TNotify & | operator= (const TNotify &) |
| TNotify () | |
| virtual | ~TNotify () |
| virtual void | OnNotify (const TNotifyType &, const TStr &) |
| virtual void | OnStatus (const TStr &) |
| virtual void | OnLn (const TStr &) |
| virtual void | OnTxt (const TStr &) |
| void | OnNotifyFmt (const TNotifyType &Type, const char *FmtStr,...) |
| void | OnStatusFmt (const char *FmtStr,...) |
| void | OnLnFmt (const char *FmtStr,...) |
| void | OnTxtFmt (const char *FmtStr,...) |
| static TStr | GetTypeStr (const TNotifyType &Type, const bool &Brief=true) |
| static void | OnNotify (const PNotify &Notify, const TNotifyType &Type, const TStr &MsgStr) |
| static void | OnStatus (const PNotify &Notify, const TStr &MsgStr) |
| static void | OnLn (const PNotify &Notify, const TStr &MsgStr) |
| static void | OnTxt (const PNotify &Notify, const TStr &MsgStr) |
| static void | DfOnNotify (const TNotifyType &Type, const TStr &MsgStr) |
| UndefDefaultCopyAssign (TExcept) | |
| TExcept (const TStr &_MsgStr) | |
| TExcept (const TStr &_MsgStr, const TStr &_LocStr) | |
| virtual | ~TExcept () |
| TStr | GetMsgStr () const |
| TStr | GetLocStr () const |
| TStr | GetStr () const |
| static bool | IsOnExceptF () |
| static void | PutOnExceptF (TOnExceptF _OnExceptF) |
| static TOnExceptF | GetOnExceptF () |
| static void | Throw (const TStr &MsgStr) |
| static void | Throw (const TStr &MsgStr, const TStr &ArgStr) |
| static void | Throw (const TStr &MsgStr, const TStr &ArgStr1, const TStr &ArgStr2) |
| static void | ThrowFull (const TStr &MsgStr, const TStr &LocStr) |
Variables | |
| static const PNotify | NullNotify = TNullNotify::New() |
| static const PNotify | StdNotify = TStdNotify::New() |
| static const PNotify | StdErrNotify = TStdErrNotify::New() |
| ClassTP(TExcept, PExcept) private TStr | LocStr |
| static TOnExceptF | OnExceptF = NULL |
| typedef void(__stdcall * TCallbackF)(const TNotifyType &Type, const TStr &MsgStr) |
| typedef void(__stdcall * TNativeCallbackF)(int Type, const char *MsgStr) |
| typedef void(* TOnExceptF)(const TStr &MsgStr) |
| enum TNotifyType |
| void TNotify::DfOnNotify | ( | const TNotifyType & | Type, |
| const TStr & | MsgStr | ||
| ) | [static] |
Definition at line 54 of file ut.cpp.
References ErrNotify(), Fail, InfoNotify(), ntErr, ntInfo, ntStat, ntWarn, StatNotify(), and WarnNotify().
{
switch (Type){
case ntInfo: InfoNotify(MsgStr); break;
case ntWarn: WarnNotify(MsgStr); break;
case ntErr: ErrNotify(MsgStr); break;
case ntStat: StatNotify(MsgStr); break;
default: Fail;
}
}

Definition at line 23 of file ut.h.
References TStr::CStr(), and ErrNotify().

| static TOnExceptF GetOnExceptF | ( | ) | [static] |
Definition at line 171 of file ut.h.
References TPt< TRec >::Empty(), GetLocStr(), GetMsgStr(), and LocStr.

Definition at line 14 of file ut.h.
References TTypeNm< Type >::GetNrTypeNm().
Referenced by TVec< TVal >::GetXOutOfBoundsErrMsg(), and TVec< TVal >::Resize().
{
TStr TypeNm=TStr(typeid(Var).name());
return TTypeNm<Type>::GetNrTypeNm(TypeNm);
}


| static TStr GetTypeStr | ( | const TNotifyType & | Type, |
| const bool & | Brief = true |
||
| ) | [static] |
| void InfoNotify | ( | const TStr & | MsgStr | ) | [inline] |
Definition at line 21 of file ut.h.
References TStr::CStr(), and InfoNotify().
{InfoNotify(MsgStr.CStr());}

| static bool IsOnExceptF | ( | ) | [static] |
| void TNotify::OnLnFmt | ( | const char * | FmtStr, |
| ... | |||
| ) |
| virtual void OnNotify | ( | const TNotifyType & | , |
| const TStr & | |||
| ) | [virtual] |
Definition at line 36 of file ut.h.
Referenced by OnNotifyFmt().
{}

| static void OnNotify | ( | const PNotify & | Notify, |
| const TNotifyType & | Type, | ||
| const TStr & | MsgStr | ||
| ) | [static] |
| void TNotify::OnNotifyFmt | ( | const TNotifyType & | Type, |
| const char * | FmtStr, | ||
| ... | |||
| ) |
Definition at line 37 of file ut.h.
Referenced by TEnv::GetIfArgPrefixBool(), TEnv::GetIfArgPrefixFlt(), TEnv::GetIfArgPrefixInt(), TEnv::GetIfArgPrefixStr(), TEnv::GetIfArgPrefixStrV(), and OnStatusFmt().
{}

| void TNotify::OnStatusFmt | ( | const char * | FmtStr, |
| ... | |||
| ) |
Definition at line 39 of file ut.h.
Referenced by OnTxtFmt().
{}

| void TNotify::OnTxtFmt | ( | const char * | FmtStr, |
| ... | |||
| ) |
| static void PutOnExceptF | ( | TOnExceptF | _OnExceptF | ) | [static] |
| void StatNotify | ( | const TStr & | MsgStr | ) | [inline] |
Definition at line 24 of file ut.h.
References TStr::CStr(), and StatNotify().
{StatNotify(MsgStr.CStr());}

Definition at line 165 of file ut.h.
Referenced by TILx::GetSym(), Throw(), and ThrowFull().

Definition at line 183 of file ut.h.
References IsOnExceptF(), MsgStr, and TExcept().
Referenced by TExpBi::AssertArgs(), TExpBi::AssertArgValType(), AssertBlobTag(), TXmlObjSer::AssertXmlHd(), TXmlLx::EThrow(), EvalExp(), EvalExpOp(), TExpBi::GetBiConstVal(), TExpBi::GetBiFuncVal(), TXmlObjSer::GetBoolArg(), GetChAFromVal(), TXmlObjSer::GetFltArg(), GetFltValAsInt(), TXmlObjSer::GetInt64Arg(), TXmlObjSer::GetIntArg(), GetObjTypeFromStr(), GetValFromLx(), NR_gaussj(), NR_lfit(), NR_svdcmp(), and XLoadFromFile().
{
if (IsOnExceptF()){(*OnExceptF)(MsgStr);}
else {throw PExcept(new TExcept(MsgStr));}}


Definition at line 186 of file ut.h.
References IsOnExceptF(), and TExcept().
{
TStr FullMsgStr=MsgStr+" ("+ArgStr+")";
if (IsOnExceptF()){(*OnExceptF)(FullMsgStr);}
else {throw PExcept(new TExcept(FullMsgStr));}}

Definition at line 190 of file ut.h.
References IsOnExceptF(), and TExcept().
{
TStr FullMsgStr=MsgStr+" ("+ArgStr1+", "+ArgStr2+")";
if (IsOnExceptF()){(*OnExceptF)(FullMsgStr);}
else {throw PExcept(new TExcept(FullMsgStr));}}

Definition at line 194 of file ut.h.
References IsOnExceptF(), MsgStr, and TExcept().
Referenced by AssertBlobBsStateStr().
{
if (IsOnExceptF()){(*OnExceptF)(MsgStr);}
else {throw PExcept(new TExcept(MsgStr, LocStr));}}


| void WarnNotify | ( | const TStr & | MsgStr | ) | [inline] |
Definition at line 22 of file ut.h.
References TStr::CStr(), and WarnNotify().
{WarnNotify(MsgStr.CStr());}

Definition at line 159 of file ut.h.
Referenced by GetLocStr(), and GetStr().
const PNotify TNotify::NullNotify = TNullNotify::New() [static] |
TExcept::TOnExceptF TExcept::OnExceptF = NULL [static] |
Definition at line 177 of file ut.h.
Referenced by GetOnExceptF(), IsOnExceptF(), and PutOnExceptF().
const PNotify TNotify::StdErrNotify = TStdErrNotify::New() [static] |
const PNotify TNotify::StdNotify = TStdNotify::New() [static] |