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

provides full interface

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/trunk
SVN Revision: 1820
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent 8208856d
/*! \file anyfilter.cc
* \brief provide access to all filters (seife and other) (implementation)
*
* ----------------------------------------------------------------------------
*
* $Id: anyfilter.cc,v 1.1 2005-07-05 16:07:05 tforb Exp $
* \author Thomas Forbriger
* \date 05/07/2005
*
* provide access to all filters (seife and other) (implementation)
*
* Copyright (c) 2005 by Thomas Forbriger (BFO Schiltach)
*
* REVISIONS and CHANGES
* - 05/07/2005 V1.0 Thomas Forbriger
*
* ============================================================================
*/
#define TF_ANYFILTER_CC_VERSION \
"TF_ANYFILTER_CC V1.0 "
#define TF_ANYFILTER_CC_CVSID \
"$Id: anyfilter.cc,v 1.1 2005-07-05 16:07:05 tforb Exp $"
#include <sstream>
#include <tsxx/anyfilter.h>
#include <tsxx/filter.h>
#include <tsxx/seifeclass.h>
namespace ts {
namespace filter {
Tfilterhandle make_any_filter(const std::string& s)
{
typedef Tfilterhandle Tfh;
Tfh fh(new Noop());
bool hot=true;
//! try C++ filters
if (hot) {
hot=false;
try {
fh=make_filter(s);
}
catch (UnknownFilterException) {
hot=true;
}
catch (Exception e) {
e.report();
throw;
}
}
//! try seife filters
if (hot) {
hot=false;
try {
fh=make_seife_filter(s);
}
catch (UnknownFilterException) {
hot=true;
}
catch (Exception e) {
e.report();
throw;
}
}
if (hot) {
TSXX_UnknownFilterAbort("ts::filter::make_any_filter", s);
}
return(fh);
}
} // namespace filter
} // namespace ts
/* ----- END OF anyfilter.cc ----- */
/*! \file anyfilter.h
* \brief provide access to all filters (seife and other) (prototypes)
*
* ----------------------------------------------------------------------------
*
* $Id: anyfilter.h,v 1.1 2005-07-05 16:07:05 tforb Exp $
* \author Thomas Forbriger
* \date 05/07/2005
*
* provide access to all filters (seife and other) (prototypes)
*
* Copyright (c) 2005 by Thomas Forbriger (BFO Schiltach)
*
* REVISIONS and CHANGES
* - 05/07/2005 V1.0 Thomas Forbriger
*
* ============================================================================
*/
// include guard
#ifndef TF_ANYFILTER_H_VERSION
#define TF_ANYFILTER_H_VERSION \
"TF_ANYFILTER_H V1.0 "
#define TF_ANYFILTER_H_CVSID \
"$Id: anyfilter.h,v 1.1 2005-07-05 16:07:05 tforb Exp $"
#include<string>
#include<tsxx/filterbase.h>
namespace ts {
namespace filter {
//! combine all filters (seife and others)
Tfilterhandle make_any_filter(const std::string& s);
} // namespace filter
} // namespace ts
#endif // TF_ANYFILTER_H_VERSION (includeguard)
/* ----- END OF anyfilter.h ----- */
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