SNAP Library 3.0, User Reference  2016-07-20 17:56:49
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
TLogNotify Class Reference

#include <ut.h>

Inherits TNotify.

Public Member Functions

 TLogNotify (const PNotify &_Notify)
 
void OnStatus (const TStr &MsgStr)
 
- Public Member Functions inherited from TNotify
 TNotify ()
 
virtual ~TNotify ()
 
virtual void OnNotify (const TNotifyType &, 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 PNotify New (const PNotify &Notify)
 
- Static Public Member Functions inherited from TNotify
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)
 

Private Attributes

PNotify Notify
 

Additional Inherited Members

- Static Public Attributes inherited from TNotify
static const PNotify NullNotify =TNullNotify::New()
 
static const PNotify StdNotify =TStdNotify::New()
 
static const PNotify StdErrNotify =TStdErrNotify::New()
 

Detailed Description

Definition at line 148 of file ut.h.

Constructor & Destructor Documentation

TLogNotify::TLogNotify ( const PNotify _Notify)
inline

Definition at line 153 of file ut.h.

153 : Notify(_Notify) { }
PNotify Notify
Definition: ut.h:150

Member Function Documentation

static PNotify TLogNotify::New ( const PNotify Notify)
inlinestatic

Definition at line 154 of file ut.h.

154 { return new TLogNotify(Notify); }
TLogNotify(const PNotify &_Notify)
Definition: ut.h:153
void TLogNotify::OnStatus ( const TStr MsgStr)
virtual

Reimplemented from TNotify.

Definition at line 106 of file ut.cpp.

106  {
107  TTm NowTm = TTm::GetCurLocTm();
108  Notify->OnStatus(TStr::Fmt("[%s %s] %s",
109  NowTm.GetYMDDashStr().CStr(),
110  NowTm.GetHMSTColonDotStr(true, false).CStr(),
111  MsgStr.CStr()));
112 }
TStr GetYMDDashStr() const
Definition: tm.cpp:975
static TTm GetCurLocTm()
Definition: tm.cpp:1060
Definition: tm.h:213
PNotify Notify
Definition: ut.h:150
virtual void OnStatus(const TStr &)
Definition: ut.h:39
static TStr Fmt(const char *FmtStr,...)
Definition: dt.cpp:1599
TStr GetHMSTColonDotStr(const bool &FullP=false, const bool &MSecP=true) const
Definition: tm.cpp:983
char * CStr()
Definition: dt.h:476

Member Data Documentation

PNotify TLogNotify::Notify
private

Definition at line 150 of file ut.h.


The documentation for this class was generated from the following files: