Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

TxLinePlotData Class Reference

Class that holds data (in a GUI-accessible format) for a line plot. More...

#include <TxLinePlotData.h>

Inheritance diagram for TxLinePlotData::

TxPlotData TxAttributeSet TestLinePlotData TxLinePlotDataAux List of all members.

Public Methods

 TxLinePlotData ()
 default constructor. More...

virtual ~TxLinePlotData ()
 virtual destructor. More...

virtual void initialCalculation ()
 Initialize required data members or calculations. More...

virtual void printInitialCalculation ()
 Print out the results of an initial calculation. More...

virtual TXSTD::string getClassID () const
 Get class identifier for run-time identification. More...

virtual void restart ()
 clean up object and begin again, but do not reset numRows. More...

virtual void paramsChanged ()
 Hook called after parameters in hash table have changed. More...

virtual void optionsChanged ()
 Hook called after options in hash table have changed. More...

virtual void stringsChanged ()
 Hook called after strings in hash table have changed. More...

int getNumValuesCalculated () const
 get number of data points ( = number of columns). More...

int getNumSeries ()
 get total number of data series (both vertical and horizontal) from all plots. More...

int getNumSeries (int i)
 get number of data series (both vertical and horizontal) that appear in i'th plot. More...

int getMaxNumSeries ()
 get the maximum number of allowed data series ( = maximum number of rows). More...

const double* getDataRow (int i)
 get a pointer to the data in the i'th row. More...

const double* getXSeries (int ipl, int iseries)
 get a pointer to the horizontal data series corresponding to the specified data series of the specified plot. More...

const double* getYSeries (int ipl, int iseries)
 get a pointer to the vertical data series corresponding to the specified data series of the specified plot. More...

const double* getXSeries (int ipl, int iseries, int istart)
 get a pointer to the horizontal data series corresponding to the specified data series of the specified plot, beginning with the data point istart. More...

const double* getYSeries (int ipl, int iseries, int istart)
 get a pointer to the vertical data series corresponding to the specified data series of the specified plot, beginning with the data point istart. More...

int clearPlots ()
 clearPlot will clear the txlpd vector. More...

int isConnected () const
 get flag: if 0: disconnected (puncture plot), 1: connected. More...

virtual int getNumPlots () const
 get the number of plots. More...

virtual const TXSTD::string getTitle (int i) const
 get the title of the i'th plot. More...

virtual const TXSTD::string getXLabel (int i) const
 get the horizontal axis label of the i'th plot. More...

virtual double getXMin (int i) const
 get the value of the horizontal minimum for the data of the i'th plot. More...

virtual double getXMinPlot (int i) const
 get the value of the horizontal minimum for the i'th plot. More...

virtual double getXMax (int i) const
 get the value of the horizontal maximum for the data of the i'th plot. More...

virtual double getXMaxPlot (int i) const
 get the value of the horizontal maximum for the i'th plot. More...

virtual const TXSTD::string getYLabel (int i) const
 get the vertical axis label of the i'th plot. More...

virtual double getYMin (int i) const
 get the value of the vertical minimum for the data of the i'th plot. More...

virtual double getYMinPlot (int i) const
 get the value of the vertical minimum for the i'th plot. More...

virtual double getYMax (int i) const
 get the value of the vertical maximum for the data of the i'th plot. More...

virtual double getYMaxPlot (int i) const
 get the value of the vertical maximum for the i'th plot. More...

int appendPlotDesc (const TXSTD::string &, const TXSTD::string &, const TXSTD::string &, int, int)
 Define a new plot and append it to the list of plot descriptions. More...

void appendSeriesToPlot (int, int, int)
 Append a new data series to the plot. More...

void setXMin (int i, double d)
 set x-min for data in i'th plot to the specified value. More...

void setXMinPlot (int i, double d)
 set x-min for i'th plot to the specified value. More...

void setXMinAuto (int i, int a)
 set flag xMinAuto for the i'th plot description. More...

void setXMinNice (int i, int a)
 set flag xMinAuto for the i'th plot description. More...

void setXMax (int i, double d)
 set x-max for data in i'th plot to the specified value. More...

void setXMaxPlot (int i, double d)
 set x-max for i'th plot to the specified value. More...

void setXMaxAuto (int i, int a)
 set flag xMaxAuto for the i'th plot description. More...

void setXMaxNice (int i, int a)
 set flag xMaxAuto for the i'th plot description. More...

void setYMin (int i, double d)
 set y-min for data in i'th plot to the specified value. More...

void setYMinPlot (int i, double d)
 set y-min for i'th plot to the specified value. More...

void setYMinAuto (int i, int a)
 set flag yMinAuto for the i'th plot description. More...

void setYMinNice (int i, int a)
 set flag yMinAuto for the i'th plot description. More...

void setYMax (int i, double d)
 set y-max for data in i'th plot to the specified value. More...

void setYMaxPlot (int i, double d)
 set y-max for i'th plot to the specified value. More...

void setYMaxAuto (int i, int a)
 set flag yMaxAuto for the i'th plot description. More...

void setYMaxNice (int i, int a)
 set flag yMaxAuto for the i'th plot description. More...

void disconnect ()
 Make plot disconnected. More...

virtual void calcLims ()
 Calculate the plot minima and maxima from the data for each plot, assuming the flags xMinAuto, xMaxAuto, yMinAuto, yMaxAuto have been turned on for the various plots. More...

void setOutThroughStream (TxThroughStream &t)
 Set the TxThroughStream for cout. More...

void setErrThroughStream (TxThroughStream &t)
 Set the error TxThroughStream. More...

virtual TxThroughStreamgetOutThroughStream () const
 Get the output TxThroughStream. More...

virtual TxThroughStreamgetErrThroughStream () const
 Get the err TxThroughStream. More...


Protected Methods

int appendSeries (const TXSTD::string &)
 append a new data series with the specified name. More...

void setNumValuesCalculated (int i)
 set the number of calculated data points ( = number of columns to be used). More...

void setMaxDataPoints (int i)
 set the maximum number of allowed data points per series. More...

void setMaxNumSeries (int i)
 set the number of data series ( = number of rows to be used). More...

void appendValues (double *d)
 adds a new column of values (appends the next data point). More...


Protected Attributes

TxThroughStreamtxcout
TxThroughStreamtxcerr
bool outThruStrmOwner
bool errThruStrmOwner
int iconnect
 int flag to indicate if the plot should be connected by lines or not. More...


Private Methods

 TxLinePlotData (const TxPlotData &)
 Prevent use of the copy constructor. More...

const TxLinePlotData& operator= (const TxPlotData &)
 Prevent use of the assignment operator. More...

virtual void updateLims (int)
 use specified number of most recent data points to recalculate xmin, xmax, ymin & ymax for the data in every plot. More...

virtual void calcLims (int i)
 calculate the minima & maxima for the data of the i'th plot. More...


Private Attributes

TXSTD::vector<TXSTD::string> dataName
 The names of the data arrays for plotting. More...

TXSTD::vector<TxLinePlotDesctxlpd
 list of objects with relevant "description" for each plot (labels, colors, etc.). More...


Detailed Description

Class that holds data (in a GUI-accessible format) for a line plot.

The data in this class is composed of several rows of data. In addition, plots are specified.

The basic structure provides a mechanism for holding data, adding to that data, enlarging the memory holding that data, etc.

Because TxLinePlotData is intended to work in a nonthreaded GUI environment, the derived classes should arrange to calculate and insert part of the data each time there is a call to moreData().

Copyright 1996, 1997, 1998 by Tech-X Corporation

Author:
John R. Cary

Version:
Id:
TxLinePlotData.h,v 1.4 2002/04/05 21:53:55 kgl Exp

Definition at line 46 of file TxLinePlotData.h.


Constructor & Destructor Documentation

TxLinePlotData::TxLinePlotData ( )
 

default constructor.

TxLinePlotData::~TxLinePlotData ( ) [virtual]
 

virtual destructor.

TxLinePlotData::TxLinePlotData ( const TxPlotData & ) [private]
 

Prevent use of the copy constructor.


Member Function Documentation

int TxLinePlotData::appendPlotDesc ( const TXSTD::string &,
const TXSTD::string &,
const TXSTD::string &,
int,
int )
 

Define a new plot and append it to the list of plot descriptions.

Specify the following (in order): x-axis label, y-axis label, title, integer to get the x data series, integer to get the y data series. Returns an integer which can be used to get this new plot description.

int TxLinePlotData::appendSeries ( const TXSTD::string & ) [protected]
 

append a new data series with the specified name.

void TxLinePlotData::appendSeriesToPlot ( int,
int,
int )
 

Append a new data series to the plot.

Specify (in order) integer for accessing the plot, integer to get x data, integer to get y data.

void TxLinePlotData::appendValues ( double * d ) [protected]
 

adds a new column of values (appends the next data point).

void TxLinePlotData::calcLims ( int i ) [inline, private, virtual]
 

calculate the minima & maxima for the data of the i'th plot.

Definition at line 379 of file TxLinePlotData.h.

void TxLinePlotData::calcLims ( ) [inline, virtual]
 

Calculate the plot minima and maxima from the data for each plot, assuming the flags xMinAuto, xMaxAuto, yMinAuto, yMaxAuto have been turned on for the various plots.

Reimplemented from TxPlotData.

Definition at line 283 of file TxLinePlotData.h.

int TxLinePlotData::clearPlots ( ) [inline]
 

clearPlot will clear the txlpd vector.

Definition at line 142 of file TxLinePlotData.h.

void TxLinePlotData::disconnect ( ) [inline]
 

Make plot disconnected.

Definition at line 276 of file TxLinePlotData.h.

TXSTD::string TxLinePlotData::getClassID ( ) const [inline, virtual]
 

Get class identifier for run-time identification.

Reimplemented from TxPlotData.

Reimplemented in TestLinePlotData, and TxLinePlotDataAux.

Definition at line 74 of file TxLinePlotData.h.

const double * TxLinePlotData::getDataRow ( int i ) [inline]
 

get a pointer to the data in the i'th row.

Definition at line 107 of file TxLinePlotData.h.

Referenced by getXSeries(), and getYSeries().

TxThroughStream * TxLinePlotData::getErrThroughStream ( ) const [inline, virtual]
 

Get the err TxThroughStream.

Returns:
the err stream of this object

Definition at line 322 of file TxLinePlotData.h.

int TxLinePlotData::getMaxNumSeries ( ) [inline]
 

get the maximum number of allowed data series ( = maximum number of rows).

Definition at line 104 of file TxLinePlotData.h.

int TxLinePlotData::getNumPlots ( ) const [inline, virtual]
 

get the number of plots.

Reimplemented from TxPlotData.

Definition at line 154 of file TxLinePlotData.h.

int TxLinePlotData::getNumSeries ( int i ) [inline]
 

get number of data series (both vertical and horizontal) that appear in i'th plot.

Definition at line 101 of file TxLinePlotData.h.

int TxLinePlotData::getNumSeries ( ) [inline]
 

get total number of data series (both vertical and horizontal) from all plots.

Definition at line 98 of file TxLinePlotData.h.

int TxLinePlotData::getNumValuesCalculated ( ) const [inline]
 

get number of data points ( = number of columns).

Definition at line 95 of file TxLinePlotData.h.

TxThroughStream * TxLinePlotData::getOutThroughStream ( ) const [inline, virtual]
 

Get the output TxThroughStream.

Returns:
the out stream of this object

Definition at line 315 of file TxLinePlotData.h.

const TXSTD::string TxLinePlotData::getTitle ( int i ) const [inline, virtual]
 

get the title of the i'th plot.

Reimplemented from TxPlotData.

Definition at line 157 of file TxLinePlotData.h.

const TXSTD::string TxLinePlotData::getXLabel ( int i ) const [inline, virtual]
 

get the horizontal axis label of the i'th plot.

Reimplemented from TxPlotData.

Definition at line 160 of file TxLinePlotData.h.

double TxLinePlotData::getXMax ( int i ) const [inline, virtual]
 

get the value of the horizontal maximum for the data of the i'th plot.

Reimplemented from TxPlotData.

Definition at line 169 of file TxLinePlotData.h.

double TxLinePlotData::getXMaxPlot ( int i ) const [inline, virtual]
 

get the value of the horizontal maximum for the i'th plot.

Reimplemented from TxPlotData.

Definition at line 172 of file TxLinePlotData.h.

double TxLinePlotData::getXMin ( int i ) const [inline, virtual]
 

get the value of the horizontal minimum for the data of the i'th plot.

Reimplemented from TxPlotData.

Definition at line 163 of file TxLinePlotData.h.

double TxLinePlotData::getXMinPlot ( int i ) const [inline, virtual]
 

get the value of the horizontal minimum for the i'th plot.

Reimplemented from TxPlotData.

Definition at line 166 of file TxLinePlotData.h.

const double * TxLinePlotData::getXSeries ( int ipl,
int iseries,
int istart ) [inline]
 

get a pointer to the horizontal data series corresponding to the specified data series of the specified plot, beginning with the data point istart.

Definition at line 128 of file TxLinePlotData.h.

const double * TxLinePlotData::getXSeries ( int ipl,
int iseries ) [inline]
 

get a pointer to the horizontal data series corresponding to the specified data series of the specified plot.

Definition at line 113 of file TxLinePlotData.h.

const TXSTD::string TxLinePlotData::getYLabel ( int i ) const [inline, virtual]
 

get the vertical axis label of the i'th plot.

Reimplemented from TxPlotData.

Definition at line 175 of file TxLinePlotData.h.

double TxLinePlotData::getYMax ( int i ) const [inline, virtual]
 

get the value of the vertical maximum for the data of the i'th plot.

Reimplemented from TxPlotData.

Definition at line 184 of file TxLinePlotData.h.

double TxLinePlotData::getYMaxPlot ( int i ) const [inline, virtual]
 

get the value of the vertical maximum for the i'th plot.

Reimplemented from TxPlotData.

Definition at line 187 of file TxLinePlotData.h.

double TxLinePlotData::getYMin ( int i ) const [inline, virtual]
 

get the value of the vertical minimum for the data of the i'th plot.

Reimplemented from TxPlotData.

Definition at line 178 of file TxLinePlotData.h.

double TxLinePlotData::getYMinPlot ( int i ) const [inline, virtual]
 

get the value of the vertical minimum for the i'th plot.

Reimplemented from TxPlotData.

Definition at line 181 of file TxLinePlotData.h.

const double * TxLinePlotData::getYSeries ( int ipl,
int iseries,
int istart ) [inline]
 

get a pointer to the vertical data series corresponding to the specified data series of the specified plot, beginning with the data point istart.

Definition at line 135 of file TxLinePlotData.h.

const double * TxLinePlotData::getYSeries ( int ipl,
int iseries ) [inline]
 

get a pointer to the vertical data series corresponding to the specified data series of the specified plot.

Definition at line 121 of file TxLinePlotData.h.

void TxLinePlotData::initialCalculation ( ) [inline, virtual]
 

Initialize required data members or calculations.

This method is not implemented in the base class and is not required for derived classes. Its primary purpose is to be used for an initial calculation(s) that may take some time, and thus could be performed in a thread.

Definition at line 63 of file TxLinePlotData.h.

int TxLinePlotData::isConnected ( ) const [inline]
 

get flag: if 0: disconnected (puncture plot), 1: connected.

Definition at line 151 of file TxLinePlotData.h.

const TxLinePlotData & TxLinePlotData::operator= ( const TxPlotData & ) [private]
 

Prevent use of the assignment operator.

Reimplemented from TxPlotData.

void TxLinePlotData::optionsChanged ( ) [virtual]
 

Hook called after options in hash table have changed.

Reimplemented from TxPlotData.

Reimplemented in TxLinePlotDataAux.

Referenced by TxLinePlotDataAux::optionsChanged().

void TxLinePlotData::paramsChanged ( ) [virtual]
 

Hook called after parameters in hash table have changed.

Reimplemented from TxPlotData.

Reimplemented in TxLinePlotDataAux.

Referenced by TxLinePlotDataAux::paramsChanged().

void TxLinePlotData::printInitialCalculation ( ) [inline, virtual]
 

Print out the results of an initial calculation.

This is not implemented in this base class and is not required for derived classes. It may be used to print out initial calculation(s), which may need to be printed outside of a thread.

Definition at line 71 of file TxLinePlotData.h.

void TxLinePlotData::restart ( ) [virtual]
 

clean up object and begin again, but do not reset numRows.

Reimplemented from TxPlotData.

void TxLinePlotData::setErrThroughStream ( TxThroughStream & t ) [inline]
 

Set the error TxThroughStream.

Parameters:
t   the new error TxThroughStream

Definition at line 304 of file TxLinePlotData.h.

void TxLinePlotData::setMaxDataPoints ( int i ) [inline, protected]
 

set the maximum number of allowed data points per series.

Definition at line 353 of file TxLinePlotData.h.

void TxLinePlotData::setMaxNumSeries ( int i ) [inline, protected]
 

set the number of data series ( = number of rows to be used).

Definition at line 356 of file TxLinePlotData.h.

void TxLinePlotData::setNumValuesCalculated ( int i ) [inline, protected]
 

set the number of calculated data points ( = number of columns to be used).

Definition at line 350 of file TxLinePlotData.h.

void TxLinePlotData::setOutThroughStream ( TxThroughStream & t ) [inline]
 

Set the TxThroughStream for cout.

Parameters:
t   the new stdout ThroughStream

Definition at line 293 of file TxLinePlotData.h.

void TxLinePlotData::setXMax ( int i,
double d ) [inline]
 

set x-max for data in i'th plot to the specified value.

Definition at line 222 of file TxLinePlotData.h.

void TxLinePlotData::setXMaxAuto ( int i,
int a ) [inline]
 

set flag xMaxAuto for the i'th plot description.

(This method is identical to setXMaxNice.)

Definition at line 231 of file TxLinePlotData.h.

void TxLinePlotData::setXMaxNice ( int i,
int a ) [inline]
 

set flag xMaxAuto for the i'th plot description.

(This method is identical to setXMaxAuto.)

Definition at line 237 of file TxLinePlotData.h.

void TxLinePlotData::setXMaxPlot ( int i,
double d ) [inline]
 

set x-max for i'th plot to the specified value.

Definition at line 225 of file TxLinePlotData.h.

void TxLinePlotData::setXMin ( int i,
double d ) [inline]
 

set x-min for data in i'th plot to the specified value.

Definition at line 204 of file TxLinePlotData.h.

void TxLinePlotData::setXMinAuto ( int i,
int a ) [inline]
 

set flag xMinAuto for the i'th plot description.

(This method is identical to setXMinNice.)

Definition at line 213 of file TxLinePlotData.h.

void TxLinePlotData::setXMinNice ( int i,
int a ) [inline]
 

set flag xMinAuto for the i'th plot description.

(This method is identical to setXMinAuto.)

Definition at line 219 of file TxLinePlotData.h.

void TxLinePlotData::setXMinPlot ( int i,
double d ) [inline]
 

set x-min for i'th plot to the specified value.

Definition at line 207 of file TxLinePlotData.h.

void TxLinePlotData::setYMax ( int i,
double d ) [inline]
 

set y-max for data in i'th plot to the specified value.

Definition at line 258 of file TxLinePlotData.h.

void TxLinePlotData::setYMaxAuto ( int i,
int a ) [inline]
 

set flag yMaxAuto for the i'th plot description.

(This method is identical to setYMaxNice.)

Definition at line 267 of file TxLinePlotData.h.

void TxLinePlotData::setYMaxNice ( int i,
int a ) [inline]
 

set flag yMaxAuto for the i'th plot description.

(This method is identical to setYMaxAuto.)

Definition at line 273 of file TxLinePlotData.h.

void TxLinePlotData::setYMaxPlot ( int i,
double d ) [inline]
 

set y-max for i'th plot to the specified value.

Definition at line 261 of file TxLinePlotData.h.

void TxLinePlotData::setYMin ( int i,
double d ) [inline]
 

set y-min for data in i'th plot to the specified value.

Definition at line 240 of file TxLinePlotData.h.

void TxLinePlotData::setYMinAuto ( int i,
int a ) [inline]
 

set flag yMinAuto for the i'th plot description.

(This method is identical to setYMinNice.)

Definition at line 249 of file TxLinePlotData.h.

void TxLinePlotData::setYMinNice ( int i,
int a ) [inline]
 

set flag yMinAuto for the i'th plot description.

(This method is identical to setYMinAuto.)

Definition at line 255 of file TxLinePlotData.h.

void TxLinePlotData::setYMinPlot ( int i,
double d ) [inline]
 

set y-min for i'th plot to the specified value.

Definition at line 243 of file TxLinePlotData.h.

void TxLinePlotData::stringsChanged ( ) [virtual]
 

Hook called after strings in hash table have changed.

Reimplemented from TxPlotData.

Reimplemented in TxLinePlotDataAux.

Referenced by TxLinePlotDataAux::stringsChanged().

void TxLinePlotData::updateLims ( int ) [private, virtual]
 

use specified number of most recent data points to recalculate xmin, xmax, ymin & ymax for the data in every plot.


Member Data Documentation

TXSTD::vector< TXSTD::string > TxLinePlotData::dataName [private]
 

The names of the data arrays for plotting.

Definition at line 382 of file TxLinePlotData.h.

bool TxLinePlotData::errThruStrmOwner [protected]
 

Definition at line 344 of file TxLinePlotData.h.

int TxLinePlotData::iconnect [protected]
 

int flag to indicate if the plot should be connected by lines or not.

Definition at line 362 of file TxLinePlotData.h.

bool TxLinePlotData::outThruStrmOwner [protected]
 

Definition at line 339 of file TxLinePlotData.h.

TxThroughStream * TxLinePlotData::txcerr [protected]
 

Definition at line 334 of file TxLinePlotData.h.

TxThroughStream * TxLinePlotData::txcout [protected]
 

Definition at line 329 of file TxLinePlotData.h.

TXSTD::vector< TxLinePlotDesc > TxLinePlotData::txlpd [private]
 

list of objects with relevant "description" for each plot (labels, colors, etc.).

Definition at line 385 of file TxLinePlotData.h.


The documentation for this class was generated from the following file: Copyright Tech-X Corporation, all rights reserved.