SNAP Library 4.0, Developer Reference  2017-07-27 13:18:06
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>

Inheritance diagram for TLogNotify:
Collaboration diagram for TLogNotify:

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.

Referenced by New().

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

Here is the caller graph for this function:

Member Function Documentation

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

Definition at line 154 of file ut.h.

References TLogNotify().

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

Here is the call graph for this function:

void TLogNotify::OnStatus ( const TStr MsgStr)
virtual

Reimplemented from TNotify.

Definition at line 106 of file ut.cpp.

References TStr::CStr(), TStr::Fmt(), TTm::GetCurLocTm(), TTm::GetHMSTColonDotStr(), TTm::GetYMDDashStr(), Notify, and TNotify::OnStatus().

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

Here is the call graph for this function:

Member Data Documentation

PNotify TLogNotify::Notify
private

Definition at line 150 of file ut.h.

Referenced by OnStatus().


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