Simpatico  v1.10
List of all members | Public Member Functions
Tools::ConfigReaderFactory Class Reference

Detailed Description

Default Factory for subclasses of ConfigReader.

Definition at line 27 of file ConfigReaderFactory.h.

#include <ConfigReaderFactory.h>

Inheritance diagram for Tools::ConfigReaderFactory:
Util::Factory< ConfigReader >

Public Member Functions

 ConfigReaderFactory (Configuration &configuration)
 Constructor. More...
 
ConfigReaderfactory (const std::string &subclassName) const
 Create an instance of a specified subclass of ConfigReader. More...
 
- Public Member Functions inherited from Util::Factory< ConfigReader >
 Factory ()
 Constructor. More...
 
virtual ~Factory ()
 Destructor. More...
 
void addSubfactory (Factory< ConfigReader > &subfactory)
 Add a new subfactory to the list. More...
 
ConfigReader * readObject (std::istream &in, ParamComposite &parent, std::string &className, bool &isEnd)
 Read a class name, instantiate an object, and read its parameters. More...
 
ConfigReader * loadObject (Serializable::IArchive &ar, ParamComposite &parent, std::string &className)
 Load a class name, instantiate an object, and load the object. More...
 

Additional Inherited Members

- Protected Member Functions inherited from Util::Factory< ConfigReader >
ConfigReader * trySubfactories (const std::string &className) const
 Search through subfactories for match. More...
 
void setIoCommunicator (MPI::Intracomm &communicator)
 Set associated Mpi communicator. More...
 
bool hasIoCommunicator () const
 Does this factory have a param communicator? More...
 

Constructor & Destructor Documentation

Tools::ConfigReaderFactory::ConfigReaderFactory ( Configuration configuration)

Constructor.

Parameters
configurationparent Configuration object

Definition at line 22 of file ConfigReaderFactory.cpp.

Member Function Documentation

ConfigReader * Tools::ConfigReaderFactory::factory ( const std::string &  subclassName) const
virtual

Create an instance of a specified subclass of ConfigReader.

If the subclassName is recognized, this method returns a pointer to new object. If the name is not recognized, it returns a null pointer.

The new object is created using a constructor that takes the parent Tools::Configuration as a parameter. The calling function must invoke DdMd::ConfigReader::initialize() before using the new ConfigReader to read or write configuration files.

Parameters
subclassNamename of a subclass of ConfigReader
Returns
ConfigReader* pointer to new instance of subclassName

Implements Util::Factory< ConfigReader >.

Definition at line 29 of file ConfigReaderFactory.cpp.

References Util::Factory< ConfigReader >::trySubfactories().

Referenced by Tools::Processor::setConfigReader().


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