SNAP Library , Developer Reference  2013-01-07 14:03:36
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
TExcept Class Reference

#include <ut.h>

Collaboration diagram for TExcept:

List of all members.

Public Types

typedef void(* TOnExceptF )(const TStr &MsgStr)

Public Member Functions

 TExcept (const TStr &_MsgStr)
 TExcept (const TStr &_MsgStr, const TStr &_LocStr)
virtual ~TExcept ()
TStr GetMsgStr () const
TStr GetLocStr () const
TStr GetStr () const

Static Public Member Functions

static bool IsOnExceptF ()
static void PutOnExceptF (TOnExceptF _OnExceptF)
static TOnExceptF GetOnExceptF ()
static void Throw (const TStr &MsgStr)
static void Throw (const TStr &MsgStr, const TStr &ArgStr)
static void Throw (const TStr &MsgStr, const TStr &ArgStr1, const TStr &ArgStr2)
static void ThrowFull (const TStr &MsgStr, const TStr &LocStr)

Static Public Attributes

static TOnExceptF OnExceptF = NULL

Private Member Functions

 UndefDefaultCopyAssign (TExcept)

Private Attributes

TCRef CRef
TStr MsgStr
TStr LocStr

Friends

class TPt< TExcept >

Detailed Description

Definition at line 161 of file ut.h.


Member Typedef Documentation

typedef void(* TExcept::TOnExceptF)(const TStr &MsgStr)

Definition at line 178 of file ut.h.


Constructor & Destructor Documentation

TExcept::TExcept ( const TStr _MsgStr) [inline]

Definition at line 167 of file ut.h.

: MsgStr(_MsgStr), LocStr(){}
TExcept::TExcept ( const TStr _MsgStr,
const TStr _LocStr 
) [inline]

Definition at line 168 of file ut.h.

: MsgStr(_MsgStr), LocStr(_LocStr){}
virtual TExcept::~TExcept ( ) [inline, virtual]

Definition at line 169 of file ut.h.

{}

Member Function Documentation

TStr TExcept::GetLocStr ( ) const [inline]

Definition at line 172 of file ut.h.

{return LocStr;}
TStr TExcept::GetMsgStr ( ) const [inline]

Definition at line 171 of file ut.h.

{return MsgStr;}
static TOnExceptF TExcept::GetOnExceptF ( ) [inline, static]

Definition at line 182 of file ut.h.

{return OnExceptF;}
TStr TExcept::GetStr ( ) const [inline]

Definition at line 173 of file ut.h.

                      {
    if (LocStr.Empty()){return GetMsgStr();}
    else {return GetLocStr()+": "+GetMsgStr();}}
static bool TExcept::IsOnExceptF ( ) [inline, static]

Definition at line 180 of file ut.h.

{return OnExceptF!=NULL;}
static void TExcept::PutOnExceptF ( TOnExceptF  _OnExceptF) [inline, static]

Definition at line 181 of file ut.h.

{OnExceptF=_OnExceptF;}
static void TExcept::Throw ( const TStr MsgStr,
const TStr ArgStr 
) [inline, static]

Definition at line 188 of file ut.h.

                                                           {
    TStr FullMsgStr=MsgStr+" ("+ArgStr+")";
    if (IsOnExceptF()){(*OnExceptF)(FullMsgStr);}
    else {throw PExcept(new TExcept(FullMsgStr));}}
static void TExcept::Throw ( const TStr MsgStr,
const TStr ArgStr1,
const TStr ArgStr2 
) [inline, static]

Definition at line 192 of file ut.h.

                                                                                 {
    TStr FullMsgStr=MsgStr+" ("+ArgStr1+", "+ArgStr2+")";
    if (IsOnExceptF()){(*OnExceptF)(FullMsgStr);}
    else {throw PExcept(new TExcept(FullMsgStr));}}
static void TExcept::ThrowFull ( const TStr MsgStr,
const TStr LocStr 
) [inline, static]

Definition at line 196 of file ut.h.

Referenced by TBlobBs::AssertBlobBsStateStr().

                                                               {
    if (IsOnExceptF()){(*OnExceptF)(MsgStr);}
    else {throw PExcept(new TExcept(MsgStr, LocStr));}}

Here is the caller graph for this function:


Friends And Related Function Documentation

friend class TPt< TExcept > [friend]

Definition at line 161 of file ut.h.


Member Data Documentation

TCRef TExcept::CRef [private]

Definition at line 161 of file ut.h.

TStr TExcept::LocStr [private]

Definition at line 164 of file ut.h.

TStr TExcept::MsgStr [private]

Definition at line 163 of file ut.h.

Definition at line 179 of file ut.h.


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