OpendTect-6_4  6.4
searchkey.h
Go to the documentation of this file.
1 #ifndef searchkey_h
2 #define searchkey_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: Jaap Glas
9  Date: May 2011
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 -*/
14 
15 #include "uicmddrivermod.h"
16 #include "bufstringset.h"
17 
18 class uiMainWin;
19 
20 
21 namespace CmdDrive {
22 
23 
24 #define mMatchCI(expr1,expr2) caseInsensitiveEqual(expr1,expr2,0)
25 
26 #define mSearchKey(expr) SearchKey(expr,drv_.isCaseSensitive())
27 
28 class WildcardManager;
29 
30 mExpClass(uiCmdDriver) SearchKey
31 {
32 public:
33  SearchKey(const char* expr,bool casesensitive=true);
34 
35  bool isMatching(const char* name) const;
36 
37  void getMatchingWindows(const uiMainWin* applwin,
39  WildcardManager* =0) const;
41 
42  const BufferStringSet& wildcardList() const { return wildcardlist_; }
43 
44 protected:
45 
48 
49  bool isMatch(const char* keyptr,const char* nameptr,
50  const char* orgnameptr) const;
51 
53 
54 };
55 
56 
58 {
59 public:
60  WildcardManager();
61  ~WildcardManager();
62 
63  void reInit();
64  void check(const SearchKey&,const char* name,
65  bool addescapes=true);
66  void flush(bool yn=true);
67 
68  int nrWildcards() const { return wildcards_.size(); }
69 
70  const BufferString* wildcard(int) const;
71  const BufferString* wildcardStr(int) const;
72 
73 protected:
74 
79 };
80 
81 } // namespace CmdDrive
82 
83 #endif
#define mExpClass(module)
Definition: commondefs.h:160
User interface main window.
Definition: uimainwin.h:36
BufferStringSet newwildcardstrings_
Definition: searchkey.h:78
BufferStringSet wildcardlist_
Definition: searchkey.h:52
BufferStringSet newwildcards_
Definition: searchkey.h:77
BufferStringSet wildcardstrings_
Definition: searchkey.h:76
Command Drive
Definition: canvascommands.h:22
Definition: searchkey.h:57
BufferString searchexpr_
Definition: searchkey.h:46
Set of BufferString objects.
Definition: bufstringset.h:28
const BufferStringSet & wildcardList() const
Definition: searchkey.h:42
BufferStringSet wildcards_
Definition: searchkey.h:75
Definition: searchkey.h:30
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:40
bool casesensitive_
Definition: searchkey.h:47
int nrWildcards() const
Definition: searchkey.h:68

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