Commit 2f3b90ed authored by thomas.forbriger's avatar thomas.forbriger Committed by thomas.forbriger
Browse files

resolved some issues such that code compiles again

This is a legacy commit from before 2015-03-01.
It may be incomplete as well as inconsistent.
See COPYING.legacy and README.history for details.


SVN Path:     http://gpitrsvn.gpi.uni-karlsruhe.de/repos/TFSoftware/branches/libdatrwxx.su
SVN Revision: 3460
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent 3e857bd2
......@@ -50,8 +50,8 @@ namespace datrw {
/*! \brief Format properties
* \ingroup bonjer
*/
bool bonjer::isbinary=false;
char* const bonjer::streamID="bonjer";
const bool bonjer::isbinary=false;
const char* const bonjer::streamID="bonjer";
//@}
/*----------------------------------------------------------------------*/
......
......@@ -52,9 +52,8 @@ namespace datrw {
idatstream::idatstream(std::istream& is,
const bool& providesd,
const bool& providesf,
const bool& providesi,
const bool& isbinary):
Mis(is), Mwid2set(false), Msrceset(false), Minfoset(false),
const bool& providesi)
: Mis(is), Mwid2set(false), Msrceset(false), Minfoset(false),
Mtracefreeset(false), Mfilefreeset(false), Mlast(false),
Mprovidesd(providesd), Mprovidesf(providesf), Mprovidesi(providesi)
{
......
......@@ -48,14 +48,14 @@
namespace datrw {
const std::ios_base::openmode ibonjerstream::openmode=std::ios_base::in;
const std::ios_base::openmode igsestream::openmode=std::ios_base::in;
//@{
/*! \brief Format properties
* \ingroup bonjer
* \ingroup gse
*/
bool gse::isbinary=false;
char* const gse::streamID="gse";
const bool gse::isbinary=false;
const char* const gse::streamID="gse";
//@}
/*----------------------------------------------------------------------*/
......
......@@ -48,9 +48,15 @@
namespace datrw {
const std::ios_base::openmode ibonjerstream::openmode=std::ios_base::in;
const bool ibonjerstream::isbinary=false;
const char* const ibonjerstream::streamID="hpmo";
const std::ios_base::openmode ihpmostream::openmode=std::ios_base::in;
//@{
/*! \brief Format properties
* \ingroup hpmo
*/
const bool hpmo::isbinary=false;
const char* const hpmo::streamID="hpmo";
//@}
/*----------------------------------------------------------------------*/
......
......@@ -62,8 +62,8 @@ namespace datrw {
* \ingroup mseed
*/
struct Record {
sff::WID2 wid2;
sff::FREE free;
::sff::WID2 wid2;
::sff::FREE free;
Tiseries data;
int xm1;
bool valid;
......
......@@ -52,9 +52,15 @@
namespace datrw {
const std::ios_base::openmode
ibonjerstream::openmode=std::ios_base::in|std::ios_base::binary;
const bool ibonjerstream::isbinary=true;
const char* const ibonjerstream::streamID="mseed";
imseedstream::openmode=std::ios_base::in|std::ios_base::binary;
//@{
/*! \brief Format properties
* \ingroup mseed
*/
const bool mseed::isbinary=true;
const char* const mseed::streamID="mseed";
//@}
/*----------------------------------------------------------------------*/
......
......@@ -49,9 +49,15 @@
namespace datrw {
const std::ios_base::openmode
ibonjerstream::openmode=std::ios_base::in|std::ios_base::binary;
const bool ibonjerstream::isbinary=true;
const char* const ibonjerstream::streamID="pdas";
ipdasstream::openmode=std::ios_base::in|std::ios_base::binary;
//@{
/*! \brief Format properties
* \ingroup pdas
*/
const bool pdas::isbinary=true;
const char* const pdas::streamID="pdas";
//@}
/*----------------------------------------------------------------------*/
......
......@@ -67,15 +67,15 @@ namespace datrw {
bool isbinary(const Eformat& format)
{
bool retval=false;
if (Mformat==Fbonjer) { retval=bonjer::isbinary; }
else if (Mformat==Fpdas) { retval=pdas::isbinary; }
else if (Mformat==Fsff) { retval=sff::isbinary; }
else if (Mformat==Fhpmo) { retval=hpmo::isbinary; }
else if (Mformat==Fmseed) { retval=mseed::isbinary; }
else if (Mformat==Fsac) { retval=sac::isbinary; }
else if (Mformat==Fgse) { retval=gse::isbinary; }
else if (Mformat==Ftsoft) { retval=tsoft::isbinary; }
else if (Mformat==Ftfascii) { retval=tfascii::isbinary; }
if (format==Fbonjer) { retval=bonjer::isbinary; }
else if (format==Fpdas) { retval=pdas::isbinary; }
else if (format==Fsff) { retval=sff::isbinary; }
else if (format==Fhpmo) { retval=hpmo::isbinary; }
else if (format==Fmseed) { retval=mseed::isbinary; }
else if (format==Fsac) { retval=sac::isbinary; }
else if (format==Fgse) { retval=gse::isbinary; }
else if (format==Ftsoft) { retval=tsoft::isbinary; }
else if (format==Ftfascii) { retval=tfascii::isbinary; }
else
{ DATRW_abort("ERROR (isbinary): unknown format!"); }
return(retval);
......@@ -88,15 +88,15 @@ namespace datrw {
std::ios_base::openmode ianystream::openmode(const Eformat& format)
{
std::ios_base::openmode retval;
if (Mformat==Fbonjer) { retval=ibonjerstream::openmode; }
else if (Mformat==Fpdas) { retval=ipdasstream::openmode; }
else if (Mformat==Fsff) { retval=isffstream::openmode; }
else if (Mformat==Fhpmo) { retval=ihpmostream::openmode; }
else if (Mformat==Fmseed) { retval=imseedstream::openmode; }
else if (Mformat==Fsac) { retval=isacstream::openmode; }
else if (Mformat==Fgse) { retval=igsestream::openmode; }
else if (Mformat==Ftsoft) { retval=itsoftstream::openmode; }
else if (Mformat==Ftfascii) { retval=itfasciistream::openmode; }
if (format==Fbonjer) { retval=ibonjerstream::openmode; }
else if (format==Fpdas) { retval=ipdasstream::openmode; }
else if (format==Fsff) { retval=isffstream::openmode; }
else if (format==Fhpmo) { retval=ihpmostream::openmode; }
else if (format==Fmseed) { retval=imseedstream::openmode; }
else if (format==Fsac) { retval=isacstream::openmode; }
else if (format==Fgse) { retval=igsestream::openmode; }
else if (format==Ftsoft) { retval=itsoftstream::openmode; }
else if (format==Ftfascii) { retval=itfasciistream::openmode; }
else
{ DATRW_abort("ERROR (openmode): unknown format!"); }
return(retval);
......
......@@ -50,9 +50,15 @@
namespace datrw {
const std::ios_base::openmode
ibonjerstream::openmode=std::ios_base::in|std::ios_base::binary;
const bool ibonjerstream::isbinary=true;
const char* const ibonjerstream::streamID="sac";
isacstream::openmode=std::ios_base::in|std::ios_base::binary;
//@{
/*! \brief Format properties
* \ingroup sac
*/
const bool sac::isbinary=true;
const char* const sac::streamID="sac";
//@}
/*----------------------------------------------------------------------*/
......
......@@ -43,6 +43,7 @@
#define DATRW_SFF_H_CVSID \
"$Id$"
#include<sffxx.h>
#include<datrwxx/datread.h>
#include<datrwxx/datwrite.h>
#include<datrwxx/reservoir.h>
......@@ -80,7 +81,7 @@ namespace datrw {
{ Tbase::help(os, "isffstream"); }
static const std::ios_base::openmode openmode;
private:
void settraceheader(const sff::TraceHeader& header);
void settraceheader(const ::sff::TraceHeader& header);
bool Mdebug;
}; // class isffstream
......@@ -118,9 +119,9 @@ namespace datrw {
bool Mdebug;
private:
bool Mwid2iswaiting, Mfreeiswaiting, Minfoiswaiting;
sff::WID2 Mwid2waiting;
sff::FREE Mfreewaiting;
sff::INFO Minfowaiting;
::sff::WID2 Mwid2waiting;
::sff::FREE Mfreewaiting;
::sff::INFO Minfowaiting;
datrw::util::seriesreservoir Mserieswaiting;
protected:
......
......@@ -51,16 +51,22 @@
namespace datrw {
const std::ios_base::openmode ibonjerstream::openmode=std::ios_base::in;
const bool ibonjerstream::isbinary=false;
const char* const ibonjerstream::streamID="sff";
const std::ios_base::openmode isffstream::openmode=std::ios_base::in;
//@{
/*! \brief Format properties
* \ingroup sfsff
*/
const bool sff::isbinary=false;
const char* const sff::streamID="sff";
//@}
/*----------------------------------------------------------------------*/
isffstream::isffstream(std::istream& is, const bool& debug):
Tbase(is, true, true, true), Mdebug(debug)
{
sff::FileHeader fileheader(Mis, debug);
::sff::FileHeader fileheader(Mis, debug);
if (fileheader.hasfree()) { this->setfilefree(fileheader.free()); }
if (fileheader.hassrce()) { this->setsrce(fileheader.srce()); }
}
......@@ -76,7 +82,7 @@ namespace datrw {
<< "DEBUG (isffstream::dseries): read waveform"
<< std::endl;
}
sff::InputWaveform<Tdseries> waveform(Mis);
::sff::InputWaveform<Tdseries> waveform(Mis);
this->settraceheader(waveform.header());
if (Mdebug)
{ std::cerr << "DEBUG (isffstream::dseries): done" << std::endl; }
......@@ -94,7 +100,7 @@ namespace datrw {
<< "DEBUG (isffstream::fseries): read waveform"
<< std::endl;
}
sff::InputWaveform<Tfseries> waveform(Mis);
::sff::InputWaveform<Tfseries> waveform(Mis);
this->settraceheader(waveform.header());
if (Mdebug)
{ std::cerr << "DEBUG (isffstream::fseries): done" << std::endl; }
......@@ -112,7 +118,7 @@ namespace datrw {
<< "DEBUG (isffstream::iseries): read waveform"
<< std::endl;
}
sff::InputWaveform<Tiseries> waveform(Mis);
::sff::InputWaveform<Tiseries> waveform(Mis);
this->settraceheader(waveform.header());
if (Mdebug)
{ std::cerr << "DEBUG (isffstream::iseries): done" << std::endl; }
......@@ -130,7 +136,7 @@ namespace datrw {
<< "DEBUG (isffstream::skipseries): skipped waveform"
<< std::endl;
}
sff::SkipWaveform skip(Mis);
::sff::SkipWaveform skip(Mis);
if (Mdebug)
{ std::cerr << "DEBUG (isffstream::skipseries): done" << std::endl; }
this->settraceheader(skip.header());
......@@ -138,7 +144,7 @@ namespace datrw {
/*----------------------------------------------------------------------*/
void isffstream::settraceheader(const sff::TraceHeader& header)
void isffstream::settraceheader(const ::sff::TraceHeader& header)
{
this->setwid2(header.wid2());
if (header.hasfree()) { this->settracefree(header.free()); }
......
......@@ -38,21 +38,29 @@
"$Id$"
#include <datrwxx/su.h>
#include <datrwxx/util.h>
#include <datrwxx/error.h>
namespace datrw {
const std::ios_base::openmode
ibonjerstream::openmode=std::ios_base::in|std::ios_base::binary;
const bool ibonjerstream::isbinary=true;
const char* const ibonjerstream::streamID="su";
isustream::openmode=std::ios_base::in|std::ios_base::binary;
//@{
/*! \brief Format properties
* \ingroup su
*/
const bool su::isbinary=true;
const char* const su::streamID="su";
//@}
/*----------------------------------------------------------------------*/
isustream::isustream(std::istream& is, const bool& debug):
Tbase(is, true, true, false, true), Mdebug(debug)
Tbase(is, true, true, false), Mdebug(debug)
{
DATRWXX_assert(is.good()
"ERROR (isustream::isustream): input stream is bad");
DATRW_assert(is.good(),
"ERROR (isustream::isustream): input stream is bad");
Mnextheader.read(is);
}
......@@ -67,8 +75,10 @@ namespace datrw {
Tfseries isustream::fseries()
{
this->readheader();
return(datrw::su::read_su_data(this->Mis, this->wid2().nsamples));
//this->readheader();
//return(datrw::su::read_su_data(this->Mis, this->wid2().nsamples));
DATRW_abort("ERROR: not implemented");
return(Tfseries(0));
} // Tiseries isustream::fseries()
/*----------------------------------------------------------------------*/
......@@ -88,9 +98,11 @@ namespace datrw {
/*----------------------------------------------------------------------*/
/*
void isustream::readheader()
{
} // void isustream::readheader()
*/
/*----------------------------------------------------------------------*/
......
......@@ -46,9 +46,15 @@
namespace datrw {
const std::ios_base::openmode ibonjerstream::openmode=std::ios_base::in;
const bool ibonjerstream::isbinary=false;
const char* const ibonjerstream::streamID="tfascii";
const std::ios_base::openmode itfasciistream::openmode=std::ios_base::in;
//@{
/*! \brief Format properties
* \ingroup tfascii
*/
const bool tfascii::isbinary=false;
const char* const tfascii::streamID="tfascii";
//@}
/*----------------------------------------------------------------------*/
// constructor
......
......@@ -101,17 +101,17 @@ namespace datrw {
//! holds the fileheader data
struct FileHeader {
bool hasfilefree, hassrce;
sff::FREE filefree;
sff::SRCE srce;
::sff::FREE filefree;
::sff::SRCE srce;
};
/*----------------------------------------------------------------------*/
//! holds the traceheader data
struct TraceHeader {
bool hastracefree, hasinfo, haswid2;
sff::WID2 wid2;
sff::FREE tracefree;
sff::INFO info;
::sff::WID2 wid2;
::sff::FREE tracefree;
::sff::INFO info;
};
/*----------------------------------------------------------------------*/
......
......@@ -44,9 +44,15 @@
namespace datrw {
const std::ios_base::openmode ibonjerstream::openmode=std::ios_base::in;
const bool ibonjerstream::isbinary=false;
const char* const ibonjerstream::streamID="tsoft";
const std::ios_base::openmode itsoftstream::openmode=std::ios_base::in;
//@{
/*! \brief Format properties
* \ingroup tsoft
*/
const bool tsoft::isbinary=false;
const char* const tsoft::streamID="tsoft";
//@}
/*----------------------------------------------------------------------*/
......
......@@ -56,9 +56,9 @@ namespace datrw {
struct Trace {
public:
//! \brief header
sff::WID2 Mwid2;
::sff::WID2 Mwid2;
//! \brief free comment lines
sff::FREE Mfree;
::sff::FREE Mfree;
//! \brief samples
datrw::Tdseries Mseries;
}; // struct Trace
......@@ -75,7 +75,7 @@ namespace datrw {
*/
struct File {
//! \brief free comment lines
sff::FREE Mfree;
::sff::FREE Mfree;
//! \brief all traces in file
Ttraceseries Mtraces;
}; // struct File
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment