OpendTect  6.6
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  RCS: $Id$
10 ________________________________________________________________________
11 
12 -*/
13 
14 
15 #include "generalmod.h"
16 #include "bufstring.h"
17 #include "factory.h"
18 
19 class HelpKey;
20 
21 
32 {
33 public:
35  virtual ~HelpProvider() {}
36 
37  static void provideHelp(const HelpKey&);
38  static bool hasHelp(const HelpKey&);
39  static uiString description(const HelpKey&);
40 
41 private:
42  virtual bool hasHelp(const char* arg) const = 0;
43  virtual void provideHelp(const char* arg) const = 0;
44  virtual uiString description(const char* arg) const;
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  bool operator==(const HelpKey&) const;
58  bool isEmpty() const;
59 
62 
63  // Legacy
64  HelpKey(const char* arg)
65  : providername_("od")
66  , argument_( arg )
67  {}
68 
69  mDeprecated("Use the constructor")
70  static HelpKey makeFromString(const char*);
71 };
72 
73 #define mODHelpKey( arg ) HelpKey( "od", ::toString(arg) )
74 #define mODVideoKey( arg ) HelpKey( "odvideo", ::toString(arg) )
75 
76 
HelpProvider::description
static uiString description(const HelpKey &)
HelpKey::HelpKey
HelpKey(const char *arg)
Definition: helpview.h:64
HelpKey::HelpKey
HelpKey()
Definition: helpview.h:54
factory.h
HelpProvider::mDefineFactoryInClass
mDefineFactoryInClass(HelpProvider, factory)
HelpKey
Definition: helpview.h:50
mExpClass
#define mExpClass(module)
Definition: commondefs.h:177
HelpProvider::provideHelp
virtual void provideHelp(const char *arg) const =0
bufstring.h
HelpProvider::~HelpProvider
virtual ~HelpProvider()
Definition: helpview.h:35
HelpProvider::provideHelp
static void provideHelp(const HelpKey &)
HelpKey::mDeprecated
mDeprecated("Use the constructor") static HelpKey makeFromString(const char *)
HelpKey::isEmpty
bool isEmpty() const
HelpProvider
Definition: helpview.h:32
HelpProvider::hasHelp
virtual bool hasHelp(const char *arg) const =0
HelpProvider::hasHelp
static bool hasHelp(const HelpKey &)
HelpKey::operator==
bool operator==(const HelpKey &) const
HelpKey::argument_
BufferString argument_
Definition: helpview.h:61
BufferString
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size.
Definition: bufstring.h:40
HelpKey::HelpKey
HelpKey(const char *providername, const char *arg)
Definition: helpview.h:52
HelpKey::providername_
BufferString providername_
Definition: helpview.h:60
uiString
String that is able to hold international (UTF-8) strings for the user interface.
Definition: uistring.h:121
HelpProvider::description
virtual uiString description(const char *arg) const
HelpKey::emptyHelpKey
static HelpKey emptyHelpKey()

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