OpendTect-6_4  6.4
seispsioprov.h
Go to the documentation of this file.
1 #ifndef seispsioprov_h
2 #define seispsioprov_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: Dec 2004
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 -*/
14 
15 #include "seismod.h"
16 #include "uistring.h"
17 #include "manobjectset.h"
18 #include "transl.h"
19 #include "bufstring.h"
20 #include "seispsread.h"
21 #include "seispswrite.h"
22 
23 
24 class IOObj;
25 
26 
64 { mODTextTranslationClass(SeisPSIOProvider);
65 public:
66 
67  virtual ~SeisPSIOProvider() {}
68 
69  virtual bool canHandle( bool forread, bool for2d ) const
70  { return false; }
71 
72  // IOObj-based interface. Implementation
73  // defaults to the string-based using
74  // IOObj's fullUsrExpr.
75  virtual SeisPS3DReader* get3DReader(const IOObj&,
76  int i=mUdf(int)) const;
77  virtual SeisPS2DReader* get2DReader(const IOObj&,Pos::GeomID) const;
78  virtual SeisPS2DReader* get2DReader(const IOObj&,const char*) const;
79 
80  virtual SeisPSWriter* get3DWriter(const IOObj&) const;
81  virtual SeisPSWriter* get2DWriter(const IOObj&,Pos::GeomID) const;
82  virtual SeisPSWriter* get2DWriter(const IOObj&,const char*) const;
83 
84  FixedString type() const { return type_.buf(); }
85  virtual bool fetchGeomIDs(const IOObj&,
86  TypeSet<Pos::GeomID>&) const;
87  virtual bool fetchLineNames(const IOObj&,
88  BufferStringSet&) const;
89 
90  // string-based interface, The key passed must
91  // be what IOObj::fullUsrExpr would return.
92  virtual SeisPS3DReader* make3DReader(const char*,int i=mUdf(int)) const
93  { return 0; }
94  virtual SeisPS2DReader* make2DReader(const char*,Pos::GeomID) const
95  { return 0; }
96  virtual SeisPS2DReader* make2DReader(const char*,const char* lnm) const
97  { return 0; }
98 
99  virtual SeisPSWriter* make3DWriter(const char*) const
100  { return 0; }
101  virtual SeisPSWriter* make2DWriter(const char*,Pos::GeomID) const
102  { return 0; }
103  virtual SeisPSWriter* make2DWriter(const char*,const char* lnm) const
104  { return 0; }
105 
106  virtual bool getGeomIDs(const char*,
107  TypeSet<Pos::GeomID>&) const
108  { return false; }
109  virtual bool getLineNames(const char*,
110  BufferStringSet&) const
111  { return false; }
112 
113  static const char* sKeyCubeID;
114 
115 
116 protected:
117 
118  SeisPSIOProvider( const char* t )
119  : type_(t) {}
120 
122 
123 };
124 
125 
127 { mODTextTranslationClass(SeisPSIOProviderFactory);
128 public:
129 
130  int add( SeisPSIOProvider* prov )
131  { return (provs_ += prov).size(); }
133  { return provs_; }
134 
135  // Convenience functions
136  const SeisPSIOProvider* provider(const char* typ) const;
137  SeisPS3DReader* get3DReader(const IOObj&,int i=mUdf(int)) const;
138  SeisPSWriter* get3DWriter(const IOObj&) const;
139  void mk3DPostStackProxy(IOObj&);
141 
143  SeisPS2DReader* get2DReader(const IOObj&,Pos::GeomID) const;
144  SeisPS2DReader* get2DReader(const IOObj&,const char* lnm) const;
145  SeisPSWriter* get2DWriter(const IOObj&,Pos::GeomID) const;
146  SeisPSWriter* get2DWriter(const IOObj&,const char* lnm) const;
147  bool getGeomIDs(const IOObj&,
148  TypeSet<Pos::GeomID>&) const;
149  bool getLineNames(const IOObj&,
150  BufferStringSet&) const;
151 
152 protected:
153 
155 
156 };
157 
159 
160 
161 //------
163 
165 { isTranslatorGroup(SeisPS3D)
166 public:
168 };
169 
170 
173 public:
175 
176  virtual bool implRemove(const IOObj*) const;
177 };
178 
179 
181 { isTranslator(CBVS,SeisPS3D)
182 public:
183  mDefEmptyTranslatorConstructor(CBVS,SeisPS3D)
184 
185  bool implRemove(const IOObj*) const;
186 };
187 
188 
190 { isTranslatorGroup(SeisPS2D)
191 public:
193 };
194 
195 
198 public:
200 };
201 
202 
204 { isTranslator(CBVS,SeisPS2D)
205 public:
206  mDefEmptyTranslatorConstructor(CBVS,SeisPS2D)
207 
208  bool implRemove(const IOObj*) const;
209 };
210 
211 
212 #endif
#define mExpClass(module)
Definition: commondefs.h:160
Definition: seispsioprov.h:171
Summary for a Seismic object.
Definition: segydirectdef.h:23
Definition: ioobj.h:58
virtual ~SeisPSIOProvider()
Definition: seispsioprov.h:67
#define mODTextTranslationClass(clss)
Definition: uistring.h:38
#define mGlobal(module)
Definition: commondefs.h:163
OD::String that holds an existing text string.
Definition: fixedstring.h:29
SeisPSIOProviderFactory & SPSIOPF()
virtual SeisPSWriter * make3DWriter(const char *) const
Definition: seispsioprov.h:99
Set of BufferString objects.
Definition: bufstringset.h:28
Definition: seispsioprov.h:126
#define mDefEmptyTranslatorConstructor(spec, clss)
Definition: transl.h:267
reads from a 3D prestack seismic data store.
Definition: seispsread.h:56
ManagedObjectSet< SeisPSIOProvider > provs_
Definition: seispsioprov.h:154
Definition: seispsioprov.h:180
Definition: seispsioprov.h:196
Prestack Seismics objects provider.
Definition: seispsioprov.h:63
#define mDefEmptyTranslatorGroupConstructor(clss)
Definition: transl.h:255
Group of Translators. Has a static factory.
Definition: transl.h:56
BufferString type_
Definition: seispsioprov.h:121
Definition: seispsioprov.h:189
int add(SeisPSIOProvider *prov)
Definition: seispsioprov.h:130
#define mUdf(type)
Use this macro to get the undefined for simple types.
Definition: undefval.h:272
SeisPSIOProvider(const char *t)
Definition: seispsioprov.h:118
static const char * sKeyCubeID
Definition: seispsioprov.h:113
#define mDefEmptyTranslatorBaseConstructor(clss)
Definition: transl.h:261
const ObjectSet< SeisPSIOProvider > & providers() const
Definition: seispsioprov.h:132
virtual bool canHandle(bool forread, bool for2d) const
Definition: seispsioprov.h:69
const char * buf() const
Definition: odstring.h:47
virtual bool implRemove() const
Definition: ioobj.h:84
Index_Type GeomID
Definition: commontypes.h:52
I/O Interpreter class for a certain object type.
Definition: transl.h:123
FixedString type() const
Definition: seispsioprov.h:84
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:40
Translator mechanism is only used for selection etc.
Definition: seispsioprov.h:164
Definition: seispsioprov.h:203
virtual SeisPSWriter * make2DWriter(const char *, Pos::GeomID) const
Definition: seispsioprov.h:101
virtual bool getGeomIDs(const char *, TypeSet< Pos::GeomID > &) const
Definition: seispsioprov.h:106
virtual bool getLineNames(const char *, BufferStringSet &) const
Definition: seispsioprov.h:109
#define isTranslatorGroup(clss)
Definition: transl.h:206
reads from a 2D prestack seismic data store.
Definition: seispsread.h:69
virtual SeisPSWriter * make2DWriter(const char *, const char *lnm) const
Definition: seispsioprov.h:103
virtual SeisPS2DReader * make2DReader(const char *, const char *lnm) const
Definition: seispsioprov.h:96
virtual SeisPS2DReader * make2DReader(const char *, Pos::GeomID) const
Definition: seispsioprov.h:94
virtual SeisPS3DReader * make3DReader(const char *, int i=mUdf(int)) const
Definition: seispsioprov.h:92
#define isTranslator(spec, clss)
Definition: transl.h:230
writes to a prestack seismic data store.
Definition: seispswrite.h:35

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