Simpatico  v1.10
List of all members | Public Member Functions
DdMd::ConfigIoFactory Class Reference

Detailed Description

Default Factory for subclasses of ConfigIo.

Definition at line 25 of file ddMd/configIos/ConfigIoFactory.h.

#include <ConfigIoFactory.h>

Inheritance diagram for DdMd::ConfigIoFactory:
Util::Factory< ConfigIo >

Public Member Functions

 ConfigIoFactory (Simulation &simulation)
 Constructor. More...
 
ConfigIofactory (const std::string &subclassName) const
 Create an instance of a specified subclass of ConfigIo. More...
 
- Public Member Functions inherited from Util::Factory< ConfigIo >
 Factory ()
 Constructor. More...
 
virtual ~Factory ()
 Destructor. More...
 
void addSubfactory (Factory< ConfigIo > &subfactory)
 Add a new subfactory to the list. More...
 
ConfigIo * readObject (std::istream &in, ParamComposite &parent, std::string &className, bool &isEnd)
 Read a class name, instantiate an object, and read its parameters. More...
 
ConfigIo * 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< ConfigIo >
ConfigIo * 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

DdMd::ConfigIoFactory::ConfigIoFactory ( Simulation simulation)

Constructor.

Definition at line 24 of file ddMd/configIos/ConfigIoFactory.cpp.

Member Function Documentation

ConfigIo * DdMd::ConfigIoFactory::factory ( const std::string &  subclassName) const
virtual

Create an instance of a specified subclass of ConfigIo.

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 DdMd::Simulation as a parameter. The calling function must invoke DdMd::ConfigIo::initialize() before using the new ConfigIo to read or write configuration files.

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

Implements Util::Factory< ConfigIo >.

Definition at line 31 of file ddMd/configIos/ConfigIoFactory.cpp.

References DdMd::Atom::hasAtomContext(), and Util::Factory< ConfigIo >::trySubfactories().


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