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

collect copies not references; adjust number of samples after reading;

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.
added comments


SVN Path:     http://gpitrsvn.gpi.uni-karlsruhe.de/repos/TFSoftware/trunk
SVN Revision: 4648
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent 25429874
......@@ -297,6 +297,9 @@ namespace datrw {
namespace {
/*! read a sequence of samples
* \ingroup ascii
*
* Read a sequence of samples being regarded as a contiguous trace.
*
* \param T type of sample value (double, float, int)
*
......@@ -332,7 +335,7 @@ namespace datrw {
{
if (i==bufsize)
{
vecofrecorddata.push_back(buffer);
vecofrecorddata.push_back(buffer.copyout());
buffer=0;
i=0;
}
......@@ -385,6 +388,11 @@ namespace datrw {
/*----------------------------------------------------------------------*/
/*! read a sequence of samples
* \ingroup ascii
*
* Read a sequence of samples being regarded as a contiguous trace.
* This function essential performs the correct type conversion after
* reading the data with function readsamples().
*
* \param T type of sample value (double, float, int)
*
......@@ -441,13 +449,14 @@ namespace datrw {
Tdseries iasciistream::dseries()
{
Tdseries retval;
this->settraceheader();
this->Mcurrentline=ascii::readany(this->Mis,
this->Mcurrentwid2.nsamples,
this->Mcurrentline,
retval,
this->Mdatatype,
this->Mnonfatal);
this->Mcurrentwid2.nsamples=retval.size();
this->settraceheader();
this->readheader();
if (!this->Mis.good()) { this->setlast(); }
return(retval);
......@@ -458,13 +467,14 @@ namespace datrw {
Tfseries iasciistream::fseries()
{
Tfseries retval;
this->settraceheader();
this->Mcurrentline=ascii::readany(this->Mis,
this->Mcurrentwid2.nsamples,
this->Mcurrentline,
retval,
this->Mdatatype,
this->Mnonfatal);
this->Mcurrentwid2.nsamples=retval.size();
this->settraceheader();
this->readheader();
if (!this->Mis.good()) { this->setlast(); }
return(retval);
......@@ -475,13 +485,14 @@ namespace datrw {
Tiseries iasciistream::iseries()
{
Tiseries retval;
this->settraceheader();
this->Mcurrentline=ascii::readany(this->Mis,
this->Mcurrentwid2.nsamples,
this->Mcurrentline,
retval,
this->Mdatatype,
this->Mnonfatal);
this->Mcurrentwid2.nsamples=retval.size();
this->settraceheader();
this->readheader();
if (!this->Mis.good()) { this->setlast(); }
return(retval);
......@@ -520,6 +531,11 @@ namespace datrw {
namespace {
/*!
* \ingroup ascii
* \todo
* replace with formatmodifiers::ModifierHelp
*/
void explainmodifier(std::ostream& os,
const char* const key,
const char* const message)
......@@ -533,6 +549,11 @@ namespace datrw {
/*----------------------------------------------------------------------*/
/*!
* \ingroup ascii
* \todo
* replace with formatmodifiers::ModifierHelp
*/
void explainmodifierflag(std::ostream& os,
const char* const key,
const char* const message)
......
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