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

◆ writefileheader()

void datrw::obinarystream::writefileheader ( )
protectedvirtual

actually write the file header

Reimplemented from datrw::odatstream.

Definition at line 66 of file obinarystream.cc.

References DATRW_debug, DATRW_value, datrw::binary::Ffree, datrw::odatstream::free(), datrw::binary::Fsrce, datrw::odatstream::hasfree(), datrw::odatstream::hassrce(), datrw::odatstream::Mdebug, Mobs, datrw::odatstream::srce(), and datrw::binary::version.

67  {
68  DATRW_debug(Mdebug, "obinarystream::writefileheader",
69  "file version " << ::datrw::binary::version);
71  char flags=0;
72  if (this->hassrce()) { flags |= binary::Fsrce; }
73  if (this->hasfree()) { flags |= binary::Ffree; }
74  DATRW_debug(Mdebug, "obinarystream::writefileheader()",
75  "flags: " << DATRW_value( int(flags) ));
76  Mobs << flags;
77  if (this->hassrce())
78  {
79  DATRW_debug(Mdebug, "obinarystream::writefileheader",
80  "writing SRCE line");
81  Mobs << this->srce();
82  }
83  if (this->hasfree())
84  {
85  DATRW_debug(Mdebug, "ibinarystream::ibinarystream",
86  "writing file FREE block");
87  Mobs << this->free();
88  }
89  } // void obinarystream::writefileheader()
binary::obinstream Mobs
Definition: binary.h:148
bool hassrce() const
srce is available
Definition: datwrite.h:180
trace has SRCE header
Definition: binary.h:79
const short version
a version number for files - just in case
Definition: binary.cc:54
sff::SRCE srce() const
return SRCE data
Definition: datwrite.h:171
sff::FREE free() const
return FREE data
Definition: datwrite.h:175
#define DATRW_debug(C, N, M)
produce debug output
Definition: debug.h:50
bool Mdebug
global debug flag
Definition: datwrite.h:197
trace has FREE header
Definition: binary.h:80
#define DATRW_value(V)
report value
Definition: debug.h:65
bool hasfree() const
free is available
Definition: datwrite.h:184
Here is the call graph for this function: