40 #define DATRW_DATWRITE_CC_VERSION \ 41 "DATRW_DATWRITE_CC V1.4" 51 std::ifstream file(filename.c_str(),std::ios_base::in);
89 const bool& handlesfilefree,
90 const bool& handlestracefree,
91 const bool& handlessrce,
92 const bool& handlesinfo,
94 : Mos(os), Mdebug(debug), Mwid2set(false), Msrceset(false),
95 Minfoset(false), Mfreeset(false), Mheaderflushed(false),
96 Mhandlestracefree(handlestracefree),
97 Mhandlesfilefree(handlesfilefree),
98 Mhandlesinfo(handlesinfo),
99 Mhandlessrce(handlessrce),
103 "odatstream::odatstream",
104 "create new output stream");
117 "file format cannot handle trace FREE data\n" <<
118 "FREE data will be dropped silently");
121 "file format cannot handle file FREE data\n" <<
122 "FREE data will be dropped silently");
146 "file format cannot handle INFO data\n" 147 "INFO data will be dropped silently");
159 "file format cannot handle SRCE data\n" 160 "SRCE data will be dropped silently");
230 os <<
"Class " << name <<
" provides no help text." << std::endl;
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)
constructor is protected: do not create an instance of this class
void abort_if_exists(const std::string &filename)
#define DATRW_assert(C, M)
Check an assertion and report by throwing an exception.
void writeseries(const Tdseries::Tcoc &series)
write double data
void cleartraceheader()
clear trace header flags
void setwid2(const sff::WID2 &wid2)
macro function for debugging output (prototypes)
static void help(std::ostream &os=std::cout, const char *name="idatsream")
print some info about data conversion.
void setfree(const sff::FREE &free)
sff::WID2 wid2() const
return WID2 data
void setinfo(const sff::INFO &info)
sff::INFO info() const
return SRCE data
void flushfileheader()
flush file header to file
bool handlesfilefree() const
true if file FREE block can be handled
Root namespace of library.
sff::SRCE srce() const
return SRCE data
void setsrce(const sff::SRCE &srce)
bool handlesinfo() const
true if INFO data can be handled
sff::FREE free() const
return FREE data
virtual void writetrace(const Tdseries::Tcoc &series)
write double data
virtual void writefileheader()
actually write the file header
#define DATRW_debug(C, N, M)
produce debug output
bool Mdebug
global debug flag
bool handlessrce() const
true if SRCE data can be handled
#define DATRW_value(V)
report value
bool handlestracefree() const
true if trace FREE block can be handled
#define DATRW_report_assert(C, M)
Check an assertion and report only.
generic interface definition (prototypes)