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

◆ checktraceflags()

void datrw::binary::checktraceflags ( const char &  flags)

abort if trace flags are inconsistent

Definition at line 66 of file binary.cc.

References checkfileflags(), DATRW_assert, Fdouble, Ffloat, and Fint.

Referenced by datrw::ibinarystream::readflags().

67  {
68  checkfileflags(flags);
69  unsigned int ntypes=0;
70  if (flags & Fdouble) { ++ntypes; }
71  if (flags & Ffloat) { ++ntypes; }
72  if (flags & Fint) { ++ntypes; }
73  DATRW_assert(ntypes == 1,
74  "ERROR: flags must indicate exactly one data type");
75  }
#define DATRW_assert(C, M)
Check an assertion and report by throwing an exception.
Definition: error.h:92
void checkfileflags(const char &flags)
abort if file flags are inconsistent
Definition: binary.cc:58
trace has int data
Definition: binary.h:84
trace has float data
Definition: binary.h:83
trace has double data
Definition: binary.h:82
Here is the call graph for this function:
Here is the caller graph for this function: