PSCF v1.5.0
Pscf::Rp::SimulatorFactory< D, T > Class Template Reference

Factory for subclasses of Simulator. More...

#include <SimulatorFactory.h>

Inheritance diagram for Pscf::Rp::SimulatorFactory< D, T >:
Util::Factory< Simulator< D, T > >

Public Member Functions

 SimulatorFactory (System< D, T > &system)
 Constructor.
Simulator< D, T > * factory (const std::string &className) const
 Method to create any Simulator supplied with PSCF.
Public Member Functions inherited from Util::Factory< Simulator< D, T > >
 Factory ()
 Constructor.
virtual ~Factory ()
 Destructor.
void addSubfactory (Factory< Simulator< D, T > > &subfactory)
 Add a new subfactory to the list.
Simulator< D, T > * readObject (std::istream &in, ParamComposite &parent, std::string &className, bool &isEnd, bool isRequired=true)
 Read a class name, instantiate an object, and read its parameters.
Simulator< D, T > * readObjectOptional (std::istream &in, ParamComposite &parent, std::string &className, bool &isEnd)
 Read an optional class name, instantiate an object, and read its parameters.
Simulator< D, T > * loadObject (Serializable::IArchive &ar, ParamComposite &parent, std::string &className)
 Load a class name, instantiate an object, and load the object.

Additional Inherited Members

Protected Member Functions inherited from Util::Factory< Simulator< D, T > >
Simulator< D, T > * trySubfactories (const std::string &className) const
 Search through subfactories for match.

Detailed Description

template<int D, class T>
class Pscf::Rp::SimulatorFactory< D, T >

Factory for subclasses of Simulator.

Definition at line 36 of file SimulatorFactory.h.

Constructor & Destructor Documentation

◆ SimulatorFactory()

template<int D, class T>
Pscf::Rp::SimulatorFactory< D, T >::SimulatorFactory ( System< D, T > & system)

Constructor.

Parameters
systemparent System<D,T> object

Definition at line 22 of file SimulatorFactory.tpp.

Member Function Documentation

◆ factory()

template<int D, class T>
Simulator< D, T > * Pscf::Rp::SimulatorFactory< D, T >::factory ( const std::string & className) const
virtual

Method to create any Simulator supplied with PSCF.

Parameters
classNamename of the Simulator subclass
Returns
Simulator* pointer to new instance of className

Implements Util::Factory< Simulator< D, T > >.

Definition at line 30 of file SimulatorFactory.tpp.

References Pscf::Rp::BdSimulator< D, T >::BdSimulator(), Pscf::Rp::McSimulator< D, T >::McSimulator(), and Util::Factory< Simulator< D, T > >::trySubfactories().


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