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

◆ read() [2/15]

void datrw::binary::ibinstream::read ( short &  v)

Definition at line 71 of file ibinstream.cc.

References DATRW_assert, DATRW_debug, Mdebug, Mis, Mswap, and datrw::util::swap().

72  {
73  DATRW_assert(Mis.read(reinterpret_cast<char *>(&v), sizeof(short)),
74  "ERROR (ibinstream::read): reading short value");
75  if (Mswap) { v=::datrw::util::swap(v); }
76  DATRW_debug(Mdebug, "ibinstream::read(short& v)", "v=" << v);
77  } // void ibinstream::read(short& v)
#define DATRW_assert(C, M)
Check an assertion and report by throwing an exception.
Definition: error.h:92
std::istream & Mis
Definition: ibinstream.h:80
T swap(const T &value)
How to swap any generic type.
Definition: bytesex.h:118
#define DATRW_debug(C, N, M)
produce debug output
Definition: debug.h:50
Here is the call graph for this function: