Simpatico
v1.10
|
Default Factory for subclasses of TrajectoryReader.
Definition at line 27 of file tools/trajectory/TrajectoryReaderFactory.h.
#include <TrajectoryReaderFactory.h>
Public Member Functions | |
TrajectoryReaderFactory (Configuration &configuration) | |
Constructor. More... | |
TrajectoryReader * | factory (const std::string &subclassName) const |
Create an instance of a specified subclass of TrajectoryReader. More... | |
![]() | |
Factory () | |
Constructor. More... | |
virtual | ~Factory () |
Destructor. More... | |
void | addSubfactory (Factory< TrajectoryReader > &subfactory) |
Add a new subfactory to the list. More... | |
TrajectoryReader * | readObject (std::istream &in, ParamComposite &parent, std::string &className, bool &isEnd) |
Read a class name, instantiate an object, and read its parameters. More... | |
TrajectoryReader * | loadObject (Serializable::IArchive &ar, ParamComposite &parent, std::string &className) |
Load a class name, instantiate an object, and load the object. More... | |
Additional Inherited Members | |
![]() | |
TrajectoryReader * | 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... | |
Tools::TrajectoryReaderFactory::TrajectoryReaderFactory | ( | Configuration & | configuration | ) |
Constructor.
configuration | parent Configuration object |
Definition at line 22 of file tools/trajectory/TrajectoryReaderFactory.cpp.
|
virtual |
Create an instance of a specified subclass of TrajectoryReader.
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::TrajectoryReader::initialize() before using the new TrajectoryReader to read or write configuration files.
subclassName | name of a subclass of TrajectoryReader |
Implements Util::Factory< TrajectoryReader >.
Definition at line 29 of file tools/trajectory/TrajectoryReaderFactory.cpp.
References Util::Factory< TrajectoryReader >::trySubfactories().
Referenced by Tools::Processor::setTrajectoryReader().