SNAP Library 6.0, Developer Reference  2020-12-09 16:24:20
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
TStdNotify Class Reference

#include <ut.h>

Inheritance diagram for TStdNotify:
Collaboration diagram for TStdNotify:

Public Member Functions

 TStdNotify ()
 
void OnNotify (const TNotifyType &Type, const TStr &MsgStr)
 
void OnStatus (const TStr &MsgStr)
 
- Public Member Functions inherited from TNotify
 TNotify ()
 
virtual ~TNotify ()
 
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 ()
 
- 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)
 

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 126 of file ut.h.

Constructor & Destructor Documentation

TStdNotify::TStdNotify ( )
inline

Definition at line 128 of file ut.h.

Referenced by New().

128 {}

Here is the caller graph for this function:

Member Function Documentation

static PNotify TStdNotify::New ( )
inlinestatic

Definition at line 129 of file ut.h.

References TStdNotify().

129 {return PNotify(new TStdNotify());}
TPt< TNotify > PNotify
Definition: ut.h:30
TStdNotify()
Definition: ut.h:128

Here is the call graph for this function:

void TStdNotify::OnNotify ( const TNotifyType Type,
const TStr MsgStr 
)
virtual

Reimplemented from TNotify.

Definition at line 70 of file ut.cpp.

References TStr::CStr(), TNotify::GetTypeStr(), and ntInfo.

70  {
71  if (Type==ntInfo){
72  printf("%s\n", MsgStr.CStr());
73  } else {
74  TStr TypeStr=TNotify::GetTypeStr(Type, false);
75  printf("%s: %s\n", TypeStr.CStr(), MsgStr.CStr());
76  }
77 }
static TStr GetTypeStr(const TNotifyType &Type, const bool &Brief=true)
Definition: ut.cpp:39
Definition: dt.h:412
Definition: ut.h:28
char * CStr()
Definition: dt.h:479

Here is the call graph for this function:

void TStdNotify::OnStatus ( const TStr MsgStr)
virtual

Reimplemented from TNotify.

Definition at line 79 of file ut.cpp.

References TStr::CStr(), TStr::Empty(), and TStr::LastCh().

79  {
80  printf("%s", MsgStr.CStr());
81  // print '\n' if message not overlayed
82  if ((!MsgStr.Empty())&&(MsgStr.LastCh()!='\r')){
83  printf("\n");}
84 }
char LastCh() const
Definition: dt.h:487
bool Empty() const
Definition: dt.h:491
char * CStr()
Definition: dt.h:479

Here is the call graph for this function:


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