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

proceeding

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: 2214
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent dfa0fa85
......@@ -4,7 +4,7 @@
*
* ----------------------------------------------------------------------------
*
* $Id: readtsdata.h,v 1.2 2007-02-05 14:08:03 tforb Exp $
* $Id: readtsdata.h,v 1.3 2007-02-09 08:50:21 tforb Exp $
* \author Thomas Forbriger
* \date 31/01/2007
*
......@@ -41,11 +41,63 @@
#define TF_READTSDATA_H_VERSION \
"TF_READTSDATA_H V1.0 "
#define TF_READTSDATA_H_CVSID \
"$Id: readtsdata.h,v 1.2 2007-02-05 14:08:03 tforb Exp $"
"$Id: readtsdata.h,v 1.3 2007-02-09 08:50:21 tforb Exp $"
namespace tf {
/*! \defgroup group_readtsdata Reading of time series data.
* \brief Read a complete set of time series including the selection of
* traces.
*
* The module is presented in namespace tfxx::tsio.
*
*/
/*! \brief Interface provided through readtsdata.h
*
* \defgroup readtsdata_h Interface provided through readtsdata.h
*
* \ingroup group_readtsdata
*/
namespace tfxx {
/*! \namespace tfxx::tsio
* \brief Namespace containing all components of module readtsdata.
* \ingroup group_readtsdata, readtsdata_h
*/
namespace tsio {
//! type of trace selection list
typedef tfxx::RangeList<int> Ttracelist;
//! type of trace selection key
typedef const char[] Ttracelistkey;
//! structure to contain file data together with command line arguments
struct File {
// command line arguments
tfxx::cmdline::Filename arguments;
// container to hold samples
ts::sff::File<C> data;
}; // struct File
//! read complete SFF file
readSFF(const std::string& filename);
//! read complete SFF file with trace selection
readSFF(const std::string& filename,
const Ttracelist& selection);
//! read complete SFF file with trace selection
readSFF(const tfxx::cmdline::Filename& filename,
const Tracelistkey="t");
//! read complete list of SFF files with trace selection
readSFF(const tfxx::cmdline::Tparsed& flist,
const Tracelistkey="t");
} // namespace tsio
}
} // namespace tfxx
#endif // TF_READTSDATA_H_VERSION (includeguard)
......
......@@ -3,7 +3,7 @@
*
* ----------------------------------------------------------------------------
*
* $Id: stuploxx.cc,v 1.1 2007-01-31 07:41:36 tforb Exp $
* $Id: stuploxx.cc,v 1.2 2007-02-09 08:50:21 tforb Exp $
* \author Thomas Forbriger
* \date 30/01/2007
*
......@@ -19,15 +19,17 @@
#define STUPLOXX_VERSION \
"STUPLOXX V1.0 Plot SFF waveform data"
#define STUPLOXX_CVSID \
"$Id: stuploxx.cc,v 1.1 2007-01-31 07:41:36 tforb Exp $"
"$Id: stuploxx.cc,v 1.2 2007-02-09 08:50:21 tforb Exp $"
#include <iostream>
#include <tfxx/commandline.h>
#include <tfxx/xcmdline.h>
using std::cout;
using std::cerr;
using std::endl;
// struct to store command line options and arguments
struct Options {
// control verbosity
bool verbose, debug;
......@@ -39,14 +41,17 @@ struct Options {
int main(int iargc, char* argv[])
{
// key to select traces
static const char tracekey[]="t";
// list of keys for filename specific parameters
static const char* keys[]={"t", 0};
static const char* keys[]={tracekey, 0};
// define usage information
char usage_text[]=
{
STUPLOXX_VERSION "\n"
"usage: stuploxx [-v] [-D] file [file...]" "\n"
"usage: stuploxx [-v] [-D] file [t:n] [file [t:n]...]" "\n"
" or: stuploxx --help|-h" "\n"
};
......@@ -58,6 +63,7 @@ int main(int iargc, char* argv[])
"-v be verbose" "\n"
"-D debug mode" "\n"
"file SFF waveform data file name" "\n"
"t:n can be used to select traces from file" "\n"
};
// define commandline options
......@@ -68,9 +74,21 @@ int main(int iargc, char* argv[])
{"help",arg_no,"-"},
// 1: verbose mode
{"v",arg_no,"-"},
// 2: debug mode
{"D",arg_no,"-"},
{NULL}
};
// key to select traces
static const char tracekey[]="t";
// list of keys for filename specific parameters
static const char* keys[]={
// select traces
tracekey,
0
};
// no arguments? print usage...
if (iargc<2)
{
......@@ -89,7 +107,12 @@ int main(int iargc, char* argv[])
exit(0);
}
Options opt;
opt.verbose=cmdline.optset(1);
opt.debug=cmdline.optset(2);
// dummy operation: print option settings
/*
for (int iopt=0; iopt<2; iopt++)
{
cout << "option: '" << options[iopt].opt_string << "'" << endl;
......@@ -110,6 +133,12 @@ int main(int iargc, char* argv[])
// dummy operation: print rest of command line
while (cmdline.extra()) { cout << cmdline.next() << endl; }
}
*/
TFXX_assert(cmdline.extra(), "missing input file");
tfxx::cmdline::Tparsed
filenames=tfxx::cmdline::parse_cmdline(cmdline, keys, verbose);
/* ----- END OF stuploxx.cc ----- */
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