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

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