OpendTect-6_4  6.4
helpview.h
Go to the documentation of this file.
1 #ifndef helpview_h
2 #define helpview_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: 18-8-2000
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 -*/
14 
15 
16 #include "generalmod.h"
17 #include "bufstring.h"
18 #include "factory.h"
19 
20 class HelpKey;
21 
22 
33 {
34 public:
35  mDefineFactoryInClass(HelpProvider,factory);
36  virtual ~HelpProvider() {}
37 
38  static void provideHelp(const HelpKey&);
39  static bool hasHelp(const HelpKey&);
40 
41 
42 private:
43  virtual bool hasHelp(const char* arg) const = 0;
44  virtual void provideHelp(const char* arg) const = 0;
45 };
46 
47 
48 /* Key to contain both a helpprovidername and an argument */
50 {
51 public:
52  HelpKey(const char* providername,const char* arg)
53  : providername_( providername ), argument_(arg) {}
54  HelpKey() : providername_( 0 ) {}
55 
56  static HelpKey emptyHelpKey();
57  bool isEmpty() const;
58 
59  const char* providername_;
61 
62 
63  //This constructor is for legacy stuff. Remove.
64  HelpKey(const char* arg)
65  : providername_("od")
66  , argument_( arg )
67  {}
68 };
69 
70 #define mODHelpKey( arg ) HelpKey( "od", ::toString(arg) )
71 
72 
73 #endif
#define mExpClass(module)
Definition: commondefs.h:160
static HelpKey emptyHelpKey()
HelpKey(const char *providername, const char *arg)
Definition: helpview.h:52
Definition: helpview.h:49
virtual ~HelpProvider()
Definition: helpview.h:36
#define mDefineFactoryInClass(T, funcname)
Definition: factory.h:426
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:40
const char * providername_
Definition: helpview.h:59
HelpKey(const char *arg)
Definition: helpview.h:64
BufferString argument_
Definition: helpview.h:60
HelpKey()
Definition: helpview.h:54
bool isEmpty(const NLAModel *mdl)
Definition: helpview.h:32

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