DATRW++ library: seismic data I/O with multiple formats

◆ odatstream()

datrw::odatstream::odatstream ( std::ostream &  os,
const Edatatype datatype,
const bool &  handlesfilefree = false,
const bool &  handlestracefree = false,
const bool &  handlessrce = false,
const bool &  handlesinfo = false,
const bool &  debug = false 
)
protected

constructor is protected: do not create an instance of this class

output stream base class constructor, has to be called from derived class.

Parameters
osC++ output file stream; all data will be written to this stream
datatypeindicates the value type used for storing sample values in the file; if the file format uses integer values to store the data, round-off errors will happen, if float data is stored in this format; this parameter is stored and returned to the user upon request through datrw::odatstream::seriestype()
handlesfilefreetrue if the format can store the data in a FREE block for a data file (i.e. a free format string file header); this parameter is stored and returned to the user upon request through datrw::odatstream::handlesfilefree()
handlestracefreetrue if the format can store the data in a FREE block for a data trace (i.e. a free format string trace header); this parameter is stored and returned to the user upon request through datrw::odatstream::handlestracefree()
handlessrcetrue if the format can store SRCE data which defines a seismic source; this parameter is stored and returned to the user upon request through datrw::odatstream::handlessrce()
handlesinfotrue if the format can store INFO data which defines receiver properties; this parameter is stored and returned to the user upon request through datrw::odatstream::handlesinfo()
debugset debug mode on a base class level

Definition at line 87 of file datwrite.cc.

References DATRW_assert, DATRW_debug, and Mdebug.

94  : Mos(os), Mdebug(debug), Mwid2set(false), Msrceset(false),
95  Minfoset(false), Mfreeset(false), Mheaderflushed(false),
100  Mdatatype(datatype)
101  {
102  DATRW_debug(this->Mdebug,
103  "odatstream::odatstream",
104  "create new output stream");
105  DATRW_assert(os.good(), "output stream is not good!");
106  }
#define DATRW_assert(C, M)
Check an assertion and report by throwing an exception.
Definition: error.h:92
std::ostream & Mos
output stream to be used by this class
Definition: datwrite.h:194
bool debug()
indicate debug mode
Definition: datwrite.h:145
bool handlesfilefree() const
true if file FREE block can be handled
Definition: datwrite.h:123
bool handlesinfo() const
true if INFO data can be handled
Definition: datwrite.h:129
#define DATRW_debug(C, N, M)
produce debug output
Definition: debug.h:50
bool Mdebug
global debug flag
Definition: datwrite.h:197
bool handlessrce() const
true if SRCE data can be handled
Definition: datwrite.h:125
bool Mhandlesfilefree
Definition: datwrite.h:201
bool handlestracefree() const
true if trace FREE block can be handled
Definition: datwrite.h:127
Edatatype Mdatatype
Definition: datwrite.h:208
bool Mhandlestracefree
Definition: datwrite.h:201