37 #define DATRW_OBINSTREAM_CC_VERSION \ 38 "DATRW_OBINSTREAM_CC V1.1" 40 #include <datrwxx/obinstream.h> 50 const char*
const magic,
52 Mos(os), Mdebug(debug)
61 Mos.write(reinterpret_cast<const char *>(&v),
sizeof(
char));
69 Mos.write(reinterpret_cast<const char *>(&v),
sizeof(
short));
76 Mos.write(reinterpret_cast<const char *>(&v),
sizeof(
int));
83 Mos.write(reinterpret_cast<const char *>(&v),
sizeof(
unsigned int));
89 Mos.write(reinterpret_cast<const char *>(&v),
sizeof(
double));
96 Mos.write(reinterpret_cast<const char *>(&v),
sizeof(
float));
103 unsigned int length=v.length();
105 Mos.write(reinterpret_cast<const char *>(v.c_str()),
106 length*
sizeof(
char));
113 this->
write(static_cast<unsigned int>(v.year()));
114 this->
write(static_cast<char>(v.month()));
115 this->
write(static_cast<char>(v.day()));
116 this->
write(static_cast<char>(v.hour()));
117 this->
write(static_cast<char>(v.minute()));
118 this->
write(static_cast<char>(v.second()));
119 this->
write(static_cast<short>(v.milsec()));
120 this->
write(static_cast<short>(v.micsec()));
127 const ::sff::FREE::Tlines& lines=v.lines;
128 unsigned int nlines=lines.size();
130 ::sff::FREE::Tlines::const_iterator I=lines.begin();
131 while (I!=lines.end())
144 this->
write(v.nsamples);
145 this->
write(v.station);
146 this->
write(v.channel);
147 this->
write(v.auxid);
148 this->
write(v.instype);
149 this->
write(v.calib);
150 this->
write(v.calper);
161 char cs=::sff::coosysID(v.cs);
172 char cs=::sff::coosysID(v.cs);
177 this->
write(v.nstacks);
188 Mos.write(reinterpret_cast<const char *>(v.pointer()),
200 Mos.write(reinterpret_cast<const char *>(v.pointer()),
212 Mos.write(reinterpret_cast<const char *>(v.pointer()),
macro function for debugging output (prototypes)
const char *const magic
magic number to identify file type and bytesex
exception class declaration for libdatrwxx (prototypes)
A copy of bytesex.h from libtfxx (prototypes)
void write(const char &v)
Root namespace of library.
obinstream(std::ostream &os, const char *const magic, const bool &debug=false)
#define DATRW_debug(C, N, M)
produce debug output
void file_magic_write(std::ostream &os, const char *const cmagic, const bool &fortranmode)
write magic number to file