OpendTect  7.0
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
MsgClass Class Reference

Class to encapsulate a message to the user. More...

Inheritance diagram for MsgClass:
[legend]

Public Types

enum  Type {
  Info , Message , Warning , Error ,
  ProgrammerError
}
 

Public Member Functions

 MsgClass (const char *s, Type t=Info)
 
- Public Member Functions inherited from CallBacker
 CallBacker ()
 
 CallBacker (const CallBacker &)
 
virtual ~CallBacker ()
 
bool attachCB (const NotifierAccess &, const CallBack &, bool onlyifnew=false) const
 
bool attachCB (const NotifierAccess *notif, const CallBack &cb, bool onlyifnew=false) const
 
void detachAllNotifiers () const
 Call from the destructor of your inherited object. More...
 
void detachCB (const NotifierAccess &, const CallBack &) const
 
void detachCB (const NotifierAccess *notif, const CallBack &cb) const
 
virtual bool isCapsule () const
 
bool isNotifierAttached (const NotifierAccess *) const
 Only for debugging purposes, don't use. More...
 
void stopReceivingNotifications () const
 
virtual CallBackertrueCaller ()
 

Static Public Member Functions

static const char * nameOf (Type)
 
static CallBacktheCB (const CallBack *cb=0)
 pass non-null to set the CB More...
 
- Static Public Member Functions inherited from CallBacker
static void createReceiverForCurrentThread ()
 
static void removeReceiverForCurrentThread ()
 

Public Attributes

const char * msg
 
Type type_
 

Detailed Description

Class to encapsulate a message to the user.

Along with the message there's also a type. In any case, there's a handler for when UsrMsg is called: theCB. If it is not set, messages go to cerr.

<>

Member Enumeration Documentation

◆ Type

Enumerator
Info 
Message 
Warning 
Error 
ProgrammerError 

Constructor & Destructor Documentation

◆ MsgClass()

MsgClass::MsgClass ( const char *  s,
Type  t = Info 
)
inline

Member Function Documentation

◆ nameOf()

static const char* MsgClass::nameOf ( Type  )
static

◆ theCB()

static CallBack& MsgClass::theCB ( const CallBack cb = 0)
static

pass non-null to set the CB

Member Data Documentation

◆ msg

const char* MsgClass::msg

◆ type_

Type MsgClass::type_

Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B.V. 1995-2024