IODA
IodaIOfactory.h
Go to the documentation of this file.
1
/*
2
* (C) Copyright 2017 UCAR
3
*
4
* This software is licensed under the terms of the Apache Licence Version 2.0
5
* which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
6
*/
7
8
#ifndef IO_IODAIOFACTORY_H_
9
#define IO_IODAIOFACTORY_H_
10
11
#include <string>
12
13
#include "oops/util/DateTime.h"
14
15
#include "ioda/io/IodaIO.h"
16
17
namespace
ioda
{
18
19
/*! \brief Constant to be used for default maximum frame size */
20
const
std::size_t
IODAIO_DEFAULT_FRAME_SIZE
= 10000;
21
22
/*!
23
* \brief Factory class to instantiate objects of IodaIO subclasses.
24
*
25
* \details This class provides a Create method to open a file in a particular mode.
26
*
27
* Currently, the subclass from which to instantiate an object from is chosen
28
* based on the suffix in the file name. ".nc4" and ".nc" are recognized as
29
* netcdf files, and .odb is recognized as an ODB2 file. This isn't necessarily
30
* the best way to identify the file format, so this should be revisited in
31
* the future.
32
*
33
* \author Stephen Herbener (JCSDA)
34
*/
35
36
class
IodaIOfactory
{
37
public
:
38
IodaIOfactory
() { }
39
~IodaIOfactory
() { }
40
41
// Factory methods
42
static
ioda::IodaIO
*
Create
(
const
std::string & FileName,
const
std::string & FileMode,
43
const
std::size_t MaxFrameSize);
44
};
45
46
}
// namespace ioda
47
48
#endif // IO_IODAIOFACTORY_H_
ioda::IodaIOfactory::Create
static ioda::IodaIO * Create(const std::string &FileName, const std::string &FileMode, const std::size_t MaxFrameSize)
Instantiate a IodaIO object.
Definition:
IodaIOfactory.cc:29
ioda::IODAIO_DEFAULT_FRAME_SIZE
const std::size_t IODAIO_DEFAULT_FRAME_SIZE
Constant to be used for default maximum frame size.
Definition:
IodaIOfactory.h:20
ioda::IodaIOfactory::~IodaIOfactory
~IodaIOfactory()
Definition:
IodaIOfactory.h:39
ioda::IodaIOfactory::IodaIOfactory
IodaIOfactory()
Definition:
IodaIOfactory.h:38
ioda
Definition:
IodaUtils.cc:13
ioda::IodaIOfactory
Factory class to instantiate objects of IodaIO subclasses.
Definition:
IodaIOfactory.h:36
ioda::IodaIO
File access class for IODA.
Definition:
src/io/IodaIO.h:116
fv3-bundle
ioda
src
io
IodaIOfactory.h
Generated on Sat Oct 24 2020 18:46:40 for IODA by
1.8.18