OpendTect-6_4  6.4
cbvsio.h
Go to the documentation of this file.
1 #ifndef cbvsio_h
2 #define cbvsio_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: 12-3-2001
10  Contents: Common Binary Volume Storage format io
11  RCS: $Id$
12 ________________________________________________________________________
13 
14 -*/
15 
16 #include "generalmod.h"
17 #include "position.h"
18 #include "posinfo.h"
19 #include "bufstringset.h"
20 
21 
29 mExpClass(General) CBVSIO
30 {
31 public:
32 
34  : errmsg_(0), strmclosed_(false), nrxlines_(1)
35  , nrcomps_(0), cnrbytes_(0) {}
36  virtual ~CBVSIO();
37 
38  bool failed() const { return errmsg_; }
39  const char* errMsg() const { return errmsg_; }
40 
41  virtual void close() = 0;
42  int nrComponents() const { return nrcomps_; }
43  const BinID& binID() const { return curbinid_; }
44  void setErrMsg( const char* s ) { errmsg_ = s; }
45 
46  static const int integersize;
47  static const int version;
48  static const int headstartbytes;
49 
50  enum CoordPol { InAux=0, InTrailer=1, NotStored=2 };
51 
52 protected:
53 
54  const char* errmsg_;
55  int* cnrbytes_;
56  int nrcomps_;
58  int nrxlines_;
62 
63  mutable BinID curbinid_;
64 
65 };
66 
67 
73 {
74 public:
75 
76  CBVSIOMgr( const char* basefname )
77  : curnr_(0)
78  , basefname_(basefname) {}
79  virtual ~CBVSIOMgr();
80 
81  inline bool failed() const { return errMsg(); }
82  inline const char* errMsg() const
83  { return errmsg_.isEmpty() ? errMsg_() : errmsg_.str();}
84 
85  virtual void close() = 0;
86 
87  virtual int nrComponents() const = 0;
88  virtual const BinID& binID() const = 0;
89 
90  inline BufferString getFileName( int nr ) const
91  { return getFileName(basefname_,nr); }
92 
93  static BufferString baseFileName(const char*);
94  static BufferString getFileName(const char*,int);
96  static int getFileNr(const char*);
98 
99 protected:
100 
104  int curnr_;
105 
106  virtual const char* errMsg_() const = 0;
107 
108  mClass(General) AuxInlInf
109  {
110  public:
111  AuxInlInf( int i ) : inl(i), cumnrxlines(0) {}
112 
113  int inl;
116  };
117 
118 };
119 
120 
121 #endif
#define mExpClass(module)
Definition: commondefs.h:160
TypeSet< int > xlines
Definition: cbvsio.h:115
int nrxlines_
Definition: cbvsio.h:58
PosInfo::CubeData lds_
Definition: cbvsio.h:61
const char * str() const
Definition: odstring.h:48
BufferString errmsg_
Definition: cbvsio.h:102
CBVSIOMgr(const char *basefname)
Definition: cbvsio.h:76
bool strmclosed_
Definition: cbvsio.h:57
CoordPol coordpol_
Definition: cbvsio.h:59
int * cnrbytes_
Definition: cbvsio.h:55
Base class for CBVS read and write manager.
Definition: cbvsio.h:72
int curnr_
Definition: cbvsio.h:104
BufferStringSet fnames_
Definition: cbvsio.h:103
Set of BufferString objects.
Definition: bufstringset.h:28
BinID curbinid_
Definition: cbvsio.h:63
CoordPol
Definition: cbvsio.h:50
int nrcomps_
Definition: cbvsio.h:56
BufferString getFileName(int nr) const
Definition: cbvsio.h:90
void setErrMsg(const char *s)
Definition: cbvsio.h:44
const char * errmsg_
Definition: cbvsio.h:54
static const int integersize
Definition: cbvsio.h:46
const char * errMsg() const
Definition: cbvsio.h:39
const char * errMsg() const
Definition: cbvsio.h:82
Definition: cbvsio.h:108
int nrComponents() const
Definition: cbvsio.h:42
TypeSet< Coord > trailercoords_
Definition: cbvsio.h:60
static const int headstartbytes
Definition: cbvsio.h:48
static const int version
Definition: cbvsio.h:47
Base class for CBVS reader and writer.
Definition: cbvsio.h:29
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:40
bool isEmpty() const
Definition: odstring.h:51
Positioning in a seismic survey: inline/crossline or lineNr/trcNr.
Definition: binid.h:30
BufferString errmsg_
Definition: horizontracker.h:119
BufferString basefname_
Definition: cbvsio.h:101
bool failed() const
Definition: cbvsio.h:38
int inl
Definition: cbvsio.h:113
const BinID & binID() const
Definition: cbvsio.h:43
AuxInlInf(int i)
Definition: cbvsio.h:111
bool failed() const
Definition: cbvsio.h:81
const char * errMsg() const
Definition: horizontracker.h:61
CBVSIO()
Definition: cbvsio.h:33
#define mClass(module)
Definition: commondefs.h:164
Position info for an entire 3D cube. The LineData&#39;s are not sorted.
Definition: posinfo.h:95
int cumnrxlines
Definition: cbvsio.h:114

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