TableData< DataType > Class Template Reference

#include <TableData.hxx>

Collaboration diagram for TableData< DataType >:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 TableData (unsigned aNumCols, unsigned aNumRows)
 ~TableData ()
 Destructor removes all data.
unsigned qNumRows () const
 Get the number of rows in the table.
unsigned qNumCols () const
 Get the number of columns in the table.
unsigned qNumExts () const
 Get the number of columns in the table.
template<typename ADataType >
void assign (unsigned aCol, unsigned aRow, ADataType v)
const DataType & at (unsigned aCol, unsigned aRow) const
 Get the value in the data type as determined at compile time.
template<typename ADataType >
void value (unsigned aCol, unsigned aRow, ADataType &aValue) const
 Fetch a value from the specified entry location.
bool isDefined (unsigned aCol, unsigned aRow) const
 Has a value been assigned at this given entry location.
void setundef (unsigned aCol, unsigned aRow)
void setNumExts (unsigned aNum)
int getFirstDefinedRow (unsigned aCol)
void loadFitsColumn (FitsFile &ff, const std::string &fitsColName, unsigned aCol, unsigned firstRow)
bool testRange (unsigned aCol, unsigned aRow, StringMap aRange)
template<typename ADataType >
bool testDiscrValues (unsigned aCol, unsigned aRow, std::map< int, ADataType > aValues)

Private Member Functions

void checkIsInRange (unsigned aCol, unsigned aRow) const
void writeToBuffer (unsigned aCol, unsigned aRow, DataType aValue)
void writeToDefined (unsigned aCol, unsigned aRow, bool aState)
void writeToNumExts (unsigned aNum)
const DataType & readBuffer (unsigned aCol, unsigned aRow) const
bool readDefined (unsigned aCol, unsigned aRow) const

Private Attributes

unsigned mNumCols
 Dimensions of the data table.
unsigned mNumRows
unsigned mNumExts
DataType ** mBufferAry
 Data goes here.
bool ** mDefinedAry

Detailed Description

template<typename DataType>
class TableData< DataType >

Class to encapsulate the data that will be ingested into a data base table


Constructor & Destructor Documentation

template<typename DataType>
TableData< DataType >::TableData ( unsigned  aNumCols,
unsigned  aNumRows 
) [inline]

Construct using number of attributes (columns) and number of rows of data (rows) for each attribute

template<typename DataType>
TableData< DataType >::~TableData (  )  [inline]

Destructor removes all data.


Member Function Documentation

template<typename DataType>
template<typename ADataType >
void TableData< DataType >::assign ( unsigned  aCol,
unsigned  aRow,
ADataType  v 
) [inline]

Assign a value to the given entry location. Note the use of the above convert type functions so that all combinations of compile time implementations can be dealt with.

Referenced by DataDumper::addDefaultRow(), Provenance< DataType >::build(), SourceTable::calcMergedClass(), SourceTable::copyPassband(), Table< DataType >::datetimeTest(), VSAProject< DataType >::doit(), VersionNum< DataType >::doit(), UtDate< DataType >::doit(), TotalExpTime< DataType >::doit(), TelRunNum< DataType >::doit(), SloanCoords< DataType >::doit(), SkySubScale< DataType >::doit(), QuantitiesByAst< DataType >::doit(), ProgrammeID< DataType >::doit(), ObjectID< DataType >::doit(), NumDetectors< DataType >::doit(), Moon< DataType >::doit(), ColourIndexError< DataType >::doit(), ColourIndex< DataType >::doit(), JulianDayNum< DataType >::doit(), HtmIndex< DataType >::doit(), HlRadii< DataType >::doit(), HlRadCirc< DataType >::doit(), GalacticCoords< DataType >::doit(), FrameType< DataType >::doit(), IndirectFrameID< DataType >::doit(), DirectFrameID< DataType >::doit(), FilterID< DataType >::doit(), FilterIDByFits< DataType >::doit(), FileTimeStamp< DataType >::doit(), FileName< DataType >::doit(), DoneToBool< DataType >::doit(), DegToH< DataType >::doit(), CurationTaskID< DataType >::doit(), CalibratedVSAMagnitude< DataType >::doit2(), RaDecByAst< DataType >::doit2(), MagnitudeError< DataType >::doit2(), CalibratedMagnitude< DataType >::doit2(), SourceTable::fillExtinctionValues(), DataChannel_SQL_float< DataType >::input(), DataChannel_SQL_real< DataType >::input(), DataChannel_SQL_bigint< DataType >::input(), DataChannel_SQL_int< DataType >::input(), DataChannel_SQL_smallint< DataType >::input(), DataChannel_SQL_tinyint< DataType >::input(), SourceTable::insertAstrometricData(), insertExtNum(), insertFitsColumns(), insertKeywordValue(), SourceTable::insertUserSupplied(), and Table< DataType >::varcharTest().

template<typename DataType>
const DataType& TableData< DataType >::at ( unsigned  aCol,
unsigned  aRow 
) const [inline]
template<typename DataType>
void TableData< DataType >::checkIsInRange ( unsigned  aCol,
unsigned  aRow 
) const [inline, private]
template<typename DataType>
int TableData< DataType >::getFirstDefinedRow ( unsigned  aCol  )  [inline]

Returns the index of the first row in the specified column that has a defined value

Parameters:
aCol column index to search
template<typename DataType>
bool TableData< DataType >::isDefined ( unsigned  aCol,
unsigned  aRow 
) const [inline]
template<typename DataType>
void TableData< DataType >::loadFitsColumn ( FitsFile ff,
const std::string &  fitsColName,
unsigned  aCol,
unsigned  firstRow 
) [inline]

Given a FitsFile object positioned at a table extension, load the entire contents of the named column in the file to the given column number in the table

Referenced by insertFitsColumns().

template<typename DataType>
unsigned TableData< DataType >::qNumCols (  )  const [inline]

Get the number of columns in the table.

Referenced by SourceTable::copyPassband(), DataDumper::dumpAsCsv(), extractMetadata(), and extractSources().

template<typename DataType>
unsigned TableData< DataType >::qNumExts (  )  const [inline]

Get the number of columns in the table.

Referenced by DataDumper::addDefaultRow().

template<typename DataType>
unsigned TableData< DataType >::qNumRows (  )  const [inline]
template<typename DataType>
const DataType& TableData< DataType >::readBuffer ( unsigned  aCol,
unsigned  aRow 
) const [inline, private]
template<typename DataType>
bool TableData< DataType >::readDefined ( unsigned  aCol,
unsigned  aRow 
) const [inline, private]
template<typename DataType>
void TableData< DataType >::setNumExts ( unsigned  aNum  )  [inline]
template<typename DataType>
void TableData< DataType >::setundef ( unsigned  aCol,
unsigned  aRow 
) [inline]
template<typename DataType>
template<typename ADataType >
bool TableData< DataType >::testDiscrValues ( unsigned  aCol,
unsigned  aRow,
std::map< int, ADataType >  aValues 
) [inline]

Test whether a metadata value is within a set of discrete values at the given entry location. Note the use of the above convert type functions so that all combinations of compile time implementations can be dealt with.

template<typename DataType>
bool TableData< DataType >::testRange ( unsigned  aCol,
unsigned  aRow,
StringMap  aRange 
) [inline]

Test whether a metadata value is within the prescribed range at the given entry location. Note the use of the above convert type functions so that all combinations of compile time implementations can be dealt with.

template<typename DataType>
template<typename ADataType >
void TableData< DataType >::value ( unsigned  aCol,
unsigned  aRow,
ADataType &  aValue 
) const [inline]
template<typename DataType>
void TableData< DataType >::writeToBuffer ( unsigned  aCol,
unsigned  aRow,
DataType  aValue 
) [inline, private]
template<typename DataType>
void TableData< DataType >::writeToDefined ( unsigned  aCol,
unsigned  aRow,
bool  aState 
) [inline, private]
template<typename DataType>
void TableData< DataType >::writeToNumExts ( unsigned  aNum  )  [inline, private]

Member Data Documentation

template<typename DataType>
DataType** TableData< DataType >::mBufferAry [private]
template<typename DataType>
bool** TableData< DataType >::mDefinedAry [private]

Corresponding boolean array specifying whether or not a given column and row value is defined

Referenced by TableData< Numeric >::readDefined(), TableData< Numeric >::TableData(), TableData< Numeric >::writeToBuffer(), TableData< Numeric >::writeToDefined(), and TableData< Numeric >::~TableData().

template<typename DataType>
unsigned TableData< DataType >::mNumCols [private]
template<typename DataType>
unsigned TableData< DataType >::mNumExts [private]
template<typename DataType>
unsigned TableData< DataType >::mNumRows [private]

The documentation for this class was generated from the following file:
Generated on Mon Oct 4 10:39:39 2010 for WfcamSrc by  doxygen 1.6.3