TblAsXYDD.h

Classes

TblAsXYDD -- Class for displaying data within a table as a xy image. (full description)

class TblAsXYDD : public ActiveCaching2dDD

Interface

Public Members
TblAsXYDD(Table *table)
TblAsXYDD(const String tablename)
virtual ~TblAsXYDD()
virtual String showValue(const Vector<Double> &world)
virtual const Unit dataUnit(const String column)
virtual const Unit dataUnit()
virtual void setDefaultOptions()
virtual Bool setOptions(Record &rec, Record &recOut)
virtual Record getOptions()
virtual Display::DisplayDataType classType()
virtual CachingDisplayMethod *newDisplayMethod(WorldCanvas *worldCanvas, AttributeBuffer *wchAttributes, AttributeBuffer *ddAttributes, CachingDisplayData *dd)
virtual AttributeBuffer optionsAsAttributes()
Table *table()
virtual void cleanup()
Protected Members
TblAsXYDD()
TblAsXYDD(const TblAsXYDD &other)
void operator=(const TblAsXYDD &other)
template <class T> Bool getTableKeyword(T &value, const T keyword) const
template <class T> Bool getTableKeyword(T &value, const T &regex) const
template <class T> Bool getColumnKeyword(T &value, const T column, const T keyword) const
template <class T> Bool getColumnKeyword(T &value, const T column, const String &regex) const
Private Members
void installDefaultOptions()
Bool arrangeQueryTable()
void getCoordinateSystem()
void setCoordinateSystem()
void getTableColumnNames()
Vector<double> columnStatistics(const String& columnName)
Vector<String> getColumnNamesOfType()
void constructParameters()
void destructParameters()

Description

or

Prerequisite

Etymology

"TblAsXYDD" is a implementation of a ActiveCaching2dDD which provides for the display of data held within a table to be displayed as a xy image in an environment where individual depictions of the data are automatically cached.

Synopsis

This class adds to the interface defined in DisplayData . It adds the capability to display data from a <\linkto class=Table>Table column as a xy image. It is assumed that the Y axis is defined to be either the row number of the table column being displayed or the scalar value from the same row number in a different table column (e.g. plotting intensity as a function of frequency against row number or time determined from a different column of the table). The X axis is assumed to be the data in a scalar table column.

Example

A TblAsXYDD object could be construed and used as follows:
    TblAsXYDD *tardd1 = 0;
    tardd1 = new TblAsXYDD("tablename");
    Colormap cmap1("Hot Metal 2");
    tardd1->setColormap(&cmap1, 1.0);
    wcHolder->addDisplayData((DisplayData *)tardd1);

Motivation

To allow the display of data from a table as a xy image.

Template Type Argument Requirements (T)

Thrown Exceptions

To Do

Member Description

TblAsXYDD(Table *table)

constructors given an already constructed table

TblAsXYDD(const String tablename)

given a string which gives the full pathname and filename of a table on disk

virtual ~TblAsXYDD()

Destructor

virtual String showValue(const Vector<Double> &world)

format the table value at the give world position

virtual const Unit dataUnit(const String column)

get the data unit

virtual const Unit dataUnit()

virtual void setDefaultOptions()

install the default options for this DisplayData

virtual Bool setOptions(Record &rec, Record &recOut)

Apply options stored in rec to the DisplayData. A return value of True means a refresh is needed. recOut contains any fields which were implicitly changed as a result of the call to this function.

virtual Record getOptions()

Retrieve the current and default options and parameter types.

virtual Display::DisplayDataType classType()

Return the type of this DisplayData.

virtual CachingDisplayMethod *newDisplayMethod(WorldCanvas *worldCanvas, AttributeBuffer *wchAttributes, AttributeBuffer *ddAttributes, CachingDisplayData *dd)

Create a new TblAsXyDM for drawing on the given WorldCanvas when the AttributeBuffers are suitably matched to the current state of this DisplayData and of the WorldCanvas/Holder. The tag is a unique number used to identify the age of the newly constructed CachingDisplayMethod.

virtual AttributeBuffer optionsAsAttributes()

Return the current options of this DisplayData as an AttributeBuffer.

Table *table()

provide read-only access to the table

virtual void cleanup()

Clean up (ie. delete any existing cached display list).

TblAsXYDD()

(Required) default constructor.

TblAsXYDD(const TblAsXYDD &other)

(Required) copy constructor.

void operator=(const TblAsXYDD &other)

(Required) copy assignment.

template <class T> Bool getTableKeyword(T &value, const T keyword) const
template <class T> Bool getTableKeyword(T &value, const T &regex) const

Get the value of the named keyword, or the first keyword matching regex, and return it in value. The return value is True for success, and False for failure, which is the result if the wrong type T is requested.

template <class T> Bool getColumnKeyword(T &value, const T column, const T keyword) const
template <class T> Bool getColumnKeyword(T &value, const T column, const String &regex) const

Get the value of the named keyword, or the first keyword matching regex for the named column, and return it in value. The return value is True for success, and False for failure, which is the result if // the wrong type T is requested, or if the keyword doesn't exist.

void installDefaultOptions()

set the default options for this display data

Bool arrangeQueryTable()

Arrange the query table (called after changing an option).

void getCoordinateSystem()

update/set the coordinate system

void setCoordinateSystem()

void getTableColumnNames()

get all of the table columnNames

Vector<double> columnStatistics(const String& columnName)

get the table column world coordinate range

Vector<String> getColumnNamesOfType()

get all of the table columnNames with a certain data type

void constructParameters()
void destructParameters()

Construct and destruct the parameter set.