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

first SFF write works well

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: 2988
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent 10f035a6
......@@ -3,7 +3,7 @@
*
* ----------------------------------------------------------------------------
*
* $Id: datwrite.h,v 1.8 2010-02-20 22:05:29 tforb Exp $
* $Id: datwrite.h,v 1.9 2010-02-21 20:09:10 tforb Exp $
* \author Thomas Forbriger
* \date 11/04/2006
*
......@@ -40,7 +40,7 @@
#define DATWRITE_DATWRITE_H_VERSION \
"TF_DATWRITE_H V1.0 "
#define DATWRITE_DATWRITE_H_CVSID \
"$Id: datwrite.h,v 1.8 2010-02-20 22:05:29 tforb Exp $"
"$Id: datwrite.h,v 1.9 2010-02-21 20:09:10 tforb Exp $"
#include<iostream>
#include<aff/series.h>
......@@ -107,7 +107,7 @@ namespace datwrite {
//! write integer data
virtual void writetrace(const Tiseries& series) { DATWRITE_illegal; }
//! actually write the file header
virtual void writefileheader();
virtual void writefileheader() { DATWRITE_illegal; }
//! clear trace header flags
void cleartraceheader();
......
......@@ -3,7 +3,7 @@
*
* ----------------------------------------------------------------------------
*
* $Id: sff.h,v 1.8 2010-02-21 15:02:59 tforb Exp $
* $Id: sff.h,v 1.9 2010-02-21 20:09:10 tforb Exp $
* \author Thomas Forbriger
* \date 11/04/2006
*
......@@ -40,12 +40,11 @@
#define DATWRITE_SFF_H_VERSION \
"TF_SFF_H V1.0 "
#define DATWRITE_SFF_H_CVSID \
"$Id: sff.h,v 1.8 2010-02-21 15:02:59 tforb Exp $"
"$Id: sff.h,v 1.9 2010-02-21 20:09:10 tforb Exp $"
#include<datwritexx/datwrite.h>
#include<datwritexx/reservoir.h>
#include<sffxx.h>
#include<sffostream.h>
namespace datwrite {
......@@ -58,11 +57,11 @@ namespace datwrite {
*
* \ingroup sff
*/
class osffstream: public ::datwrite::odatstream {
class osffstream: public odatstream {
public:
typedef odatstream Tbase;
osffstream(std::ostream& os, const bool& debug=false);
virtual ~osffstream()
inline virtual ~osffstream()
{ this->flushwaitingtrace(true); }
static void help(std::ostream& os=std::cout);
protected:
......
......@@ -3,7 +3,7 @@
*
* ----------------------------------------------------------------------------
*
* $Id: writetest.cc,v 1.1 2010-02-21 14:54:42 tforb Exp $
* $Id: writetest.cc,v 1.2 2010-02-21 20:09:10 tforb Exp $
* \author Thomas Forbriger
* \date 20/02/2010
*
......@@ -36,7 +36,7 @@
#define WRITETEST_VERSION \
"WRITETEST V1.0 test writing a file"
#define WRITETEST_CVSID \
"$Id: writetest.cc,v 1.1 2010-02-21 14:54:42 tforb Exp $"
"$Id: writetest.cc,v 1.2 2010-02-21 20:09:10 tforb Exp $"
#include <iostream>
#include <fstream>
......@@ -145,6 +145,20 @@ int main(int iargc, char* argv[])
{ cout << "SFF test: write to file " << opt.sfffilename << endl; }
std::ofstream ofs(opt.sfffilename.c_str());
datwrite::osffstream os(ofs, opt.debug);
sff::FREE free;
free.append("my comment");
os << free;
{
datwrite::Tiseries s(10);
for (int i=s.f(); i<=s.l(); ++i)
{
s(i)=i;
}
sff::WID2 wid2;
wid2.dt=10;
os << wid2;
os << s;
}
}
}
......
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