8 #ifndef IO_OBSIOFACTORY_H_ 
    9 #define IO_OBSIOFACTORY_H_ 
   16 #include <boost/make_unique.hpp> 
   21 class ObsIoParametersBase;
 
   22 class ObsSpaceParameters;
 
   60   static std::map<std::string, ObsIoFactory*> & 
getMakers();
 
   75     const auto &stronglyTypedIoParameters = 
dynamic_cast<const Parameters_&
>(ioParameters);
 
   76     return std::make_shared<T>(stronglyTypedIoParameters, obsSpaceParameters);
 
   80     return boost::make_unique<Parameters_>();
 
virtual ~ObsIoFactory()=default
ObsIoFactory(const std::string &)
Register a maker able to create instances of the specified ObsIo subclass.
static std::map< std::string, ObsIoFactory * > & getMakers()
virtual std::unique_ptr< ObsIoParametersBase > makeParameters() const =0
static ObsIoFactory & getMaker(const std::string &name)
static std::unique_ptr< ObsIoParametersBase > createParameters(const std::string &name)
Create and return an instance of the subclass of ObsIoParametersBase storing parameters of the specif...
virtual std::shared_ptr< ObsIo > make(const ObsIoParametersBase &ioParameters, const ObsSpaceParameters &obsSpaceParameters)=0
static std::shared_ptr< ObsIo > create(ObsIoModes mode, const ObsSpaceParameters ¶meters)
Create and return a new instance of an ObsIo subclass.
static std::vector< std::string > getMakerNames()
Return the names of all ObsIo subclasses that can be created by one of the registered makers.
ObsIoMaker(const std::string &name)
T::Parameters_ Parameters_
std::shared_ptr< ObsIo > make(const ObsIoParametersBase &ioParameters, const ObsSpaceParameters &obsSpaceParameters) override
std::unique_ptr< ObsIoParametersBase > makeParameters() const override
Base of classes storing the configuration parameters of ObsIo subclasses.