DATRW++ library: seismic data I/O with multiple formats
tsoft.h
Go to the documentation of this file.
1 /*! \file tsoft.h
2  * \brief classes for TSOFT in SFF (prototypes)
3  * \ingroup group_tsoft
4  *
5  * ----------------------------------------------------------------------------
6  *
7  * \author Thomas Forbriger
8  * \date 16/09/2009
9  *
10  * classes for TSOFT in SFF (prototypes)
11  *
12  * Copyright (c) 2009 by Thomas Forbriger (BFO Schiltach)
13  *
14  * ----
15  * This program is free software; you can redistribute it and/or modify
16  * it under the terms of the GNU General Public License as published by
17  * the Free Software Foundation; either version 2 of the License, or
18  * (at your option) any later version.
19  *
20  * This program is distributed in the hope that it will be useful,
21  * but WITHOUT ANY WARRANTY; without even the implied warranty of
22  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23  * GNU General Public License for more details.
24  *
25  * You should have received a copy of the GNU General Public License
26  * along with this program; if not, write to the Free Software
27  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
28  * ----
29  *
30  * REVISIONS and CHANGES
31  * - 16/09/2009 V1.0 Thomas Forbriger
32  * - 23/11/2010 V1.1 introduced static member data
33  * - 18/11/2016 V1.2 use debug flag in base class
34  *
35  * ============================================================================
36  */
37 
38 // include guard
39 #ifndef DATRW_TSOFT_H_VERSION
40 
41 #define DATRW_TSOFT_H_VERSION \
42  "DATRW_TSOFT_H V1.2"
43 
44 #include<datrwxx/datread.h>
45 #include<datrwxx/tsoftsffcontainer.h>
46 #include<datrwxx/tsoftconfig.h>
47 
48 namespace datrw {
49 
50  namespace tsoft {
51 
52  extern const bool isbinary;
53  extern const char* const streamID;
54 
55  } // namespace tsoft
56 
57  /*----------------------------------------------------------------------*/
58 
59  /*! \brief class to read TSOFT data
60  *
61  * \ingroup group_tsoft
62  */
63  class itsoftstream: public idatstream {
64  public:
65  typedef idatstream Tbase;
66  itsoftstream(std::istream& is, const bool& debug=false);
67  itsoftstream(std::istream& is,
68  const std::string& modifier,
69  const bool& debug=false);
70  virtual ~itsoftstream() { }
71  virtual Tdseries dseries();
72  virtual Tfseries fseries();
73  virtual void skipseries();
74  static void help(std::ostream& os=std::cout);
75  static const std::ios_base::openmode openmode;
76  private:
77  //! container for complete file
79  //! index of next trace to be passed
80  aff::Tsubscript Mitrace;
81  //! read file to buffer
82  void read(std::istream& is);
83  //! TSOFT reader configuration
85  }; // class itsoftstream
86 
87 } // namespace datrw
88 
89 #endif // DATRW_TSOFT_H_VERSION (includeguard)
90 
91 /* ----- END OF tsoft.h ----- */
config parameters for data extractionThese parameters control the way gaps in the input data are hand...
Definition: tsoftconfig.h:57
aff::Tsubscript Mitrace
index of next trace to be passed
Definition: tsoft.h:80
datrw::tsoft::File Mfile
container for complete file
Definition: tsoft.h:78
aff::Series< float > Tfseries
Definition: types.h:46
const bool isbinary
Format properties.
Definition: itsoftstream.cc:56
const char *const streamID
Format properties.
Definition: itsoftstream.cc:57
virtual void skipseries()
tsoft::ReaderConfig Mreaderconfig
TSOFT reader configuration.
Definition: tsoft.h:84
itsoftstream(std::istream &is, const bool &debug=false)
Definition: itsoftstream.cc:76
virtual ~itsoftstream()
Definition: tsoft.h:70
aff::Series< double > Tdseries
Definition: types.h:45
contents of a complete TSOFT file
virtual Tfseries fseries()
bool debug()
indicate debug mode
Definition: datread.h:116
Root namespace of library.
Definition: aalibdatrwxx.cc:16
class to read TSOFT data
Definition: tsoft.h:63
void read(std::istream &is)
read file to buffer
idatstream Tbase
Definition: tsoft.h:65
static void help(std::ostream &os=std::cout)
virtual Tdseries dseries()
static const std::ios_base::openmode openmode
Definition: tsoft.h:75