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
TStdErrNotify Class Reference

#include <ut.h>

Inheritance diagram for TStdErrNotify:
Collaboration diagram for TStdErrNotify:

Public Member Functions

 TStdErrNotify ()
 
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 137 of file ut.h.

Constructor & Destructor Documentation

TStdErrNotify::TStdErrNotify ( )
inline

Definition at line 139 of file ut.h.

Referenced by New().

139 {}

Here is the caller graph for this function:

Member Function Documentation

static PNotify TStdErrNotify::New ( )
inlinestatic

Definition at line 140 of file ut.h.

References TStdErrNotify().

140 {return PNotify(new TStdErrNotify());}
TPt< TNotify > PNotify
Definition: ut.h:30
TStdErrNotify()
Definition: ut.h:139

Here is the call graph for this function:

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

Reimplemented from TNotify.

Definition at line 88 of file ut.cpp.

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

88  {
89  if (Type==ntInfo){
90  fprintf(stderr, "%s\n", MsgStr.CStr());
91  } else {
92  TStr TypeStr=TNotify::GetTypeStr(Type, false);
93  fprintf(stderr, "%s: %s\n", TypeStr.CStr(), MsgStr.CStr());
94  }
95 }
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 TStdErrNotify::OnStatus ( const TStr MsgStr)
virtual

Reimplemented from TNotify.

Definition at line 97 of file ut.cpp.

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

97  {
98  fprintf(stderr, "%s", MsgStr.CStr());
99  // print '\n' if message not overlayed
100  if ((!MsgStr.Empty())&&(MsgStr.LastCh()!='\r')){
101  fprintf(stderr, "\n");}
102 }
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: