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