SNAP Library 2.0, User Reference  2013-05-13 16:33:57
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>

Inherited by TNSException.

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 PExcept New (const TStr &MsgStr, const TStr &LocStr=TStr())
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 180 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 171 of file ut.h.

{}

Member Function Documentation

TStr TExcept::GetLocStr ( ) const [inline]

Definition at line 174 of file ut.h.

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

Definition at line 173 of file ut.h.

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

Definition at line 184 of file ut.h.

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

Definition at line 175 of file ut.h.

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

Definition at line 182 of file ut.h.

{return OnExceptF!=NULL;}
static PExcept TExcept::New ( const TStr MsgStr,
const TStr LocStr = TStr() 
) [inline, static]

Definition at line 169 of file ut.h.

                                                                      {
          return PExcept(new TExcept(MsgStr, LocStr)); }
static void TExcept::PutOnExceptF ( TOnExceptF  _OnExceptF) [inline, static]

Definition at line 183 of file ut.h.

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

Definition at line 187 of file ut.h.

                                       {
    if (IsOnExceptF()){(*OnExceptF)(MsgStr);}
    else {throw TExcept::New(MsgStr);}}
static void TExcept::Throw ( const TStr MsgStr,
const TStr ArgStr 
) [inline, static]

Definition at line 190 of file ut.h.

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

Definition at line 194 of file ut.h.

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

Definition at line 198 of file ut.h.

                                                               {
    if (IsOnExceptF()){(*OnExceptF)(MsgStr);}
    else {throw TExcept::New(MsgStr, LocStr);}}

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


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