#include <ut.h>
Inherited by TCallbackNotify, TFPathNotify, TLogNotify, TNativeCallbackNotify, TNullNotify, TStdErrNotify, and TStdNotify.
List of all members.
Public Member Functions |
| 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 Public Member Functions |
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) |
Static Public Attributes |
static const PNotify | NullNotify = TNullNotify::New() |
static const PNotify | StdNotify = TStdNotify::New() |
static const PNotify | StdErrNotify = TStdErrNotify::New() |
Private Member Functions |
| TNotify (const TNotify &) |
TNotify & | operator= (const TNotify &) |
Private Attributes |
TCRef | CRef |
Friends |
class | TPt< TNotify > |
Detailed Description
Definition at line 30 of file ut.h.
Constructor & Destructor Documentation
Definition at line 35 of file ut.h.
Definition at line 36 of file ut.h.
Member Function Documentation
Definition at line 39 of file ut.cpp.
{
static TStr InfoSStr="I"; static TStr InfoLStr="Information";
static TStr WarnSStr="W"; static TStr WarnLStr="Warning";
static TStr ErrSStr="E"; static TStr ErrLStr="Error";
static TStr StatSStr=""; static TStr StatLStr="Status";
switch (Type){
case ntInfo: if (Brief){return InfoSStr;} else {return InfoLStr;}
case ntWarn: if (Brief){return WarnSStr;} else {return WarnLStr;}
case ntErr: if (Brief){return ErrSStr;} else {return ErrLStr;}
case ntStat: if (Brief){return StatSStr;} else {return StatLStr;}
default: Fail; return TStr();
}
}
Definition at line 40 of file ut.h.
Definition at line 56 of file ut.h.
{
if (!Notify.Empty()){Notify->OnLn(MsgStr);}}
Definition at line 21 of file ut.cpp.
{
char Bf[10*1024];
va_list valist;
va_start(valist, FmtStr);
const int RetVal=vsnprintf(Bf, 10*1024-2, FmtStr, valist);
va_end(valist);
if (RetVal!=-1) { OnLn(TStr(Bf)); }
}
Definition at line 51 of file ut.h.
Definition at line 3 of file ut.cpp.
{
char Bf[10*1024];
va_list valist;
va_start(valist, FmtStr);
const int RetVal=vsnprintf(Bf, 10*1024-2, FmtStr, valist);
va_end(valist);
if (RetVal!=-1) { OnNotify(Type, TStr(Bf)); }
}
Definition at line 54 of file ut.h.
Definition at line 12 of file ut.cpp.
{
char Bf[10*1024];
va_list valist;
va_start(valist, FmtStr);
const int RetVal=vsnprintf(Bf, 10*1024-2, FmtStr, valist);
va_end(valist);
if (RetVal!=-1) { OnStatus(TStr(Bf)); }
}
Definition at line 41 of file ut.h.
Definition at line 58 of file ut.h.
Definition at line 30 of file ut.cpp.
{
char Bf[10*1024];
va_list valist;
va_start(valist, FmtStr);
const int RetVal=vsnprintf(Bf, 10*1024-2, FmtStr, valist);
va_end(valist);
if (RetVal!=-1) { OnTxt(TStr(Bf)); }
}
Friends And Related Function Documentation
Definition at line 30 of file ut.h.
Member Data Documentation
Definition at line 30 of file ut.h.
Definition at line 62 of file ut.h.
Definition at line 64 of file ut.h.
Definition at line 63 of file ut.h.
The documentation for this class was generated from the following files: