TS++ library: time series library
wid2tsio.h
Go to the documentation of this file.
1 
36 // include guard
37 #ifndef TSXX_WID2TSIO_H_VERSION
38 
39 #define TSXX_WID2TSIO_H_VERSION \
40  "TSXX_WID2TSIO_H V1.1"
41 
42 #include<tsxx/wid2timeseries.h>
43 #include<datrwxx/readany.h>
44 #include<datrwxx/writeany.h>
45 #include<tsxx/debug.h>
46 
47 namespace ts {
48 
51  template<class C>
52  datrw::oanystream& operator<<(datrw::oanystream& os,
54  {
55  TSXX_debug(os.debug(),
56  "datrw::oanystream& operator>>(datrw::oanystream& os,\n"
57  " TimeSeries<C, sff::WID2>& s)",
58  TSXX_value(s.header.line()));
59  os << s.header;
60  typename TimeSeries<C, sff::WID2>::Tseries series(s);
61  os << series;
62  return(os);
63  } // datrw::oanystream& operator<<(datrw::oanystream& os,
64  // TimeSeries<C, sff::WID2>& s)
65 
66  /* ---------------------------------------------------------------------- */
67 
70  template<class C>
71  datrw::odatstream& operator<<(datrw::odatstream& os,
73  {
74  TSXX_debug(os.debug(),
75  "datrw::odatstream& operator>>(datrw::odatstream& os,\n"
76  " TimeSeries<C, sff::WID2>& s)",
77  TSXX_value(s.header.line()));
78  os << s.header;
79  typename TimeSeries<C, sff::WID2>::Tseries series(s);
80  os << series;
81  return(os);
82  } // datrw::odatstream& operator<<(datrw::odatstream& os,
83  // TimeSeries<C, sff::WID2>& s)
84 
85  /* ---------------------------------------------------------------------- */
86 
89  template<class C>
90  datrw::ianystream& operator>>(datrw::ianystream& is,
92  {
93  typename TimeSeries<C, sff::WID2>::Tseries series;
94  is >> series;
95  s=series;
96  is >> s.header;
97  TSXX_debug(is.debug(),
98  "datrw::ianystream& operator>>(datrw::ianystream& is,\n"
99  " TimeSeries<C, sff::WID2>& s)",
100  TSXX_value(s.header.line()));
101  return(is);
102  } // datrw::ianystream& operator>>(datrw::ianystream& is,
103  // TimeSeries<C, sff::WID2>& s)
104 
105  /* ---------------------------------------------------------------------- */
106 
109  template<class C>
110  datrw::idatstream& operator>>(datrw::idatstream& is,
112  {
113  typename TimeSeries<C, sff::WID2>::Tseries series;
114  is >> series;
115  s=series;
116  is >> s.header;
117  TSXX_debug(is.debug(),
118  "datrw::idatstream& operator>>(datrw::idatstream& is,\n"
119  " TimeSeries<C, sff::WID2>& s)",
120  TSXX_value(s.header.line()));
121  return(is);
122  } // datrw::idatstream& operator>>(datrw::idatstream& is,
123  // TimeSeries<C, sff::WID2>& s)
124 
125 } // namespace ts
126 
127 #endif // TSXX_WID2TSIO_H_VERSION (includeguard)
128 
129 /* ----- END OF wid2tsio.h ----- */
debug macro (prototypes)
#define TSXX_value(V)
report value
Definition: debug.h:66
datrw::oanystream & operator<<(datrw::oanystream &os, TimeSeries< C, sff::WID2 > &s)
Definition: wid2tsio.h:52
#define TSXX_debug(C, N, M)
produce debug output
Definition: debug.h:51
Structure to hold the data samples of a series together with header information to form a time series...
Definition: tsxx.h:83
datrw::ianystream & operator>>(datrw::ianystream &is, TimeSeries< C, sff::WID2 > &s)
Definition: wid2tsio.h:90
All stuff in this library will be placed within namespace ts.
Definition: anyfilter.cc:43
Theader header
data header fields
Definition: tsxx.h:134
time series with WID2 header (prototypes)