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

◆ isbinary()

bool datrw::isbinary ( const Eformat format)

true, if underlying file format is binary

return whether the specific format is a binary data format

Parameters
formatselected data format
Returns
true, if data format is binary

Definition at line 84 of file readany.cc.

References DATRW_abort, Fascii, Fbinary, Fbonjer, Fgse, Fhpmo, Fmseed, Fpdas, Fsac, Fseife, Fsff, Fsu, Ftfascii, Fthiesdl1, Ftsoft, datrw::bonjer::isbinary, datrw::tfascii::isbinary, datrw::gse::isbinary, datrw::sac::isbinary, datrw::hpmo::isbinary, datrw::pdas::isbinary, datrw::tsoft::isbinary, datrw::seife::isbinary, datrw::thiesdl1::isbinary, datrw::mseed::isbinary, datrw::ascii::isbinary, datrw::sff::isbinary, datrw::binary::isbinary, and datrw::su::isbinary.

85  {
86  bool retval=false;
87  if (format==Fbonjer) { retval=bonjer::isbinary; }
88  else if (format==Fpdas) { retval=pdas::isbinary; }
89  else if (format==Fsff) { retval=sff::isbinary; }
90  else if (format==Fhpmo) { retval=hpmo::isbinary; }
91  else if (format==Fmseed) { retval=mseed::isbinary; }
92  else if (format==Fsac) { retval=sac::isbinary; }
93  else if (format==Fgse) { retval=gse::isbinary; }
94  else if (format==Ftsoft) { retval=tsoft::isbinary; }
95  else if (format==Ftfascii) { retval=tfascii::isbinary; }
96  else if (format==Fsu) { retval=su::isbinary; }
97  else if (format==Fseife) { retval=seife::isbinary; }
98  else if (format==Fthiesdl1) { retval=thiesdl1::isbinary; }
99  else if (format==Fascii) { retval=ascii::isbinary; }
100  else if (format==Fbinary) { retval=binary::isbinary; }
101  else
102  { DATRW_abort("ERROR (isbinary): unknown format!"); }
103  return(retval);
104  } // bool isbinary(const Eformat& format)
#define DATRW_abort(M)
Abort and give a message.
Definition: error.h:101
const bool isbinary
Format properties.
Definition: asciiformat.cc:46