Simpatico
v1.10
|
Default Factory for subclasses of ConfigIo.
Definition at line 25 of file ddMd/configIos/ConfigIoFactory.h.
#include <ConfigIoFactory.h>
Public Member Functions | |
ConfigIoFactory (Simulation &simulation) | |
Constructor. More... | |
ConfigIo * | factory (const std::string &subclassName) const |
Create an instance of a specified subclass of ConfigIo. More... | |
![]() | |
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 | |
![]() | |
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... | |
DdMd::ConfigIoFactory::ConfigIoFactory | ( | Simulation & | simulation | ) |
Constructor.
Definition at line 24 of file ddMd/configIos/ConfigIoFactory.cpp.
|
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.
subclassName | name of a subclass of ConfigIo |
Implements Util::Factory< ConfigIo >.
Definition at line 31 of file ddMd/configIos/ConfigIoFactory.cpp.
References DdMd::Atom::hasAtomContext(), and Util::Factory< ConfigIo >::trySubfactories().