code::FieldArrowStruct Class Reference

Inheritance diagram for code::FieldArrowStruct:

code::DataType List of all members.

Detailed Description

An encapsulation struct to transfer a Netcdf file into a data type and used for drawing field arrows as Icons.


Public Types

typedef std::map< std::string,
SmartPtr< DataColumn > > 
AttrMap
 key-value pairs that describe the data.
 RadialSet
 LatLonGrid
 LatLonHeightGrid
 CartesianGrid2D
 Grid2D
 DataTable
 WindField
 WindFieldLLGVolume
 ElevationVolume
 ContourData
 Other
enum  Type {
  RadialSet, LatLonGrid, LatLonHeightGrid, CartesianGrid2D,
  Grid2D, DataTable, WindField, WindFieldLLGVolume,
  ElevationVolume, ContourData, Other
}

Public Member Functions

 FieldArrowStruct ()
 default constructor
virtual SpaceTimeRef getSpaceTimeRef () const
 implementting virutal functions
void invoke (Algorithm &algorithm)
 Report an error, and halt execution because this function MUST be overridden in every descendant of DataType.
bool isValid () const
const LatLonGrid::DimType & getGridSpacing () const
std::string getTypeClassName () const
 returns a string such as RadialSet, LatLonGrid, etc.
void copyDataType (const DataType &dt)
 A convenience function provided for subclasses that implement clone() -- will copy into this data type all the attributes in the type dt.
const std::string & getTypeName () const
 Return the TypeName of this DataType.
virtual short getType () const
 Get enum type of this class.
void setTypeName (const std::string &)
 Set the TypeName of this DataType.
SmartPtr< DataCellgetAttributeValue (const std::string &key) const
 Return a single value associated with an attribute key corresponding to the function's argument.
bool getAttributeValue (const std::string &key, std::string &setme) const
 Assign `setme' with the attribute corresponding to `key'.
bool getAttributeValue (const std::string &key, double &setme) const
 Assign `setme' with the attribute corresponding to `key'.
void setAttributeValue (const std::string &key, const std::string &value, const std::string &unit="dimensionless")
 Set a single-valued attribute that describes this DataType.
void setAttributeValue (const std::string &key, double value, const std::string &unit="dimensionless", const std::string &format="%g")
 Set a single-valued attribute that describes this DataType.
void setAttribute (const std::string &key, SmartPtr< DataColumn > value)
 Set a multiple-valued attribute that describes this DataType.
SmartPtr< DataColumngetAttribute (const std::string &key) const
 Get the attribute value for a particular key.
const AttrMapgetAttributes () const
 Get the entire map of attributes available for this data type.
virtual double getRawValue (const Location &, bool=false) const
 Gets raw value from data set.
virtual TimeInterval getExpiryInterval () const
 Return 15 minutes as the length of time for which this DataType is valid.
bool hasQuality () const
const DataTypegetQuality () const
void setQuality (SmartPtr< DataType > dt)
void clearAttributes ()

Public Attributes

SmartPtr< code::LatLonGridU
 pointer to U component
SmartPtr< code::LatLonGridV
 pointer to V component
SmartPtr< code::LatLonGridZ
 pointer to optional height component
SpaceTimeRef stref
 space-time reference of the data type
std::string UUnit
 unit for U component
std::string VUnit
 unit for V component
std::string ZUnit
 unit for height component

Static Public Attributes

static const std::string UColKey
 pre-define keys for U/V/Z/C components.
static const std::string VColKey
static const std::string ZColKey
static const std::string WindSpeed
 predefined key and unit for specifying radius of FieldArrow Icons based on its sequences at U/V directions c.f.DrawableCreator::process(FieldArrowStruct) and DataTable
static const std::string WindSpeedUnit
static const std::string IsTableData
static const std::string Unit
static const std::string ColorMap
static const std::string ExpiryInterval

Protected Member Functions

virtual void deep_copy (const DataType &source)


Member Typedef Documentation

typedef std::map< std::string, SmartPtr<DataColumn> > code::DataType::AttrMap [inherited]

key-value pairs that describe the data.


Member Enumeration Documentation

enum code::DataType::Type [inherited]

Enumerator:
RadialSet 
LatLonGrid 
LatLonHeightGrid 
CartesianGrid2D 
Grid2D 
DataTable 
WindField 
WindFieldLLGVolume 
ElevationVolume 
ContourData 
Other 


Constructor & Destructor Documentation

code::FieldArrowStruct::FieldArrowStruct (  )  [inline]

default constructor


Member Function Documentation

void code::DataType::clearAttributes (  )  [inline, inherited]

void code::DataType::copyDataType ( const DataType dt  )  [inherited]

A convenience function provided for subclasses that implement clone() -- will copy into this data type all the attributes in the type dt.

Attributes with the same name will be over-written, other attributes will remain unchanged.

virtual void code::DataType::deep_copy ( const DataType source  )  [inline, protected, virtual, inherited]

SmartPtr< DataColumn > code::DataType::getAttribute ( const std::string &  key  )  const [inherited]

Get the attribute value for a particular key.

Parameters:
key attribute key
Returns:
value attribute value in unit-safe manner, or an invalid SmartPtr on error.
See also:
getAttributeValue()

getAttributes() if you don't know the attribute key.

const AttrMap& code::DataType::getAttributes (  )  const [inline, inherited]

Get the entire map of attributes available for this data type.

See also:
getAttribute for a more selective get.

getAttributeValue for a convenient get.

bool code::DataType::getAttributeValue ( const std::string &  key,
double &  setme 
) const [inherited]

Assign `setme' with the attribute corresponding to `key'.

Returns:
true on success; false if no such attribute exists

bool code::DataType::getAttributeValue ( const std::string &  key,
std::string &  setme 
) const [inherited]

Assign `setme' with the attribute corresponding to `key'.

Returns:
true on success; false if no such attribute exists

SmartPtr< DataCell > code::DataType::getAttributeValue ( const std::string &  key  )  const [inherited]

Return a single value associated with an attribute key corresponding to the function's argument.

If no such attribute key exists, then return the NULL SmartPtr. In case multiple values are associated with the key, only the first item is returned.

See also:
getAttribute() to get all values.

virtual TimeInterval code::DataType::getExpiryInterval (  )  const [virtual, inherited]

Return 15 minutes as the length of time for which this DataType is valid.

Override this function in the descendant of DataType as appropriate.

Reimplemented in code::DEM.

const LatLonGrid::DimType& code::FieldArrowStruct::getGridSpacing (  )  const

const DataType& code::DataType::getQuality (  )  const [inline, inherited]

virtual double code::DataType::getRawValue ( const Location ,
bool  = false 
) const [inline, virtual, inherited]

Gets raw value from data set.

Reimplemented in code::CartesianGrid2D, code::CartesianGrid3D, code::ElevationVolume, code::LatLonGrid, code::LatLonHeightGrid, code::RadialSet, code::SparseGrid, and code::WindFieldLLGVolume.

virtual SpaceTimeRef code::FieldArrowStruct::getSpaceTimeRef (  )  const [inline, virtual]

implementting virutal functions

Implements code::DataType.

virtual short code::DataType::getType (  )  const [inline, virtual, inherited]

Get enum type of this class.

Reimplemented in code::CartesianGrid2D, code::ContourData, code::DataTable, code::ElevationVolume, code::Grid2D, code::LatLonGrid, code::LatLonHeightGrid, code::PolarGrid, code::RadialSet, code::WindFieldLLGVolume, and code::WindFieldStruct< T >.

std::string code::DataType::getTypeClassName (  )  const [inherited]

returns a string such as RadialSet, LatLonGrid, etc.

See the enum Type for all the possible options. Subclasses need only to over-ride getType()

const std::string& code::DataType::getTypeName (  )  const [inherited]

Return the TypeName of this DataType.

bool code::DataType::hasQuality (  )  const [inline, inherited]

void code::FieldArrowStruct::invoke ( Algorithm algorithm  )  [inline, virtual]

Report an error, and halt execution because this function MUST be overridden in every descendant of DataType.

The descendant's implementation should pass this or *this, as is appropriate, into the argument's process() member.

Reimplemented from code::DataType.

bool code::FieldArrowStruct::isValid (  )  const

void code::DataType::setAttribute ( const std::string &  key,
SmartPtr< DataColumn value 
) [inherited]

Set a multiple-valued attribute that describes this DataType.

If value is 0 (i.e. invalid), this attribute will be removed from the map.

void code::DataType::setAttributeValue ( const std::string &  key,
double  value,
const std::string &  unit = "dimensionless",
const std::string &  format = "%g" 
) [inherited]

Set a single-valued attribute that describes this DataType.

This is a convenience function that allows you to set a dimensionless number as the value of an attribute.

If the attribute key does not already exist, then it will be constructed.

See also:
setAttribute() to set multiple values for an attribute.

void code::DataType::setAttributeValue ( const std::string &  key,
const std::string &  value,
const std::string &  unit = "dimensionless" 
) [inherited]

Set a single-valued attribute that describes this DataType.

This is a convenience function that allows you to set a text string as the value of an attribute.

If the attribute key does not already exist, then it will be constructed. The empty string may NOT be used as a value for the attribute; this function will return immediately if the value is the empty string.

See also:
setAttribute() to set multiple values for an attribute.

void code::DataType::setQuality ( SmartPtr< DataType dt  )  [inline, inherited]

void code::DataType::setTypeName ( const std::string &   )  [inherited]

Set the TypeName of this DataType.


Member Data Documentation

const std::string code::DataType::ColorMap [static, inherited]

const std::string code::DataType::ExpiryInterval [static, inherited]

const std::string code::DataType::IsTableData [static, inherited]

SpaceTimeRef code::FieldArrowStruct::stref

space-time reference of the data type

SmartPtr<code::LatLonGrid> code::FieldArrowStruct::U

pointer to U component

const std::string code::FieldArrowStruct::UColKey [static]

pre-define keys for U/V/Z/C components.

UColKey,VColKey and CColKey are also used for corresponding DataTable columns in DrawableCreator::process(FieldArrowStruct) while ZColKey is substituded by DataTable::hgtKey also c.f. NetcdfFieldDataFormatter WindFieldIngestNetCDF

const std::string code::DataType::Unit [static, inherited]

std::string code::FieldArrowStruct::UUnit

unit for U component

SmartPtr<code::LatLonGrid> code::FieldArrowStruct::V

pointer to V component

const std::string code::FieldArrowStruct::VColKey [static]

std::string code::FieldArrowStruct::VUnit

unit for V component

const std::string code::FieldArrowStruct::WindSpeed [static]

predefined key and unit for specifying radius of FieldArrow Icons based on its sequences at U/V directions c.f.DrawableCreator::process(FieldArrowStruct) and DataTable

const std::string code::FieldArrowStruct::WindSpeedUnit [static]

SmartPtr<code::LatLonGrid> code::FieldArrowStruct::Z

pointer to optional height component

const std::string code::FieldArrowStruct::ZColKey [static]

std::string code::FieldArrowStruct::ZUnit

unit for height component


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