code::TimeHeightTrendData Class Reference

List of all members.

Detailed Description

This class represents all the information required to create a single time-height trend.

Typical usage:

     InitSmartPtr<TimeHeightTrendData> tht;
     size_t i = tht->addHeight( lowHeight , lowTime );
     tht->add( i, dbzDataCell );
     tht->add( i, divDataCell );
     i = tht->addHeight( secondHeight , secondTime );
     tht->add( i, dbzDataCell );
     tht->add( i, divDataCell );
     tht->sortByHeight(); // if not added in order ...

     myTable->setTimeHeightTrend( rowno, tht );
     

Author:
Lakshman
Version:
Id
code_TimeHeightTrendData.h,v 1.5 2009/06/02 20:17:37 lakshman Exp


Public Member Functions

void add (const TimeHeightTrendData::Entry &entry)
 Add an entry of time-height-value.
void add (size_t height_no, const DataCell &value)
 add one entry of time-height-value.
void add (size_t height_no, SmartPtr< DataCell > value)
 add one entry of time-height-value.
size_t addHeight (const code::Length &height, const code::Time &time, const code::Length &tolerance=Length::Meters(1.0))
 A common method that both sets and gets the height number.
int getHeight (const code::Length &height, const code::Length &tolerance=Length::Meters(1.0)) const
 returns a -ve number if this height is not present.
void sortByHeight ()
 sorts the entries by height.
void sortByTime ()
 sorts the entries by time (the earliest time is first).
const std::vector< EntrygetEntries () const
size_t getNames (std::vector< std::string > *names) const
 Appends names of all time-height-trendable data stored here.

Classes

struct  Entry
 An entry in the TimeHeightTrendData consists of the following:. More...


Member Function Documentation

void code::TimeHeightTrendData::add ( size_t  height_no,
SmartPtr< DataCell value 
)

add one entry of time-height-value.

To find the height_number from the actual height, use getHeight() or addHeight()

void code::TimeHeightTrendData::add ( size_t  height_no,
const DataCell value 
)

add one entry of time-height-value.

To find the height_number from the actual height, use getHeight() or addHeight()

void code::TimeHeightTrendData::add ( const TimeHeightTrendData::Entry entry  ) 

Add an entry of time-height-value.

The height will be needed if necessary.

size_t code::TimeHeightTrendData::addHeight ( const code::Length height,
const code::Time time,
const code::Length tolerance = Length::Meters(1.0) 
)

A common method that both sets and gets the height number.

Given a height, get the height_no. If this height has not been seen before, we will add a new Entry corresponding to this height and return that entry number.

The default is to assume that heights within 1m are identical. In that case, this function is a no-op.

The height number should be identical to the elevation number or the vertical slice number. This method is inefficient -- as far as possible, save the height number. It won't change.

const std::vector< Entry > code::TimeHeightTrendData::getEntries (  )  const [inline]

int code::TimeHeightTrendData::getHeight ( const code::Length height,
const code::Length tolerance = Length::Meters(1.0) 
) const

returns a -ve number if this height is not present.

size_t code::TimeHeightTrendData::getNames ( std::vector< std::string > *  names  )  const

Appends names of all time-height-trendable data stored here.

void code::TimeHeightTrendData::sortByHeight (  ) 

sorts the entries by height.

void code::TimeHeightTrendData::sortByTime (  ) 

sorts the entries by time (the earliest time is first).


Generated on Fri May 4 13:40:11 2012 for WDSS-IIw2 by  doxygen 1.4.7