FV3 Bundle
ioda::IodaIOfactory Class Reference

Factory class to instantiate objects of IodaIO subclasses. More...

#include <IodaIOfactory.h>

Public Member Functions

 IodaIOfactory ()
 
 ~IodaIOfactory ()
 

Static Public Member Functions

static ioda::IodaIOCreate (const std::string &FileName, const std::string &FileMode)
 Instantiate a IodaIO object in read mode. More...
 
static ioda::IodaIOCreate (const std::string &FileName, const std::string &FileMode, const std::size_t &Nlocs, const std::size_t &Nobs, const std::size_t &Nrecs, const std::size_t &Nvars)
 Instantiate a IodaIO object in write mode. More...
 

Detailed Description

Factory class to instantiate objects of IodaIO subclasses.

This class provides two Create methods. The Create method with two arguements Is intended for use when opening a file in read mode. The Create method with six arguments is intended for use when opening a file in write mode.

Currently, the subclass from which to instantiate an object from is chosen based on the suffix in the file name. ".nc4" and ".nc" are recognized as netcdf files, and .odb is recognized as an ODB file. This isn't necessarily the best way to identify the file format, so this should be revisited in the future.

Author
Stephen Herbener (JCSDA)

Definition at line 33 of file IodaIOfactory.h.

Constructor & Destructor Documentation

◆ IodaIOfactory()

ioda::IodaIOfactory::IodaIOfactory ( )
inline

Definition at line 35 of file IodaIOfactory.h.

◆ ~IodaIOfactory()

ioda::IodaIOfactory::~IodaIOfactory ( )
inline

Definition at line 36 of file IodaIOfactory.h.

Member Function Documentation

◆ Create() [1/2]

IodaIO * ioda::IodaIOfactory::Create ( const std::string &  FileName,
const std::string &  FileMode 
)
static

Instantiate a IodaIO object in read mode.

This method will instantiate an object of a IodaIO subclass. This method is intended to be used when opening a file in a read mode. The Nlocs, Nobs, Nrecs and Nvars parameters are set to zero which is okay since these will be set by reading metadata from the input file.

Definition at line 32 of file IodaIOfactory.cc.

Here is the caller graph for this function:

◆ Create() [2/2]

IodaIO * ioda::IodaIOfactory::Create ( const std::string &  FileName,
const std::string &  FileMode,
const std::size_t &  Nlocs,
const std::size_t &  Nobs,
const std::size_t &  Nrecs,
const std::size_t &  Nvars 
)
static

Instantiate a IodaIO object in write mode.

This method will instantiate an object of a IodaIO subclass. This method is intended to be used when opening a file in a write mode. The Nlocs, Nobs, Nrecs and Nvars parameters are set by the caller in this case. These parameters will subsequently be used to set metadata in the output file.

Definition at line 46 of file IodaIOfactory.cc.


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