15 #include "generalmod.h" 37 : data_(0), interp_(0), nrcomp_(0) {}
39 : data_(0), interp_(0), nrcomp_(0) { copyFrom(td);}
45 { copyFrom( td );
return *
this; }
46 void copyFrom(
const TraceData&);
48 void copyFrom(
const TraceData&,
int comp_from,
int comp_to);
50 void convertToFPs(
bool preserve_data=
true);
54 inline int size(
int icomp=0 )
const 55 {
return icomp >= nrcomp_ ? 0 : data_[icomp]->size(); }
57 {
return icomp >= nrcomp_ ? 1
58 : data_[icomp]->bytesPerSample(); }
59 inline bool isZero(
int icomp=0 )
const 60 {
return icomp >= nrcomp_ || data_[icomp]->isZero(); }
62 bool isValidComp(
int icomp=0)
const;
63 float getValue(
int isamp,
int icomp=0)
const;
64 void setValue(
int isamp,
float,
int icomp=0);
67 {
return data_[icomp]; }
69 {
return data_[icomp]; }
71 {
return interp_[icomp]; }
73 {
return interp_[icomp]; }
76 bool cleardata=
false);
77 void delComponent(
int);
80 void reSize(
int,
int icomp=-1,
bool copydata=
false);
84 void zero(
int icomp=-1);
87 void handleDataSwapping();
#define mExpClass(module)
Definition: commondefs.h:160
const TraceDataInterpreter * getInterpreter(int icomp=0) const
Definition: tracedata.h:72
TraceData & operator=(const TraceData &td)
Definition: tracedata.h:44
DataBuffer * getComponent(int icomp=0)
Definition: tracedata.h:66
DataBuffer ** data_
pre-swaps all buffers that need it
Definition: tracedata.h:94
int nrComponents() const
Definition: tracedata.h:52
int size(int icomp=0) const
Definition: tracedata.h:54
TraceData()
Definition: tracedata.h:36
const DataBuffer * getComponent(int icomp=0) const
Definition: tracedata.h:68
bool isZero(int icomp=0) const
Definition: tracedata.h:59
int nrcomp_
Definition: tracedata.h:96
DataInterpreter< float > TraceDataInterpreter
Definition: tracedata.h:19
byte-level data characteristics of stored data.
Definition: datachar.h:37
Scaling of floating point numbers.
Definition: scaler.h:33
TraceDataInterpreter ** interp_
Definition: tracedata.h:95
Raw data array with memory management.
Definition: databuf.h:22
TraceDataInterpreter * getInterpreter(int icomp=0)
Definition: tracedata.h:70
int bytesPerSample(int icomp=0) const
Definition: tracedata.h:56
TraceData(const TraceData &td)
Definition: tracedata.h:38
A set of data buffers and their interpreters.
Definition: tracedata.h:32
bool isEmpty(const NLAModel *mdl)
virtual double scale(double) const =0