Commit d07df5c6 authored by thomas.forbriger's avatar thomas.forbriger
Browse files

ticket10: removed all references to tfxx and TFXX by replacement

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.

notice: code does not compile
Exception class is duplicate now
one in tsxx.h and once in error.h
parent 023a6db4
......@@ -41,7 +41,7 @@
#include <tsxx/anyfilter.h>
#include <tsxx/filter.h>
#include <tsxx/seifeclass.h>
#include <tfxx/misc.h>
#include <tsxx/debug.h>
namespace ts {
......@@ -50,8 +50,8 @@ namespace ts {
Tfilterhandle make_any_filter(const std::string& s,
const bool& debug)
{
TFXX_debug(debug, "make_any_filter", "process " + s );
tfxx::error::Exception::dont_report_on_construct();
TSXX_debug(debug, "make_any_filter", "process " + s );
ts::error::Exception::dont_report_on_construct();
typedef Tfilterhandle Tfh;
Tfh fh(new Noop());
bool hot=true;
......@@ -63,13 +63,13 @@ namespace ts {
}
catch (UnknownFilterException) {
hot=true;
TFXX_debug(debug, "make_any_filter",
TSXX_debug(debug, "make_any_filter",
"caught unknown filter exception from my own" );
}
catch (Exception e) {
TFXX_debug(debug, "make_any_filter",
TSXX_debug(debug, "make_any_filter",
"caught other exception from my own" );
tfxx::error::Exception::report_on_construct();
ts::error::Exception::report_on_construct();
e.report();
throw;
}
......@@ -82,24 +82,24 @@ namespace ts {
}
catch (UnknownFilterException) {
hot=true;
TFXX_debug(debug, "make_any_filter",
TSXX_debug(debug, "make_any_filter",
"caught unknown filter exception from seife" );
}
catch (Exception e) {
TFXX_debug(debug, "make_any_filter",
TSXX_debug(debug, "make_any_filter",
"caught other exception from seife" );
tfxx::error::Exception::report_on_construct();
ts::error::Exception::report_on_construct();
e.report();
throw;
}
}
if (hot) {
TFXX_debug(debug, "make_any_filter",
TSXX_debug(debug, "make_any_filter",
"still hot after seife and my own" );
tfxx::error::Exception::report_on_construct();
ts::error::Exception::report_on_construct();
TSXX_UnknownFilterAbort("ts::filter::make_any_filter", s);
}
tfxx::error::Exception::report_on_construct();
ts::error::Exception::report_on_construct();
return(fh);
}
......
......@@ -39,12 +39,12 @@
"$Id$"
#include <iostream>
#include <tfxx/error.h>
#include <tsxx/error.h>
using std::cerr;
using std::endl;
namespace tfxx {
namespace ts {
namespace error {
//! initialize and instantiate
......@@ -138,6 +138,6 @@ namespace error {
}
} // namespace error
} // namespace tfxx
} // namespace ts
/* ----- END OF error.cc ----- */
......@@ -47,7 +47,7 @@
#include<stack>
namespace tfxx {
namespace ts {
/*! \defgroup group_error Error handling module
*/
......@@ -75,7 +75,7 @@ namespace error {
* initialization. If you don't like this, call dont_report_on_construct().
*
* \ingroup group_error, error_h
* \sa TFXX_Xassert
* \sa TSXX_Xassert
*/
class Exception
{
......@@ -128,7 +128,7 @@ namespace error {
} // namespace error
} // namespace tfxx
} // namespace ts
/*======================================================================*/
//
......@@ -142,7 +142,7 @@ namespace error {
* \param M message of type char*
* \param E exception class to throw
*/
#define TFXX_Xassert(C,M,E) \
#define TSXX_Xassert(C,M,E) \
if (!(C)) { throw( E ( M , __FILE__, __LINE__, #C )); }
/*! \brief Check an assertion and report by throwing an exception
......@@ -151,7 +151,7 @@ namespace error {
* \param C assert condition
* \param M message of type char*
*/
#define TFXX_assert(C,M) TFXX_Xassert( C , M , tfxx::error::Exception )
#define TSXX_assert(C,M) TSXX_Xassert( C , M , ts::error::Exception )
/*! \brief Abort and give a message
*
......@@ -159,10 +159,10 @@ namespace error {
* \param M message of type char*
* \param E exception class to throw
*/
#define TFXX_abort(M) \
throw( tfxx::error::Exception ( M , __FILE__, __LINE__ ))
#define TSXX_abort(M) \
throw( ts::error::Exception ( M , __FILE__, __LINE__ ))
#define TFXX_illegal TFXX_abort("illegal call!")
#define TSXX_illegal TSXX_abort("illegal call!")
/*! \brief Check an assertion and report only.
*
......@@ -172,9 +172,9 @@ namespace error {
* \param V any values that should be output (comment)
* a sequence of values and output operators
*/
#define TFXX_report_assert(C,M,V) \
#define TSXX_report_assert(C,M,V) \
if (!(C)) { \
tfxx::report_violation(M, __FILE__, __LINE__, #C); \
ts::report_violation(M, __FILE__, __LINE__, #C); \
std::cerr << "* comment: " << V << std::endl; \
std::cerr << std::endl; \
std::cerr.flush(); \
......@@ -189,8 +189,8 @@ namespace error {
* \param V any values that should be output (comment)
* a sequence of values and output operators
*/
#define TFXX_nonfatal_assert(F,C,M,V) \
if (F) { TFXX_report_assert(C,M,V) } else { TFXX_assert(C,M) }
#define TSXX_nonfatal_assert(F,C,M,V) \
if (F) { TSXX_report_assert(C,M,V) } else { TSXX_assert(C,M) }
#endif // TSXX_ERROR_H_VERSION (includeguard)
......
......@@ -64,7 +64,7 @@
#include <aff/functions/absmax.h>
#include <aff/seriesoperators.h>
#include <aff/subarray.h>
#include <tfxx/misc.h>
#include <tsxx/debug.h>
namespace ts {
......@@ -374,13 +374,13 @@ namespace ts {
const bool& debug)
{
std::replace(s.begin(),s.end(),',',' ');
TFXX_debug(debug, "make_filter", "process " + s );
TSXX_debug(debug, "make_filter", "process " + s );
typedef Tfilterhandle Tfh;
Tfh fh(new Noop());
std::string ID;
std::istringstream is(s);
is >> ID;
TFXX_debug(debug, "make_filter", " filter ID is " + ID );
TSXX_debug(debug, "make_filter", " filter ID is " + ID );
Tvalue v;
int n, n2, n3;
if (ID=="tre") {
......@@ -399,7 +399,7 @@ namespace ts {
fh=Tfh(new Scale(v));
} else if (ID=="add") {
is >> v;
TFXX_debug(debug, "make_filter", " filter is: Add(" << v << ")" );
TSXX_debug(debug, "make_filter", " filter is: Add(" << v << ")" );
fh=Tfh(new Add(v));
} else if (ID=="fbl") {
is >> n >> n2 >> n3;
......@@ -421,7 +421,7 @@ namespace ts {
is >> v;
fh=Tfh(new Normalize(v));
} else {
TFXX_debug(debug, "make_filter", " filter ID " + ID + " is unknown" );
TSXX_debug(debug, "make_filter", " filter ID " + ID + " is unknown" );
TSXX_UnknownFilterAbort("ts::filter::make_filter", ID.c_str());
}
return(fh);
......
......@@ -40,7 +40,7 @@
#include <iostream>
#include <tsxx/filterbase.h>
#include <tfxx/misc.h>
#include <tsxx/debug.h>
namespace ts {
......@@ -52,12 +52,12 @@ namespace ts {
Tfilterlist::const_iterator i=this->Tfilterlist::begin();
while (i!=this->Tfilterlist::end())
{
TFXX_debug(debug, "FilterCollection::operator()",
TSXX_debug(debug, "FilterCollection::operator()",
"apply filter" );
(*i)->operator()(s, debug);
++i;
}
TFXX_debug(debug, "FilterCollection::operator()",
TSXX_debug(debug, "FilterCollection::operator()",
"applied all filters" );
return s;
}
......
......@@ -45,8 +45,8 @@
#include<list>
#include<string>
#include<tsxx/tsxx.h>
#include<tfxx/handle.h>
#include<tfxx/error.h>
#include<tsxx/handle.h>
#include<tsxx/error.h>
namespace ts {
......@@ -93,7 +93,7 @@ namespace ts {
}; // class BasicFilter
//! handle to pass filters
typedef tfxx::Handle<BasicFilter> Tfilterhandle;
typedef ts::Handle<BasicFilter> Tfilterhandle;
/*! filter collection
*/
......@@ -122,9 +122,9 @@ namespace ts {
}; // class Noop
//! exception class
class Exception: public tfxx::error::Exception {
class Exception: public ts::error::Exception {
public:
typedef tfxx::error::Exception Tbase;
typedef ts::error::Exception Tbase;
Exception(const char* message,
const char* file,
const int& line,
......
......@@ -43,7 +43,7 @@
#define TSXX_HANDLE_H_CVSID \
"$Id$"
namespace tfxx {
namespace ts {
/*! \brief Interface provided through handle.h
*
......@@ -51,7 +51,7 @@ namespace tfxx {
*/
/*@{*/
/** template #tfxx::THandle<class TObj>#:
/** template #ts::THandle<class TObj>#:
*
* THandle is a class template published by B. Stroustrup in Chapter 25.7 of
* "The C++ programming Language" (3rd edition). This is a slightly modified
......@@ -75,7 +75,7 @@ namespace tfxx {
* sense. You always have to provide another handle to copy from or an element
* to be handled.
*
* \sa tfxx::Handle
* \sa ts::Handle
*
* @author Bjarne Stroustrup,
* @author Thomas Forbriger
......@@ -93,7 +93,7 @@ class ConstHandle {
typedef const Tobject* Tpointer;
typedef const Tobject& Treference;
/** constructor #tfxx::THandle<class X>::THandle#:
/** constructor #ts::THandle<class X>::THandle#:
*
* This constructor is used in the following way:
*
......@@ -117,7 +117,7 @@ class ConstHandle {
ConstHandle(Tmutableobject* p):
Mrep(p), Mpcount(new int(1)) { }
/** constructor #tfxx::THandle<class X>::THandle#:
/** constructor #ts::THandle<class X>::THandle#:
*
* This constructor is used in the following way together with another
* #handle2# of type #THandle<X>#:
......@@ -129,24 +129,24 @@ class ConstHandle {
ConstHandle(const ConstHandle& h): Mrep(h.Mrep), Mpcount(h.Mpcount)
{ (*Mpcount)++; }
/** desctructor #tfxx::THandle<class X>::~THandle#
/** desctructor #ts::THandle<class X>::~THandle#
* @memo book-keeping destructor
*/
~ConstHandle() { if (--(*Mpcount)==0) { delete Mrep; delete Mpcount; } }
/** operator #tfxx::THandle<class X>::operator->()#
/** operator #ts::THandle<class X>::operator->()#
* @return returns pointer to object of type #class X#
* @memo dereferencing operator
*/
Tpointer operator->() const { return Mrep; }
/** operator #tfxx::THandle<class X>::operator*()#
/** operator #ts::THandle<class X>::operator*()#
* @return returns reference to object of type #class X#
* @memo dereferencing operator
*/
Treference operator*() const { return *Mrep; }
/** operator #tfxx::THandle<class X>::operator=()#
/** operator #ts::THandle<class X>::operator=()#
* @memo book-keeping asignment operator
*/
ConstHandle& operator=(const ConstHandle& h)
......@@ -186,7 +186,7 @@ class Handle: public ConstHandle<X> {
typedef Tobject* Tpointer;
typedef Tobject& Treference;
/** constructor #tfxx::THandle<class X>::THandle#:
/** constructor #ts::THandle<class X>::THandle#:
*
* This constructor is used in the following way:
*
......@@ -209,7 +209,7 @@ class Handle: public ConstHandle<X> {
*/
Handle(Tpointer p): Tbase(p) { }
/** constructor #tfxx::THandle<class X>::THandle#:
/** constructor #ts::THandle<class X>::THandle#:
*
* This constructor is used in the following way together with another
* #handle2# of type #THandle<X>#:
......@@ -220,19 +220,19 @@ class Handle: public ConstHandle<X> {
*/
Handle(const Handle& h): Tbase(h) { }
/** operator #tfxx::THandle<class X>::operator->()#
/** operator #ts::THandle<class X>::operator->()#
* @return returns pointer to object of type #class X#
* @memo dereferencing operator
*/
Tpointer operator->() const { return Tbase::pointer(); }
/** operator #tfxx::THandle<class X>::operator*()#
/** operator #ts::THandle<class X>::operator*()#
* @return returns reference to object of type #class X#
* @memo dereferencing operator
*/
Treference operator*() const { return Tbase::reference(); }
/** operator #tfxx::THandle<class X>::operator=()#
/** operator #ts::THandle<class X>::operator=()#
* @memo book-keeping asignment operator
*/
Handle& operator=(const Handle& h)
......@@ -244,7 +244,7 @@ class Handle: public ConstHandle<X> {
/*@}*/
} // namespace tfxx
} // namespace ts
#endif // TSXX_HANDLE_H_VERSION (includeguard)
......
......@@ -44,7 +44,7 @@
#define TSXX_RANGE_H_CVSID \
"$Id$"
namespace tfxx {
namespace ts {
/*! \brief A class to deal with numerical ranges
*
......@@ -146,7 +146,7 @@ template<class T=int>
Tvalue Mcurrent;
};// class RangeStepper
} // namespace tfxx
} // namespace ts
#endif // TSXX_RANGE_H_VERSION (includeguard)
......
......@@ -43,16 +43,16 @@
#define TSXX_RANGELIST_H_CVSID \
"$Id$"
#include<tfxx/range.h>
#include<tsxx/range.h>
#include<list>
namespace tfxx {
namespace ts {
template<class T>
class RangeList {
public:
typedef T Tvalue;
typedef tfxx::Range<Tvalue> Trange;
typedef ts::Range<Tvalue> Trange;
typedef std::list<Trange> Tlist;
RangeList() { }
RangeList& append(const Trange& r)
......@@ -135,7 +135,6 @@ namespace tfxx {
typename Tlist::const_iterator Miterator;
Trangestepper Mrangestepper;
}; // template class RangeListStepper
}
......
......@@ -47,7 +47,7 @@
#include<algorithm>
#include<tsxx/seifexx.h>
#include<tsxx/seifeclass.h>
#include<tfxx/misc.h>
#include<tsxx/debug.h>
namespace ts {
......@@ -144,12 +144,12 @@ namespace ts {
{
std::replace(s.begin(),s.end(),',',' ');
typedef ts::filter::Tfilterhandle Tfh;
TFXX_debug(debug, "make_seife_filter", "definition: " << s);
TSXX_debug(debug, "make_seife_filter", "definition: " << s);
Tfh fh(new ts::filter::Noop());
std::string ID;
std::istringstream is(s);
is >> ID;
TFXX_debug(debug, "make_seife_filter", "ID: " << ID);
TSXX_debug(debug, "make_seife_filter", "ID: " << ID);
ts::seife::Tvalue t0, t0s, h, hs;
int ni, o;
if (ID=="lpb") {
......@@ -184,7 +184,7 @@ namespace ts {
fh=Tfh(new LE2(t0s, hs, t0, h));
} else if (ID=="he2") {
is >> t0s >> hs >> t0 >> h;
TFXX_debug(debug, "make_seife_filter",
TSXX_debug(debug, "make_seife_filter",
"he2: "
<< "t0s=" << t0s
<< "hs=" << hs
......
......@@ -48,7 +48,7 @@
#include<tsxx/tsxx.h>
#include<datrwxx/datread.h>
#include<datrwxx/datwrite.h>
#include<tfxx/rangelist.h>
#include<tsxx/rangelist.h>
#include<sffostream.h>
#include<vector>
......@@ -148,7 +148,7 @@ namespace ts {
typedef TraceVector<C> Tbase;
typedef Tbase Ttracevector;
typedef typename Tbase::Ttimeseries Ttimeseries;
typedef tfxx::RangeList<int> Trangelist;
typedef ts::RangeList<int> Trangelist;
void read(datrw::idatstream& is,
const bool& verbose=false);
void read(datrw::idatstream& is,
......
......@@ -164,7 +164,7 @@ namespace ts {
* initialization. If you don't like this, call dont_report_on_construct().
*
* \ingroup group_error
* \sa TFXX_Xassert
* \sa TSXX_Xassert
*/
class Exception
{
......
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