11 else {
return TypeNm;}}
17 TStr TypeNm=
TStr(
typeid(Var).name());
33 TNotify& operator=(const TNotify&);
44 void OnNotifyFmt(
const TNotifyType& Type,
const char *FmtStr, ...);
45 void OnStatusFmt(
const char *FmtStr, ...);
46 void OnLnFmt(
const char *FmtStr, ...);
47 void OnTxtFmt(
const char *FmtStr, ...);
49 static TStr GetTypeStr(
57 if (!Notify.
Empty()){Notify->
OnLn(MsgStr);}}
167 TExcept(const
TStr& _MsgStr): MsgStr(_MsgStr), LocStr(){}
176 if (LocStr.Empty()){
return GetMsgStr();}
177 else {
return GetLocStr()+
": "+GetMsgStr();}}
180 typedef void (*TOnExceptF)(
const TStr& MsgStr);
188 if (IsOnExceptF()){(*OnExceptF)(MsgStr);}
191 TStr FullMsgStr=MsgStr+
" ("+ArgStr+
")";
192 if (IsOnExceptF()){(*OnExceptF)(FullMsgStr);}
195 TStr FullMsgStr=MsgStr+
" ("+ArgStr1+
", "+ArgStr2+
")";
196 if (IsOnExceptF()){(*OnExceptF)(FullMsgStr);}
199 if (IsOnExceptF()){(*OnExceptF)(MsgStr);}
204 #define Catch } catch (PExcept Except){ErrNotify(Except->GetMsgStr());}
205 #define CatchFull } catch (PExcept Except){ErrNotify(Except->GetStr());}
206 #define CatchAll } catch (...){}
TStr GetTypeNm(const Type &Var)
static void Throw(const TStr &MsgStr, const TStr &ArgStr1, const TStr &ArgStr2)
static PExcept New(const TStr &MsgStr, const TStr &LocStr=TStr())
TExcept(const TStr &_MsgStr, const TStr &_LocStr)
#define UndefDefaultCopyAssign(TNm)
static void PutOnExceptF(TOnExceptF _OnExceptF)
bool IsPrefix(const char *Str) const
void ErrNotify(const TStr &MsgStr)
static void OnLn(const PNotify &Notify, const TStr &MsgStr)
void OnStatus(const TStr &MsgStr)
void OnNotify(const TNotifyType &Type, const TStr &MsgStr)
void InfoNotify(const TStr &MsgStr)
void OnNotify(const TNotifyType &Type, const TStr &MsgStr)
TStr GetSubStr(const int &BChN, const int &EChN) const
TNativeCallbackF CallbackF
static const PNotify StdErrNotify
TLogNotify(const PNotify &_Notify)
void StatNotify(const TStr &MsgStr)
void(__stdcall * TNativeCallbackF)(int Type, const char *MsgStr)
void(__stdcall * TCallbackF)(const TNotifyType &Type, const TStr &MsgStr)
static TOnExceptF GetOnExceptF()
#define ClassTP(TNm, PNm)
void OnStatus(const TStr &MsgStr)
static void OnStatus(const PNotify &Notify, const TStr &MsgStr)
static void Throw(const TStr &MsgStr)
void WarnNotify(const TStr &MsgStr)
virtual void OnTxt(const TStr &)
virtual void OnLn(const TStr &)
void OnStatus(const TStr &MsgStr)
static void OnNotify(const PNotify &Notify, const TNotifyType &Type, const TStr &MsgStr)
static PNotify New(const TNativeCallbackF &CallbackF)
static void ThrowFull(const TStr &MsgStr, const TStr &LocStr)
virtual void OnNotify(const TNotifyType &, const TStr &)
static const PNotify StdNotify
static bool IsOnExceptF()
void OnNotify(const TNotifyType &Type, const TStr &MsgStr)
static void Throw(const TStr &MsgStr, const TStr &ArgStr)
static void OnTxt(const PNotify &Notify, const TStr &MsgStr)
void OnStatus(const TStr &MsgStr)
static const PNotify NullNotify
static PNotify New(const TCallbackF &CallbackF)
enum TNotifyType_ TNotifyType
TCallbackNotify(const TCallbackF &_CallbackF)
virtual void OnStatus(const TStr &)
void OnStatus(const TStr &MsgStr)
static TStr GetNrTypeNm(const TStr &TypeNm)
void OnNotify(const TNotifyType &Type, const TStr &MsgStr)
TNativeCallbackNotify(const TNativeCallbackF &_CallbackF)
static TOnExceptF OnExceptF
void OnStatus(const TStr &MsgStr)
static PNotify New(const PNotify &Notify)
void OnNotify(const TNotifyType &Type, const TStr &MsgStr)