OpendTect-6_4  6.4
iodirentry.h
Go to the documentation of this file.
1 #ifndef iodirentry_h
2 #define iodirentry_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: April 2001
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 -*/
14 
15 #include "generalmod.h"
16 #include "multiid.h"
17 #include "namedobj.h"
18 #include "objectset.h"
19 
20 class BufferStringSet;
21 class IODir;
22 class IOObj;
23 class IOObjContext;
24 class TranslatorGroup;
25 
28 mExpClass(General) IODirEntry : public NamedObject
29 {
30 public:
31  IODirEntry(const IOObj*);
32  const IOObj* ioobj_;
33 };
34 
35 
39 {
40 public:
41  IODirEntryList(const IODir&,const IOObjContext&);
43  IODirEntryList(const IODir&,const TranslatorGroup*,
44  bool maychgdir,
45  const char* translator_globexpr=0);
47  ~IODirEntryList();
48  const char* name() const { return name_; }
49 
50  void fill(const IODir&,const char* nmfiltglobexpr=0);
52  void setSelected(const MultiID&);
53  void sort();
54  void setCurrent( int idx ) { cur_ = idx; }
55  const IODirEntry* current() const
56  { return cur_ < 0 || cur_ >= size() ? 0
57  : (*(IODirEntryList*)this)[cur_]; }
58  const IOObj* selected() const
59  { return current() ? current()->ioobj_ : 0 ; }
60  void removeWithTranslator(const char*);
61  int indexOf(const char*) const;
62  int indexOf( const IODirEntry* e ) const
63  { return ObjectSet<IODirEntry>::indexOf(e); }
64  void getIOObjNames(BufferStringSet&) const;
65 
68 
69 protected:
70 
71  int cur_;
72  bool maycd_;
74 
75 };
76 
77 
78 #endif
#define mExpClass(module)
Definition: commondefs.h:160
Definition: ioobj.h:58
const IOObj * selected() const
Definition: iodirentry.h:58
bool maycd_
Definition: iodirentry.h:72
const IOObj * ioobj_
Definition: iodirentry.h:32
Set of BufferString objects.
Definition: bufstringset.h:28
ObjectSet< T >::size_type indexOf(const ObjectSet< T > &os, const S &val)
Locate object in set.
Definition: objectset.h:169
needed for manipulation. Used by user interface IOObj management.
Definition: iodirentry.h:28
Set of pointers to objects.
Definition: commontypes.h:32
Group of Translators. Has a static factory.
Definition: transl.h:56
void setCurrent(int idx)
Definition: iodirentry.h:54
int cur_
Definition: iodirentry.h:71
MultiID lastiokey
Definition: iodirentry.h:66
const IODirEntry * current() const
Definition: iodirentry.h:55
const char * name() const
Definition: iodirentry.h:48
list of dir entries.
Definition: iodirentry.h:38
IOObjContext & ctxt
Definition: iodirentry.h:67
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:40
void sort(ObjectSet< T > &os)
Sort ObjectSet. Must have operator > defined for elements.
Definition: objectset.h:220
BufferString name_
Definition: iodirentry.h:73
Object with a name.
Definition: namedobj.h:35
Definition: iodir.h:36
int indexOf(const IODirEntry *e) const
Definition: iodirentry.h:62
virtual size_type indexOf(const T *) const
Definition: objectset.h:337
Compound key consisting of ints.
Definition: multiid.h:25
Holds the context for selecting and/or creating IOObjs.
Definition: ctxtioobj.h:62

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