Simpatico  v1.10
List of all members | Public Member Functions | Protected Member Functions
McMd::MdCommandFactory Class Reference

Detailed Description

CommandFactory for an MdSimulation.

Definition at line 28 of file MdCommandFactory.h.

#include <MdCommandFactory.h>

Inheritance diagram for McMd::MdCommandFactory:
Util::Factory< Command >

Public Member Functions

 MdCommandFactory (MdSimulation &simulation, MdSystem &system)
 Constructor. More...
 
virtual Commandfactory (const std::string &className) const
 Return pointer to a new Command object. More...
 
- Public Member Functions inherited from Util::Factory< Command >
 Factory ()
 Constructor. More...
 
virtual ~Factory ()
 Destructor. More...
 
void addSubfactory (Factory< Command > &subfactory)
 Add a new subfactory to the list. More...
 
Command * readObject (std::istream &in, ParamComposite &parent, std::string &className, bool &isEnd)
 Read a class name, instantiate an object, and read its parameters. More...
 
Command * loadObject (Serializable::IArchive &ar, ParamComposite &parent, std::string &className)
 Load a class name, instantiate an object, and load the object. More...
 

Protected Member Functions

MdSystemsystem () const
 Return reference to parent MdSystem. More...
 
MdSimulationsimulation () const
 Return reference to parent MdSimulation. More...
 
- Protected Member Functions inherited from Util::Factory< Command >
Command * 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

McMd::MdCommandFactory::MdCommandFactory ( MdSimulation simulation,
MdSystem system 
)

Constructor.

Parameters
simulationparent MdSimulation
systemparent MdSystem

Definition at line 24 of file MdCommandFactory.cpp.

Member Function Documentation

Command * McMd::MdCommandFactory::factory ( const std::string &  className) const
virtual

Return pointer to a new Command object.

Parameters
classNamename of a subclass of Command.
Returns
base class pointer to a new instance of className.

Implements Util::Factory< Command >.

Definition at line 33 of file MdCommandFactory.cpp.

References system(), and Util::Factory< Command >::trySubfactories().

MdSystem& McMd::MdCommandFactory::system ( ) const
inlineprotected

Return reference to parent MdSystem.

Definition at line 54 of file MdCommandFactory.h.

Referenced by factory().

MdSimulation& McMd::MdCommandFactory::simulation ( ) const
inlineprotected

Return reference to parent MdSimulation.

Definition at line 60 of file MdCommandFactory.h.


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