OpendTect-6_4  6.4
uiattribfactory.h
Go to the documentation of this file.
1 #ifndef uiattribfactory_h
2 #define uiattribfactory_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: Nanne Hemstra
9  Date: September 2006
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 -*/
14 
15 #include "uiattributesmod.h"
16 #include "bufstringset.h"
17 
18 class uiAttrDescEd;
19 class uiParent;
20 
24 typedef uiAttrDescEd* (*uiAttrDescEdCreateFunc)(uiParent*,bool);
25 
27 {
28 public:
29  virtual ~uiAttributeFactory();
30 
31  int add(const char* displaynm,const char* attrnm,
32  const char* grpnm,uiAttrDescEdCreateFunc,int,int);
33  uiAttrDescEd* create(uiParent*,const char* nm, bool,
34  bool dispnm=true) const;
35 
36  int size() const { return entries_.size(); }
37  const char* getAttribName( int idx ) const
38  { return entries_[idx]->attrnm_; }
39  const char* getDisplayName( int idx ) const
40  { return entries_[idx]->dispnm_; }
41  const char* getGroupName( int idx ) const
42  { return entries_[idx]->grpnm_; }
43  int domainType( int idx ) const
44  { return entries_[idx]->domtyp_; }
47  int dimensionType( int idx ) const
48  { return entries_[idx]->dimtyp_; }
51 
52  const char* dispNameOf(const char*) const;
53  const char* attrNameOf(const char*) const;
54  bool isPresent(const char*,bool dispnm) const;
55 
56 protected:
57 
58  struct Entry
59  {
60  Entry( const char* dn, const char* an,
61  const char* gn,
63  int dt, int dimtyp )
64  : dispnm_(dn)
65  , attrnm_(an)
66  , grpnm_(gn)
67  , domtyp_(dt)
68  , dimtyp_(dimtyp)
69  , crfn_(fn) {}
70 
74  int domtyp_;
75  int dimtyp_;
77  };
78 
80 
81  Entry* getEntry(const char*,bool) const;
82 
83  friend mGlobal(uiAttributes) uiAttributeFactory& uiAF();
84  void fillStd();
85 };
86 
87 mGlobal(uiAttributes) uiAttributeFactory& uiAF();
88 
89 
90 #endif
#define mExpClass(module)
Definition: commondefs.h:160
int dimensionType(int idx) const
Definition: uiattribfactory.h:47
Definition: uiattribfactory.h:26
#define mGlobal(module)
Definition: commondefs.h:163
const char * getGroupName(int idx) const
Definition: uiattribfactory.h:41
Attribute description editor.
Definition: uiattrdesced.h:83
int size() const
Definition: uiattribfactory.h:36
Definition: uiparent.h:26
BufferString attrnm_
Definition: uiattribfactory.h:72
Entry(const char *dn, const char *an, const char *gn, uiAttrDescEdCreateFunc fn, int dt, int dimtyp)
Definition: uiattribfactory.h:60
Set of pointers to objects.
Definition: commontypes.h:32
uiAttrDescEdCreateFunc crfn_
Definition: uiattribfactory.h:76
BufferString grpnm_
Definition: uiattribfactory.h:73
const char * getAttribName(int idx) const
Definition: uiattribfactory.h:37
BufferString dispnm_
Definition: uiattribfactory.h:71
Definition: uiattribfactory.h:58
uiAttributeFactory & uiAF()
int domtyp_
Definition: uiattribfactory.h:74
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:40
const char * getDisplayName(int idx) const
Definition: uiattribfactory.h:39
static uiHor3DInterpol * create(uiParent *)
int domainType(int idx) const
Definition: uiattribfactory.h:43
ObjectSet< Entry > entries_
Definition: uiattribfactory.h:79
uiAttrDescEd *(* uiAttrDescEdCreateFunc)(uiParent *, bool)
Factory for attrib editors.
Definition: uiattribfactory.h:24
int dimtyp_
Definition: uiattribfactory.h:75

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