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

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