IODA Bundle
Ingester::DataContainer Class Reference

Collection of DataObjects that a Parser collected identified by their exported name. More...

#include <DataContainer.h>

Public Member Functions

 DataContainer ()
 Simple constructor. More...
 
 DataContainer (const CategoryMap &categoryMap)
 Construct to create container with subcategories. More...
 
void add (const std::string &fieldName, std::shared_ptr< DataObject > data, const SubCategory &categoryId={})
 Add a DataObject to the collection. More...
 
std::shared_ptr< DataObjectget (const std::string &fieldName, const SubCategory &categoryId={}) const
 Get a DataObject from the collection. More...
 
bool hasKey (const std::string &fieldName, const SubCategory &categoryId={}) const
 Check if DataObject with name is available. More...
 
size_t size (const SubCategory &categoryId={}) const
 Get the number of rows of the specified sub category. More...
 
std::vector< SubCategoryallSubCategories () const
 Get the number of rows of the specified sub category. More...
 
CategoryMap getCategoryMap () const
 Get the map of categories. More...
 

Private Member Functions

void makeDataSets ()
 Uses category map to generate listings of all possible subcategories. More...
 

Static Private Member Functions

static std::string makeSubCategoryStr (const SubCategory &categoryId)
 Convenience function used to make a string out of a subcategory listing. More...
 

Private Attributes

const CategoryMap categoryMap_
 Category map given (see constructor). More...
 
DataSets dataSets_
 Map of data for each possible subcategory. More...
 

Detailed Description

Collection of DataObjects that a Parser collected identified by their exported name.

Definition at line 37 of file DataContainer.h.

Constructor & Destructor Documentation

◆ DataContainer() [1/2]

Ingester::DataContainer::DataContainer ( )

Simple constructor.

Definition at line 21 of file DataContainer.cpp.

◆ DataContainer() [2/2]

Ingester::DataContainer::DataContainer ( const CategoryMap categoryMap)
explicit

Construct to create container with subcategories.

constructor that creates a underlying data structure to store data in separate sub categories defined by combining all possible combinations of categories defined in the category map.

Parameters
categoryMapmap of major category types ex: "SatId" to the possible sub types for the category type ex: {"GOES-15", "GOES-16", "GOES-17"}.

Definition at line 27 of file DataContainer.cpp.

Here is the call graph for this function:

Member Function Documentation

◆ add()

void Ingester::DataContainer::add ( const std::string &  fieldName,
std::shared_ptr< DataObject data,
const SubCategory categoryId = {} 
)

Add a DataObject to the collection.

Parameters
fieldNameThe unique (export) string that identifies this data
dataThe DataObject to store
categoryIdThe vector<string> for the subcategory

Definition at line 33 of file DataContainer.cpp.

Here is the call graph for this function:

◆ allSubCategories()

std::vector< SubCategory > Ingester::DataContainer::allSubCategories ( ) const

Get the number of rows of the specified sub category.

Definition at line 91 of file DataContainer.cpp.

◆ get()

std::shared_ptr< DataObject > Ingester::DataContainer::get ( const std::string &  fieldName,
const SubCategory categoryId = {} 
) const

Get a DataObject from the collection.

Parameters
fieldNameThe name of the data object ot get
categoryIdThe vector<string> for the subcategory

Definition at line 48 of file DataContainer.cpp.

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

◆ getCategoryMap()

CategoryMap Ingester::DataContainer::getCategoryMap ( ) const
inline

Get the map of categories.

Definition at line 79 of file DataContainer.h.

◆ hasKey()

bool Ingester::DataContainer::hasKey ( const std::string &  fieldName,
const SubCategory categoryId = {} 
) const

Check if DataObject with name is available.

Parameters
fieldNameThe name of the object
categoryIdThe vector<string> for the subcategory

Definition at line 64 of file DataContainer.cpp.

Here is the caller graph for this function:

◆ makeDataSets()

void Ingester::DataContainer::makeDataSets ( )
private

Uses category map to generate listings of all possible subcategories.

Definition at line 103 of file DataContainer.cpp.

Here is the caller graph for this function:

◆ makeSubCategoryStr()

std::string Ingester::DataContainer::makeSubCategoryStr ( const SubCategory categoryId)
staticprivate

Convenience function used to make a string out of a subcategory listing.

Parameters
categoryIdSubcategory (ie: vector<string>) listing.

Definition at line 154 of file DataContainer.cpp.

Here is the caller graph for this function:

◆ size()

size_t Ingester::DataContainer::size ( const SubCategory categoryId = {}) const

Get the number of rows of the specified sub category.

Parameters
categoryIdThe vector<string> for the subcategory

Definition at line 77 of file DataContainer.cpp.

Here is the call graph for this function:

Member Data Documentation

◆ categoryMap_

const CategoryMap Ingester::DataContainer::categoryMap_
private

Category map given (see constructor).

Definition at line 83 of file DataContainer.h.

◆ dataSets_

DataSets Ingester::DataContainer::dataSets_
private

Map of data for each possible subcategory.

Definition at line 86 of file DataContainer.h.


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