OpendTect-6_4  6.4
repos.h
Go to the documentation of this file.
1 #ifndef repos_h
2 #define repos_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: Nov 2004
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 -*/
14 
15 #include "basicmod.h"
16 #include "uistring.h"
17 #include "bufstring.h"
18 #include "manobjectset.h"
19 #include "iopar.h"
20 
21 
22 namespace Repos
23 {
24 
26 
51  mGlobal(Basic) bool isUserDefined(Source);
53 
54 
56 {
57 public:
58 
59  FileProvider( const char* base_name, bool rev=false )
60  : basenm_(base_name)
61  , rev_(rev) { reset(); }
62 
63  bool next() { return next(cursource_,rev_);}
64  void reset() { cursource_ = Temp; }
65  Source source() const { return cursource_; }
66  void setSource( Source s ) { cursource_ = s; }
67  BufferString fileName() const { return fileName(cursource_); }
68 
69  BufferString fileName(Source) const;
70  static bool next(Source&,bool rev=false);
71 
72  bool removeFile(Source);
73 
74 protected:
75 
78  bool rev_;
79 
80  void getFname(BufferString&,bool) const;
81 
82 };
83 
84 
87 mExpClass(Basic) IOPar : public ::IOPar
88 {
89 public:
90 
91  IOPar( Source src )
92  : ::IOPar(""), src_(src) {}
93  IOPar( const ::IOPar& iop, Source src=Data )
94  : ::IOPar(iop), src_(src) {}
95 
97 
98 };
99 
100 
104 {
105 public:
106 
107  IOParSet(const char* basenm);
108 
109  int find(const char*) const;
110  ObjectSet<const IOPar> getEntries(Source) const;
111 
112  bool write(Source) const;
113  bool write(const Source* s=0) const;
114 
115  BufferString fileName(Source) const;
116 
117 protected:
118 
120  virtual IOParSet& doAdd(IOPar*);
121 
122 };
123 
124 
125 }; // namespace Repos
126 
127 #endif
#define mExpClass(module)
Definition: commondefs.h:160
Definition: repos.h:22
IOPar(const ::IOPar &iop, Source src=Data)
Definition: repos.h:93
IOPar(Source src)
Definition: repos.h:91
Set of Repos::IOPar with each a unique name for user recognistion.
Definition: repos.h:103
const BufferString basenm_
Definition: repos.h:76
Definition: repos.h:25
#define mGlobal(module)
Definition: commondefs.h:163
FileProvider(const char *base_name, bool rev=false)
Definition: repos.h:59
Source src_
Definition: repos.h:96
Definition: uistring.h:89
IOPar with its Repos Source.
Definition: repos.h:87
Source cursource_
Definition: repos.h:77
Definition: repos.h:25
Set of pointers to objects.
Definition: commontypes.h:32
Source
Definition: repos.h:25
Definition: repos.h:25
void setSource(Source s)
Definition: repos.h:66
const BufferString basenm_
Definition: repos.h:119
bool next()
Definition: repos.h:63
bool isUserDefined(Source)
Constructs repository file names.
const T * find(const ObjectSet< T > &os, const S &val)
Get const object in set.
Definition: objectset.h:183
Definition: repos.h:25
Definition: repos.h:55
BufferString fileName() const
Definition: repos.h:67
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:40
uiString descriptionOf(Source)
Definition: repos.h:25
bool rev_
Definition: repos.h:78
Source source() const
Definition: repos.h:65
void reset()
Definition: repos.h:64
ObjectSet where the objects contained are owned by this set.
Definition: manobjectset.h:23
Definition: repos.h:25

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