IODA Bundle
Ingester::IodaEncoder Class Reference

Uses IodaDescription and parsed data to create IODA data. More...

#include <IodaEncoder.h>

Collaboration diagram for Ingester::IodaEncoder:
[legend]

Public Member Functions

 IodaEncoder (const eckit::Configuration &conf)
 
 IodaEncoder (const IodaDescription &description)
 
std::map< SubCategory, ioda::ObsGroupencode (const std::shared_ptr< DataContainer > &data, bool append=false)
 Encode the data into an ioda::ObsGroup object. More...
 

Private Member Functions

std::string makeStrWithSubstitions (const std::string &prototype, const std::map< std::string, std::string > &subMap)
 Create a string from a template string. More...
 
std::vector< std::pair< std::string, std::pair< int, int > > > findSubIdxs (const std::string &str)
 Used to find indecies of { and } by the makeStrWithSubstitions method. More...
 
bool isInteger (const std::string &str) const
 
std::string fixCoordinatesStr (const std::string &coordStr, std::map< std::string, std::string > varMap)
 
std::pair< std::string, std::string > splitVar (const std::string &varNameStr)
 

Private Attributes

const IodaDescription description_
 The description. More...
 

Detailed Description

Uses IodaDescription and parsed data to create IODA data.

Definition at line 24 of file IodaEncoder.h.

Constructor & Destructor Documentation

◆ IodaEncoder() [1/2]

Ingester::IodaEncoder::IodaEncoder ( const eckit::Configuration &  conf)
explicit

Definition at line 21 of file IodaEncoder.cpp.

◆ IodaEncoder() [2/2]

Ingester::IodaEncoder::IodaEncoder ( const IodaDescription description)
explicit

Definition at line 26 of file IodaEncoder.cpp.

Member Function Documentation

◆ encode()

std::map< SubCategory, ioda::ObsGroup > Ingester::IodaEncoder::encode ( const std::shared_ptr< DataContainer > &  data,
bool  append = false 
)

Encode the data into an ioda::ObsGroup object.

Parameters
dataThe data container to use
appendAdd data to existing file?

Definition at line 32 of file IodaEncoder.cpp.

Here is the call graph for this function:

◆ findSubIdxs()

std::vector< std::pair< std::string, std::pair< int, int > > > Ingester::IodaEncoder::findSubIdxs ( const std::string &  str)
private

Used to find indecies of { and } by the makeStrWithSubstitions method.

Parameters
strTemplate string to search.

Definition at line 208 of file IodaEncoder.cpp.

Here is the caller graph for this function:

◆ fixCoordinatesStr()

std::string Ingester::IodaEncoder::fixCoordinatesStr ( const std::string &  coordStr,
std::map< std::string, std::string >  varMap 
)
private

◆ isInteger()

bool Ingester::IodaEncoder::isInteger ( const std::string &  str) const
private

Definition at line 239 of file IodaEncoder.cpp.

Here is the caller graph for this function:

◆ makeStrWithSubstitions()

std::string Ingester::IodaEncoder::makeStrWithSubstitions ( const std::string &  prototype,
const std::map< std::string, std::string > &  subMap 
)
private

Create a string from a template string.

Parameters
prototypeA template string ex: "my {dogType} barks". Sections labeled {key} are treated as keys into the dictionary that defines their replacment values.

Definition at line 179 of file IodaEncoder.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ splitVar()

std::pair<std::string, std::string> Ingester::IodaEncoder::splitVar ( const std::string &  varNameStr)
private

Member Data Documentation

◆ description_

const IodaDescription Ingester::IodaEncoder::description_
private

The description.

Definition at line 38 of file IodaEncoder.h.


The documentation for this class was generated from the following files: