TSIO++ Time series input/output
inputoperators.cc
Go to the documentation of this file.
1 
38 #define TSIO_INPUTOPERATORS_CC_VERSION \
39  "TF_INPUTOPERATORS_CC 2014/01/30"
40 
41 #include <tsioxx/inputoperators.h>
42 
43 namespace ts {
44 
45  namespace sff {
46 
47  datrw::idatstream& operator>>(datrw::idatstream& is,
48  FileHeader& fh)
49  {
50  ::sff::FREE free;
51  ::sff::SRCE srce;
52  fh=FileHeader();
53  if (is.hasfree()) { is >> free; fh.free(free); }
54  if (is.hassrce()) { is >> srce; fh.srce(srce); }
55  return(is);
56  }
57 
58  datrw::idatstream& operator>>(datrw::idatstream& is,
59  TraceHeader& th)
60  {
61  ::sff::FREE free;
62  ::sff::INFO info;
63  ::sff::WID2 wid2;
64  th=TraceHeader();
65  is >> wid2; th.wid2(wid2);
66  if (is.hasfree()) { is >> free; th.free(free); }
67  if (is.hasinfo()) { is >> info; th.info(info); }
68  return(is);
69  }
70 
71  } // namespace sff
72 } // namespace ts
73 
74 /* ----- END OF inputoperators.cc ----- */
input operators for SFF TimeSeries traces and files for libdatrwxx streams (prototypes).
hold information for a complete SFF trace header
Definition: traceheader.h:49
Outer namespace.
Definition: cmdlinefiles.cc:46
hold information for a complete SFF file header
Definition: fileheader.h:49
datrw::idatstream & operator>>(datrw::idatstream &is, FileHeader &fh)
void free(const ::sff::FREE &f)
Definition: traceheader.cc:52
void info(const ::sff::INFO &s)
Definition: traceheader.cc:46
void free(const ::sff::FREE &f)
Definition: fileheader.cc:52
void srce(const ::sff::SRCE &s)
Definition: fileheader.cc:46
void wid2(const ::sff::WID2 &w)
Definition: traceheader.h:54