OpendTect  6.3
repos.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: Nov 2004
9 ________________________________________________________________________
10 
11 -*/
12 
13 #include "basicmod.h"
14 #include "uistring.h"
15 #include "bufstring.h"
16 #include "manobjectset.h"
17 #include "iopar.h"
18 
19 
20 namespace Repos
21 {
22 
24 
49  mGlobal(Basic) bool isUserDefined(Source);
51 
52 
54 {
55 public:
56 
57  FileProvider( const char* base_name, bool rev=false )
58  : basenm_(base_name)
59  , rev_(rev) { reset(); }
60 
61  bool next() { return next(cursource_,rev_);}
62  void reset() { cursource_ = Temp; }
63  Source source() const { return cursource_; }
64  void setSource( Source s ) { cursource_ = s; }
65  BufferString fileName() const { return fileName(cursource_); }
66 
67  BufferString fileName(Source) const;
68  static bool next(Source&,bool rev=false);
69 
70 protected:
71 
74  bool rev_;
75 
76  void getFname(BufferString&,bool) const;
77 
78 };
79 
80 
83 mExpClass(Basic) IOPar : public ::IOPar
84 {
85 public:
86 
87  IOPar( Source src )
88  : ::IOPar(""), src_(src) {}
89  IOPar( const ::IOPar& iop, Source src=Data )
90  : ::IOPar(iop), src_(src) {}
91 
93 
94 };
95 
96 
100 {
101 public:
102 
103  IOParSet(const char* basenm);
104 
105  int find(const char*) const;
106  ObjectSet<const IOPar> getEntries(Source) const;
107 
108  bool write(Source) const;
109  bool write(const Source* s=0) const;
110 
111  BufferString fileName(Source) const;
112 
113 protected:
114 
116  virtual IOParSet& doAdd(IOPar*);
117 
118 };
119 
120 
121 }; // namespace Repos
#define mExpClass(module)
Definition: commondefs.h:157
Definition: repos.h:20
IOPar(const ::IOPar &iop, Source src=Data)
Definition: repos.h:89
IOPar(Source src)
Definition: repos.h:87
Set of Repos::IOPar with each a unique name for user recognistion.
Definition: repos.h:99
const BufferString basenm_
Definition: repos.h:72
Definition: repos.h:23
#define mGlobal(module)
Definition: commondefs.h:160
FileProvider(const char *base_name, bool rev=false)
Definition: repos.h:57
Source src_
Definition: repos.h:92
Definition: uistring.h:88
IOPar with its Repos Source.
Definition: repos.h:83
Source cursource_
Definition: repos.h:73
Definition: repos.h:23
Set of pointers to objects.
Definition: commontypes.h:28
Source
Definition: repos.h:23
Definition: repos.h:23
void setSource(Source s)
Definition: repos.h:64
const BufferString basenm_
Definition: repos.h:115
bool next()
Definition: repos.h:61
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:187
Definition: repos.h:23
Definition: repos.h:53
BufferString fileName() const
Definition: repos.h:65
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:38
uiString descriptionOf(Source)
Definition: repos.h:23
bool rev_
Definition: repos.h:74
Source source() const
Definition: repos.h:63
void reset()
Definition: repos.h:62
ObjectSet where the objects contained are owned by this set.
Definition: manobjectset.h:49
Definition: repos.h:23

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