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

changed namespace and include directory and library name in all program

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.
sources which referred to libdatreadxx and now should refer to
libdatrwxx


SVN Path:     http://gpitrsvn.gpi.uni-karlsruhe.de/repos/TFSoftware/branches/libdatrwxx.su
SVN Revision: 3445
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent c11ba50b
......@@ -119,7 +119,7 @@ Libraries
libgsexx: base library, depends only on common system libraries
libsffxx: depends on libgsexx, libaff, and libtime
libdatreadxx: depends on libaff, libgsexx, libtime, libsffxx
libdatrwxx: depends on libaff, libgsexx, libtime, libsffxx
When installing multiple libraries, the target 'install-include' should be
issued for all libraries first. After header files are installed, issue the
......
......@@ -70,23 +70,17 @@ C++ libraries
external dependencies: -
internal dependencies: libaff libgsexx liblibtime
checked: 16.10.2010 (tforb)
libdatreadxx
libdatrwxx
language: C++
external dependencies: -
internal dependencies: libaff libgsexx liblibtime libsffxx
internal dependencies: libaff libgsexx libtime++ libsffxx
test program dependency: libtfxx
checked: 16.10.2010 (tforb)
libdatwritexx
language: C++
external dependencies: -
internal dependencies: libaff libgsexx liblibtime libsffxx
test program dependency: libtfxx
checked: 16.10.2010 (tforb)
checked: 22.11.2010 (tforb)
libtsxx
language: C++
external dependencies: -
internal dependencies: libtfxx libgsexx libtime libseife libaff
libdatreadxx libsffxx
internal dependencies: libtfxx libgsexx libtime++ libseife libaff
libdatrwxx libsffxx
checked: 16.10.2010 (tforb)
!! comment: there are many dependencies on libtfxx which probably should not
be here
......@@ -114,7 +108,7 @@ C++ libraries
libtfxx
language: C++
external dependencies: libgsl libboost
internal dependencies: libaff libdatreadxx libgsexx liblibtime
internal dependencies: libaff libdatrwxx libgsexx liblibtime
libsffxx libtsxx
checked: 16.10.2010 (tforb)
......
......@@ -33,13 +33,13 @@ CPPFLAGS=-I$(LOCINCLUDEDIR) $(FLAGS)
mgm2sff: %: %.o
$(CXX) -o $@ $^ -I$(LOCINCLUDEDIR) \
-lsffxx -ltime++ -lgsexx -laff -ltsxx -ldatreadxx \
-lsffxx -ltime++ -lgsexx -laff -ltsxx -ldatrwxx \
-ltfxx -L$(LOCLIBDIR) $(CXXFLAGS) $(FLAGS)
/bin/cp -vpd $@ $(LOCBINDIR)
mgm2sffstat: %stat: %.o
$(CXX) -static -o $@ $^ -I$(LOCINCLUDEDIR) \
-lsffxx -ltime++ -lgsexx -laff -ltsxx -ldatreadxx \
-lsffxx -ltime++ -lgsexx -laff -ltsxx -ldatrwxx \
-ltfxx -L$(LOCLIBDIR) $(CXXFLAGS) $(FLAGS)
/bin/cp -vpd $@ $(LOCBINDIR)
......
......@@ -20,7 +20,7 @@ LIBDIRS=libaff \
libsffu \
libgsexx \
libsffxx \
libdatreadxx \
libdatrwxx \
libemod \
libfourier \
liblinearxx \
......
......@@ -70,7 +70,7 @@ int sff_ropens__(integer *lu, char *filename, real *version, char *timestamp,
int retval=0;
*ierr=0;
try {
datread::ianystream &is=
datrw::ianystream &is=
istreammanager.open(int(*lu), stringfromfstring(filename, filename_len));
sff::SRCE srce;
std::string ocode;
......
......@@ -78,16 +78,16 @@ int sff_rtracei__(integer *lu, real *tanf, real *dt, char *wid2line,
int retval=0;
*ierr=0;
try {
datread::ianystream &is=istreammanager(int(*lu));
datrw::ianystream &is=istreammanager(int(*lu));
sff::WID2 wid2;
sff::INFO info;
datread::Tfseries iseries;
datrw::Tfseries iseries;
is >> iseries;
FAPIDXX_fuassert((int(iseries.size())<=(*nsamp)), *lu,
"sff_rtracei__: too many samples");
int nsamples=iseries.size();
aff::LinearShape shape(0, nsamples-1, 0);
datread::Tfseries series(shape, aff::SharedHeap<real>(fdata, *nsamp));
datrw::Tfseries series(shape, aff::SharedHeap<real>(fdata, *nsamp));
series.copyin(iseries);
*last = is.last() ? 1 : 0;
is >> wid2;
......
......@@ -56,7 +56,7 @@ int sff_skipdata__(integer *lu, char *code, logical *last, integer *ierr,
int retval=0;
*ierr=0;
try {
datread::ianystream &is=istreammanager(int(*lu));
datrw::ianystream &is=istreammanager(int(*lu));
fillfstring(std::string(""), code, code_len);
is.skipseries();
*last = is.last() ? 1 : 0;
......
/*! \file fileunit.cc
* \brief a file unit interface to libdatreadxx and libdatwritexx (implementation)
* \brief a file unit interface to libdatrwxx (implementation)
*
* ----------------------------------------------------------------------------
*
......@@ -7,7 +7,7 @@
* \author Thomas Forbriger
* \date 17/11/2010
*
* a file unit interface to libdatreadxx and libdatwritexx (implementation)
* a file unit interface to libdatrwxx (implementation)
*
* Copyright (c) 2010 by Thomas Forbriger (BFO Schiltach)
*
......@@ -33,7 +33,7 @@ namespace fapidxx {
/*----------------------------------------------------------------------*/
IFileUnits::IFileUnits()
: Mformat(datread::Fsff)
: Mformat(datrw::Fsff)
{
Mstreammap.clear();
} // IFileUnits::IFileUnits()
......@@ -51,16 +51,16 @@ namespace fapidxx {
} // IFileUnits::~IFileUnits()
/*----------------------------------------------------------------------*/
datread::ianystream& IFileUnits::open(const int& unit,
datrw::ianystream& IFileUnits::open(const int& unit,
const std::string& filename)
{
FAPIDXX_fuassert((!this->isopen(unit)), unit,
"IFileUnits::open: file is already open");
IstreamCompound &compound=Mstreammap[unit];
compound.Mistream=new std::ifstream(filename.c_str());
compound.Mianystream=new datread::ianystream(*compound.Mistream, Mformat);
compound.Mianystream=new datrw::ianystream(*compound.Mistream, Mformat);
return (this->getstream(unit));
} // datread::ianystream& IFileUnits::open
} // datrw::ianystream& IFileUnits::open
/*----------------------------------------------------------------------*/
......@@ -85,12 +85,12 @@ namespace fapidxx {
/*----------------------------------------------------------------------*/
datread::ianystream& IFileUnits::getstream(const int& unit)
datrw::ianystream& IFileUnits::getstream(const int& unit)
{
FAPIDXX_fuassert((this->isopen(unit)), unit,
"IFileUnits::getstream: file is not open");
return (*Mstreammap[unit].Mianystream);
} // datread::ianystream& IFileUnits::getstream(const int& unit)
} // datrw::ianystream& IFileUnits::getstream(const int& unit)
} // namespace fapidxx
......
/*! \file fileunit.h
* \brief a file unit interface to libdatreadxx and libdatwritexx (prototypes)
* \brief a file unit interface to libdatrwxx (prototypes)
*
* ----------------------------------------------------------------------------
*
......@@ -7,7 +7,7 @@
* \author Thomas Forbriger
* \date 17/11/2010
*
* a file unit interface to libdatreadxx and libdatwritexx (prototypes)
* a file unit interface to libdatrwxx (prototypes)
*
* Copyright (c) 2010 by Thomas Forbriger (BFO Schiltach)
*
......@@ -28,7 +28,7 @@
#include<map>
#include<string>
#include<iostream>
#include<datreadxx/readany.h>
#include<datrwxx/readany.h>
namespace fapidxx {
......@@ -41,10 +41,10 @@ namespace fapidxx {
//! destructor has to close all open files
~IFileUnits();
//! open a new file
datread::ianystream& open(const int& unit,
datrw::ianystream& open(const int& unit,
const std::string& filename);
//! return a stream associated with a file unit
datread::ianystream& getstream(const int& unit);
datrw::ianystream& getstream(const int& unit);
//! check whether a file is opened for this file unit
bool isopen(const int& unit) const;
//! close the file associated with this file unit
......@@ -52,13 +52,13 @@ namespace fapidxx {
//! set file format to be used upon file open
void setformat(const std::string& format);
//! quick access
datread::ianystream& operator()(const int& unit)
datrw::ianystream& operator()(const int& unit)
{ return(this->getstream(unit)); }
private:
//! A C++ stream has to be handled together with an ianystream
struct IstreamCompound {
std::istream *Mistream;
datread::ianystream *Mianystream;
datrw::ianystream *Mianystream;
}; // struct IstreamCompound
//! do not allow copying
IFileUnits(const IFileUnits& ifu);
......@@ -67,7 +67,7 @@ namespace fapidxx {
//! type of my ianystream container
typedef std::map<int, IstreamCompound> Tstreammap;
//! file type to be used
datread::Eformat Mformat;
datrw::Eformat Mformat;
//! place to hold my ianystream objects
Tstreammap Mstreammap;
}; // clas IFileUnits
......
/*! \file readtsdata.cc
* \brief read waveform data through the interface provided by libdatreadxx
* \brief read waveform data through the interface provided by libdatrwxx
* (implementation)
*
* ----------------------------------------------------------------------------
......@@ -8,7 +8,7 @@
* \author Thomas Forbriger
* \date 31/01/2007
*
* read waveform data through the interface provided by libdatreadxx
* read waveform data through the interface provided by libdatrwxx
* (implementation)
*
* ----
......@@ -49,7 +49,7 @@ namespace tfxx {
//! read complete SFF file
SFile readSSFF(const std::string& filename,
const bool& verbose,
const datread::Eformat& format)
const datrw::Eformat& format)
{
Ttracelist rangelist;
return (readSSFF(filename, rangelist, verbose, format));
......@@ -58,7 +58,7 @@ namespace tfxx {
//! read complete SFF file
DFile readDSFF(const std::string& filename,
const bool& verbose,
const datread::Eformat& format)
const datrw::Eformat& format)
{
Ttracelist rangelist;
return (readDSFF(filename, rangelist, verbose, format));
......@@ -70,7 +70,7 @@ namespace tfxx {
SFile readSSFF(const std::string& filename,
const Ttracelist& selection,
const bool& verbose,
const datread::Eformat& format)
const datrw::Eformat& format)
{
SFile retval;
retval.arguments.name=filename;
......@@ -79,7 +79,7 @@ namespace tfxx {
std::cout << "open input file " << filename << std::endl;
}
std::ifstream ifs(filename.c_str());
datread::ianystream is(ifs, format);
datrw::ianystream is(ifs, format);
retval.data.read(is.idatstream(), selection, verbose);
return(retval);
}
......@@ -88,7 +88,7 @@ namespace tfxx {
DFile readDSFF(const std::string& filename,
const Ttracelist& selection,
const bool& verbose,
const datread::Eformat& format)
const datrw::Eformat& format)
{
DFile retval;
retval.arguments.name=filename;
......@@ -97,7 +97,7 @@ namespace tfxx {
std::cout << "open input file " << filename << std::endl;
}
std::ifstream ifs(filename.c_str());
datread::ianystream is(ifs, format);
datrw::ianystream is(ifs, format);
retval.data.read(is.idatstream(), selection, verbose);
return(retval);
}
......@@ -108,7 +108,7 @@ namespace tfxx {
SFile readSSFF(const tfxx::cmdline::Filename& filename,
const bool& verbose,
Ttracelistkey tracekey,
const datread::Eformat& format)
const datrw::Eformat& format)
{
Ttracelist selection=
tfxx::string::rangelist<Ttracelist::Tvalue>(filename.value(tracekey));
......@@ -121,7 +121,7 @@ namespace tfxx {
DFile readDSFF(const tfxx::cmdline::Filename& filename,
const bool& verbose,
Ttracelistkey tracekey,
const datread::Eformat& format)
const datrw::Eformat& format)
{
Ttracelist selection=
tfxx::string::rangelist<Ttracelist::Tvalue>(filename.value(tracekey));
......@@ -136,7 +136,7 @@ namespace tfxx {
TSFileList readSSFF(const tfxx::cmdline::Tparsed& flist,
const bool& verbose,
Ttracelistkey tracekey,
const datread::Eformat& format)
const datrw::Eformat& format)
{
TSFileList retval;
tfxx::cmdline::Tparsed::const_iterator file=flist.begin();
......@@ -152,7 +152,7 @@ namespace tfxx {
TDFileList readDSFF(const tfxx::cmdline::Tparsed& flist,
const bool& verbose,
Ttracelistkey tracekey,
const datread::Eformat& format)
const datrw::Eformat& format)
{
TDFileList retval;
tfxx::cmdline::Tparsed::const_iterator file=flist.begin();
......
/*! \file readtsdata.h
* \brief read waveform data through the interface provided by libdatreadxx
* \brief read waveform data through the interface provided by libdatrwxx
* (prototypes)
*
* ----------------------------------------------------------------------------
......@@ -8,7 +8,7 @@
* \author Thomas Forbriger
* \date 31/01/2007
*
* read waveform data through the interface provided by libdatreadxx
* read waveform data through the interface provided by libdatrwxx
* (prototypes)
*
* ----
......@@ -48,7 +48,7 @@
#include<tfxx/rangelist.h>
#include<tfxx/xcmdline.h>
#include<tfxx/rangestring.h>
#include<datreadxx/readany.h>
#include<datrwxx/readany.h>
#include<tsxx/sffheaders.h>
#include<iostream>
#include<fstream>
......@@ -181,7 +181,7 @@ namespace tfxx {
*/
DFile readDSFF(const std::string& filename,
const bool& verbose=false,
const datread::Eformat& format=datread::Fsff);
const datrw::Eformat& format=datrw::Fsff);
/*! \brief read complete SFF file with trace selection.
*
......@@ -200,7 +200,7 @@ namespace tfxx {
DFile readDSFF(const std::string& filename,
const Ttracelist& selection,
const bool& verbose=false,
const datread::Eformat& format=datread::Fsff);
const datrw::Eformat& format=datrw::Fsff);
/*! \brief read complete SFF file with trace selection.
*
......@@ -221,7 +221,7 @@ namespace tfxx {
DFile readDSFF(const tfxx::cmdline::Filename& filename,
const bool& verbose=false,
Ttracelistkey tracekey="t",
const datread::Eformat& format=datread::Fsff);
const datrw::Eformat& format=datrw::Fsff);
/*! \brief read complete list of SFF files with trace selection.
*
......@@ -242,7 +242,7 @@ namespace tfxx {
TDFileList readDSFF(const tfxx::cmdline::Tparsed& flist,
const bool& verbose=false,
Ttracelistkey tracekey="t",
const datread::Eformat& format=datread::Fsff);
const datrw::Eformat& format=datrw::Fsff);
/*! \brief read complete SFF file (single precision version).
*
......@@ -258,7 +258,7 @@ namespace tfxx {
*/
SFile readSSFF(const std::string& filename,
const bool& verbose=false,
const datread::Eformat& format=datread::Fsff);
const datrw::Eformat& format=datrw::Fsff);
/*! \brief read complete SFF file with trace selection (single precision
* version).
......@@ -278,7 +278,7 @@ namespace tfxx {
SFile readSSFF(const std::string& filename,
const Ttracelist& selection,
const bool& verbose=false,
const datread::Eformat& format=datread::Fsff);
const datrw::Eformat& format=datrw::Fsff);
/*! \brief read complete SFF file with trace selection (single precision
* version).
......@@ -300,7 +300,7 @@ namespace tfxx {
SFile readSSFF(const tfxx::cmdline::Filename& filename,
const bool& verbose=false,
Ttracelistkey tracekey="t",
const datread::Eformat& format=datread::Fsff);
const datrw::Eformat& format=datrw::Fsff);
/*! \brief read complete list of SFF files with trace selection (single
* precision version).
......@@ -322,7 +322,7 @@ namespace tfxx {
TSFileList readSSFF(const tfxx::cmdline::Tparsed& flist,
const bool& verbose=false,
Ttracelistkey tracekey="t",
const datread::Eformat& format=datread::Fsff);
const datrw::Eformat& format=datrw::Fsff);
} // namespace tsio
......
......@@ -23,7 +23,7 @@
# ----
#
# Other libraries that are required to compile libtsxx:
# libaff, libtfxx, libgsexx, libtime, libdatreadxx, libsffxx, libcseife
# libaff, libtfxx, libgsexx, libtime, libdatrwxx, libsffxx, libcseife
#
# REVISIONS and CHANGES
# 18/12/2003 V1.0 Thomas Forbriger
......
......@@ -80,7 +80,7 @@ namespace ts {
Mhasfree=true;
}
datread::idatstream& operator>>(datread::idatstream& is,
datrw::idatstream& operator>>(datrw::idatstream& is,
FileHeader& fh)
{
::sff::FREE free;
......@@ -91,7 +91,7 @@ namespace ts {
return(is);
}
datread::idatstream& operator>>(datread::idatstream& is,
datrw::idatstream& operator>>(datrw::idatstream& is,
TraceHeader& th)
{
::sff::FREE free;
......
......@@ -45,7 +45,7 @@
#include<sffxx.h>
#include<tsxx/tsxx.h>
#include<datreadxx/datread.h>
#include<datrwxx/datread.h>
#include<tfxx/rangelist.h>
#include<sffostream.h>
#include<vector>
......@@ -147,9 +147,9 @@ namespace ts {
typedef Tbase Ttracevector;
typedef typename Tbase::Ttimeseries Ttimeseries;
typedef tfxx::RangeList<int> Trangelist;
void read(datread::idatstream& is,
void read(datrw::idatstream& is,
const bool& verbose=false);
void read(datread::idatstream& is,
void read(datrw::idatstream& is,
const Trangelist& rl,
const bool& verbose=false);
FileHeader fileheader;
......@@ -158,13 +158,13 @@ namespace ts {
/*======================================================================*/
// operators
datread::idatstream& operator>>(datread::idatstream& is, FileHeader& fh);
datread::idatstream& operator>>(datread::idatstream& is, TraceHeader& th);
datrw::idatstream& operator>>(datrw::idatstream& is, FileHeader& fh);
datrw::idatstream& operator>>(datrw::idatstream& is, TraceHeader& th);
/*----------------------------------------------------------------------*/
template<class C>
datread::idatstream& operator>>(datread::idatstream& is,
datrw::idatstream& operator>>(datrw::idatstream& is,
SFFTimeSeries<C>& s)
{ return(is >> s.series() >> s.header); }
......@@ -239,7 +239,7 @@ namespace ts {
// member functions
template<class C>
inline void File<C>::read(datread::idatstream& is, const bool& verbose)
inline void File<C>::read(datrw::idatstream& is, const bool& verbose)
{
Trangelist rl;
this->read(is, rl, verbose);
......@@ -248,7 +248,7 @@ namespace ts {
/*----------------------------------------------------------------------*/
template<class C>
inline void File<C>::read(datread::idatstream& is,
inline void File<C>::read(datrw::idatstream& is,
const Trangelist& rl,
const bool& verbose)
{
......
......@@ -77,7 +77,7 @@ clean: ;
any2matlab: any2matlab.cc
mkdir -pv $(MATLABBINDIR)
mex $< $(MEXFLAGS) -output $(MATLABBINDIR)/$@.$(TYPE) \
-L$(LOCLIBDIR) -I$(LOCINCLUDEDIR) -ldatreadxx\
-L$(LOCLIBDIR) -I$(LOCINCLUDEDIR) -ldatrwxx\
-lsffxx -lgsexx -laff -ltime++
#======================================================================
......
......@@ -12,12 +12,12 @@
*
* \section concept Concept of the library
* The library provides seismic data file reading modules for several data formats. Functionality
* for all formats is provided through a common interface defined in class datread::idatstream. All
* format specific classes are derived from this base. The class datread::ianystream has the same
* for all formats is provided through a common interface defined in class datrw::idatstream. All
* format specific classes are derived from this base. The class datrw::ianystream has the same
* common interface but provides an inheritance transparent constructor mechanism. Programs making
* use of datread::ianystream for reading seismic data will directly benefit from each additional
* waveform format added to libdatreadxx without the need of changing the source code of the
* library. Just link against libdatreadxx and go...
* use of datrw::ianystream for reading seismic data will directly benefit from each additional
* waveform format added to libdatrwxx without the need of changing the source code of the
* library. Just link against libdatrwxx and go...
*
* Currently supported formats are:
*
......@@ -29,23 +29,23 @@
* - hpmo: HP-MO data format defined by W. Grossmann (BFO)
* - bonjer: K2 ASCII data format (defined by K. Bonjer?)
*
* Each format specific module will be placed into its own namespace, like datread::hpmo. There you
* will find specific functions like datread::hpmo::readdata. The interface provided through these
* Each format specific module will be placed into its own namespace, like datrw::hpmo. There you
* will find specific functions like datrw::hpmo::readdata. The interface provided through these
* functions is specific to the data format. However, for each format we provide a class derived
* from datread::idatstream, like datread::ihpmostream. Being derived from a common base class all
* these format specific classes provide a common interface once defined in datread::idastream. This
* from datrw::idatstream, like datrw::ihpmostream. Being derived from a common base class all
* these format specific classes provide a common interface once defined in datrw::idastream. This
* interface handles data in terms of SFF (Stuttgart File Format) data elements (like INFO lines and
* FREE blocks). Thus the format specific input classes perform the conversion from the specific
* format to SFF. Any data that does not fit into SFF, must be dropped or may be only passed via the
* FREE blocks. All SFF data elements not present in the specific format must be replaced by default
* values.
*
* datread::idatstream behaves like an input stream for SFF data elements. Appropriate input
* operators are presented in namespace datread. All derived classes and datread::ianystream provide
* the same interface and operator set. datread::ianystream is not derived from datread::idatstream.
* It rather serves as a handle to any class derived from datread::idatstream. Anyway
* datread::ianystream provides the same interface. Consider to use datread::sequentialtracereader
* instead of datread::ianystream since it provides higher efficiency when reading several traces
* datrw::idatstream behaves like an input stream for SFF data elements. Appropriate input
* operators are presented in namespace datrw. All derived classes and datrw::ianystream provide
* the same interface and operator set. datrw::ianystream is not derived from datrw::idatstream.
* It rather serves as a handle to any class derived from datrw::idatstream. Anyway
* datrw::ianystream provides the same interface. Consider to use datrw::sequentialtracereader
* instead of datrw::ianystream since it provides higher efficiency when reading several traces
* from the same file.
*
* \section any2matlab any2matlab.mexa64
......
/*!\file any2matlab.cc
* \brief This es a MEX-file using Thomas Forbriger's datread library importing seismic dataformats
* \brief This es a MEX-file using Thomas Forbriger's datrwxx library importing seismic dataformats
* to MATLAB.
*
* Currently supported formats are:
......@@ -121,7 +121,7 @@
#include <string>
#include <algorithm>
#include <vector>
#include <datreadxx/readany.h>
#include <datrwxx/readany.h>
#include <libtime++.h>
#include <aff/series.h>
#include <gsexx.h>
......@@ -227,11 +227,11 @@ void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
// set filetype to lower case
transform(filetype.begin(), filetype.end(), filetype.begin(), tolower);
datread::Eformat format = datread::anyID(filetype);
datrw::Eformat format = datrw::anyID(filetype);
{
std::ifstream ifs(infile.c_str());
datread::ianystream is(ifs, format);
datrw::ianystream is(ifs, format);
/* get number of traces in infile */
/* while skipping series */
......@@ -272,7 +272,7 @@ void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
{
std::ifstream ifs(infile.c_str());
datread::ianystream is(ifs, format);
datrw::ianystream is(ifs, format);
hot = is.good();
int i = 0;
......@@ -282,7 +282,7 @@ void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
// read integer data