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

◆ anyID() [2/2]

std::string datrw::anyID ( const Eformat id)

convert identifier from and to string representation

Definition at line 95 of file formats.cc.

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

96  {
97  std::string retval="NSP";
98  switch(id) {
99  case Fpdas: retval=pdas::streamID; break;
100  case Fsff: retval=sff::streamID; break;
101  case Fhpmo: retval=hpmo::streamID; break;
102  case Fmseed: retval=mseed::streamID; break;
103  case Fbonjer: retval=bonjer::streamID; break;
104  case Fsac: retval=sac::streamID; break;
105  case Fgse: retval=gse::streamID; break;
106  case Ftsoft: retval=tsoft::streamID; break;
107  case Ftfascii: retval=tfascii::streamID; break;
108  case Fsu: retval=su::streamID; break;
109  case Fseife: retval=seife::streamID; break;
110  case Fascii: retval=ascii::streamID; break;
111  case Fbinary: retval=binary::streamID; break;
112  case Fthiesdl1: retval=thiesdl1::streamID; break;
113  default: DATRW_abort("unknown data type ID#!");
114  }
115  return(retval);
116  } // std::string anyID(const Eformat& id)
#define DATRW_abort(M)
Abort and give a message.
Definition: error.h:101
const char *const streamID
Format properties.
Definition: asciiformat.cc:47