OpendTect  6.6
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  RCS: $Id$
10 ________________________________________________________________________
11 
12 -*/
13 
14 #include "basicmod.h"
15 #include "uistring.h"
16 #include "bufstring.h"
17 #include "manobjectset.h"
18 #include "iopar.h"
19 
20 
21 namespace Repos
22 {
23 
25 
52 
53 
55 {
56 public:
57 
58  FileProvider( const char* base_name, bool rev=false )
59  : basenm_(base_name)
60  , rev_(rev) { reset(); }
61 
62  bool next() { return next(cursource_,rev_);}
63  void reset() { cursource_ = Temp; }
64  Source source() const { return cursource_; }
65  void setSource( Source s ) { cursource_ = s; }
66  BufferString fileName() const { return fileName(cursource_); }
67 
69  static bool next(Source&,bool rev=false);
70 
72 
73 protected:
74 
77  bool rev_;
78 
79  void getFname(BufferString&,bool) const;
80 
81 };
82 
83 
86 mExpClass(Basic) IOPar : public ::IOPar
87 {
88 public:
89 
90  IOPar( Source src )
91  : ::IOPar(""), src_(src) {}
92  IOPar( const ::IOPar& iop, Source src=Data )
93  : ::IOPar(iop), src_(src) {}
94 
96 
97 };
98 
99 
103 {
104 public:
105 
106  IOParSet(const char* basenm);
107 
108  int find(const char*) const;
110 
111  bool write(Source) const;
112  bool write(const Source* s=0) const;
113 
115 
116 protected:
117 
119  virtual IOParSet& doAdd(IOPar*);
120 
121 };
122 
123 
124 }; // namespace Repos
125 
Repos::Source
Source
Definition: repos.h:24
Repos::FileProvider::cursource_
Source cursource_
Definition: repos.h:76
Repos::FileProvider::source
Source source() const
Definition: repos.h:64
Repos::Temp
@ Temp
Definition: repos.h:24
uistring.h
Repos::IOParSet::fileName
BufferString fileName(Source) const
mGlobal
#define mGlobal(module)
Definition: commondefs.h:180
ObjectSet
Set of pointers to objects.
Definition: commontypes.h:31
Repos::IOParSet::write
bool write(const Source *s=0) const
Repos::FileProvider::fileName
BufferString fileName(Source) const
Repos::ApplSetup
@ ApplSetup
Definition: repos.h:24
mExpClass
#define mExpClass(module)
Definition: commondefs.h:177
Repos::FileProvider::basenm_
const BufferString basenm_
Definition: repos.h:75
Repos::Data
@ Data
Definition: repos.h:24
bufstring.h
ManagedObjectSet< IOPar >
Repos::isUserDefined
bool isUserDefined(Source)
Constructs repository file names.
Repos::IOPar::src_
Source src_
Definition: repos.h:95
Repos::FileProvider::next
static bool next(Source &, bool rev=false)
Repos::FileProvider::next
bool next()
Definition: repos.h:62
Repos::IOPar::IOPar
IOPar(const ::IOPar &iop, Source src=Data)
Definition: repos.h:92
Repos::descriptionOf
uiString descriptionOf(Source)
Repos::IOParSet::basenm_
const BufferString basenm_
Definition: repos.h:118
Repos::FileProvider::fileName
BufferString fileName() const
Definition: repos.h:66
Repos::IOParSet::find
int find(const char *) const
Repos::FileProvider::FileProvider
FileProvider(const char *base_name, bool rev=false)
Definition: repos.h:58
Repos::IOParSet::write
bool write(Source) const
Repos::IOPar::IOPar
IOPar(Source src)
Definition: repos.h:90
Repos::FileProvider::reset
void reset()
Definition: repos.h:63
Repos::FileProvider
Definition: repos.h:55
Repos::Rel
@ Rel
Definition: repos.h:24
BufferString
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size.
Definition: bufstring.h:40
Repos::FileProvider::removeFile
bool removeFile(Source)
uiString
String that is able to hold international (UTF-8) strings for the user interface.
Definition: uistring.h:121
Repos::IOParSet::getEntries
ObjectSet< const IOPar > getEntries(Source) const
Repos::Survey
@ Survey
Definition: repos.h:24
Repos::FileProvider::getFname
void getFname(BufferString &, bool) const
manobjectset.h
iopar.h
Repos::IOParSet::IOParSet
IOParSet(const char *basenm)
Repos::FileProvider::setSource
void setSource(Source s)
Definition: repos.h:65
Repos::IOPar
IOPar with its Repos Source.
Definition: repos.h:87
Repos::IOParSet::doAdd
virtual IOParSet & doAdd(IOPar *)
Repos::FileProvider::rev_
bool rev_
Definition: repos.h:77
Repos
Definition: repos.h:22
Repos::IOParSet
Set of Repos::IOPar with each a unique name for user recognistion.
Definition: repos.h:103
Repos::User
@ User
Definition: repos.h:24

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