code::DataEncoder Class Reference

Inheritance diagram for code::DataEncoder:

code::AwipsNetcdfDataEncoder code::NetcdfDataEncoder code::XMLDataEncoder List of all members.

Detailed Description

Abstract baseclass of DataEncoders.

Example usage: create notification mechanism (once) SmartPtr<IndexRecordNotifier> lb = IndexRecordNotifier::createDefaultNotifier(lbname); write data and notify (each time) DataEncoder::writeData( data, outputDir, *lb ); DataEncoder::writeData( data, outputDir, desired_subtype, *lb );

Author:
Lakshman
Version:
Id
code_DataEncoder.h,v 1.8 2009/11/18 14:51:07 lakshman Exp


Public Member Functions

virtual ~DataEncoder ()

Static Public Member Functions

static std::string writeData (const DataType &dt, const std::string &outputDir, std::vector< Index::Record > &records)
 Chooses the correct data encoder for the particular data type, writes out the product, and appends the records to the given vector.
static std::string writeData (const DataType &dt, const std::string &outputDir, const std::string &subtype, std::vector< Index::Record > &records)
 Chooses the correct data encoder for the particular data type, writes out the product, and appends the records to the given vector.
static std::string writeData (const DataType &dt, const std::string &outputDir, IndexRecordNotifier &notifier)
 Chooses the correct data encoder for the particular data type, writes out the product, and notifies about the resulting record(s).
static std::string writeData (const DataType &dt, const std::string &outputDir, const std::string &subtype, IndexRecordNotifier &notifier)
 Chooses the correct data encoder for the particular data type, writes out the product, and notifies about the resulting record(s).
static SmartPtr< DataFormatSettingsgetSetting (const std::string &datatype)

Protected Member Functions

virtual std::string encode (const code::DataType &dt, std::vector< Index::Record > &records)=0
 Write out this product and append the Index::Record(s) for it into the resulting vector.
virtual std::string encode (const code::DataType &dt, const std::string &subtype, std::vector< Index::Record > &records)=0
 Write out this product and append the Index::Record(s) for it (but use the specified subtype string) into the resulting vector.
virtual void applySettings (const std::map< std::string, std::string > &settings)
 Forward any extra settings specific to encoder from XML file.
virtual SmartPtr< DataEncodercreateDataEncoder (const std::string &outputDir, bool compress, bool subdirs) const =0
 Create an encoder to write to this directory with these settings.

Classes

struct  DataFormatSettings


Constructor & Destructor Documentation

virtual code::DataEncoder::~DataEncoder (  )  [inline, virtual]


Member Function Documentation

virtual void code::DataEncoder::applySettings ( const std::map< std::string, std::string > &  settings  )  [inline, protected, virtual]

Forward any extra settings specific to encoder from XML file.

Reimplemented in code::NetcdfDataEncoder.

virtual SmartPtr<DataEncoder> code::DataEncoder::createDataEncoder ( const std::string &  outputDir,
bool  compress,
bool  subdirs 
) const [protected, pure virtual]

Create an encoder to write to this directory with these settings.

Implemented in code::AwipsNetcdfDataEncoder, code::NetcdfDataEncoder, and code::XMLDataEncoder.

virtual std::string code::DataEncoder::encode ( const code::DataType dt,
const std::string &  subtype,
std::vector< Index::Record > &  records 
) [protected, pure virtual]

Write out this product and append the Index::Record(s) for it (but use the specified subtype string) into the resulting vector.

No record will be appended if there was a problem.

Returns:
filename (empty if error)

Implemented in code::AwipsNetcdfDataEncoder, code::NetcdfDataEncoder, and code::XMLDataEncoder.

virtual std::string code::DataEncoder::encode ( const code::DataType dt,
std::vector< Index::Record > &  records 
) [protected, pure virtual]

Write out this product and append the Index::Record(s) for it into the resulting vector.

No record will be appended if there was a problem.

Returns:
filename (empty if error)

Implemented in code::AwipsNetcdfDataEncoder, code::NetcdfDataEncoder, and code::XMLDataEncoder.

static SmartPtr<DataFormatSettings> code::DataEncoder::getSetting ( const std::string &  datatype  )  [static]

static std::string code::DataEncoder::writeData ( const DataType dt,
const std::string &  outputDir,
const std::string &  subtype,
IndexRecordNotifier notifier 
) [static]

Chooses the correct data encoder for the particular data type, writes out the product, and notifies about the resulting record(s).

Returns:
filename (empty if error)

static std::string code::DataEncoder::writeData ( const DataType dt,
const std::string &  outputDir,
IndexRecordNotifier notifier 
) [static]

Chooses the correct data encoder for the particular data type, writes out the product, and notifies about the resulting record(s).

Returns:
filename (empty if error)

static std::string code::DataEncoder::writeData ( const DataType dt,
const std::string &  outputDir,
const std::string &  subtype,
std::vector< Index::Record > &  records 
) [static]

Chooses the correct data encoder for the particular data type, writes out the product, and appends the records to the given vector.

The records all have the specified sub-type.

Returns:
filename (empty if error)

static std::string code::DataEncoder::writeData ( const DataType dt,
const std::string &  outputDir,
std::vector< Index::Record > &  records 
) [static]

Chooses the correct data encoder for the particular data type, writes out the product, and appends the records to the given vector.

Returns:
filename (empty if error)


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