OpendTect  6.6
msgh.h
Go to the documentation of this file.
1 #pragma once
2 
3 /*
4 ________________________________________________________________________
5 
6  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
7  Author: A.H.Bril
8  Date: 19-10-1995
9  Contents: Error handler
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 */
14 
15 #include "basicmod.h"
16 #include "callback.h"
17 
18 
26 mExpClass(Basic) MsgClass : public CallBacker
27 {
28 public:
29 
30  enum Type { Info, Message, Warning, Error, ProgrammerError };
31 
32  MsgClass( const char* s, Type t=Info )
33  : msg(s), type_(t) {}
34 
35  const char* msg;
37 
38  static CallBack& theCB( const CallBack* cb=0 );
40  static const char* nameOf(Type);
41 
42 };
43 
44 
45 mGlobal(Basic) void UsrMsg(const char*,MsgClass::Type t=MsgClass::Info);
47 
48 
49 
MsgClass::type_
Type type_
Definition: msgh.h:36
MsgClass::Warning
@ Warning
Definition: msgh.h:30
mGlobal
#define mGlobal(module)
Definition: commondefs.h:180
MsgClass::theCB
static CallBack & theCB(const CallBack *cb=0)
pass non-null to set the CB
mExpClass
#define mExpClass(module)
Definition: commondefs.h:177
callback.h
CallBacker
Inherit from this class to be able to send and/or receive CallBacks.
Definition: callback.h:185
MsgClass
Class to encapsulate a message to the user.
Definition: msgh.h:27
MsgClass::nameOf
static const char * nameOf(Type)
CallBack
CallBacks object-oriented (object + method).
Definition: callback.h:62
MsgClass::Info
@ Info
Definition: msgh.h:30
MsgClass::Type
Type
Definition: msgh.h:30
MsgClass::msg
const char * msg
Definition: msgh.h:35
UsrMsg
void UsrMsg(const char *, MsgClass::Type t=MsgClass::Info)
Will pass the message to the appropriate destination.
MsgClass::MsgClass
MsgClass(const char *s, Type t=Info)
Definition: msgh.h:32

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