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

Factory for subclasses of Ramp. More...

#include <RampFactory.h>

Inheritance diagram for Pscf::Rp::RampFactory< D, T >:
Util::Factory< Ramp< D, T > >

Public Member Functions

 RampFactory (Simulator< D, T > &simulator)
 Constructor.
Ramp< D, T > * factory (const std::string &className) const
 Method to create any Ramp supplied with PSCF.
Public Member Functions inherited from Util::Factory< Ramp< D, T > >
 Factory ()
 Constructor.
virtual ~Factory ()
 Destructor.
void addSubfactory (Factory< Ramp< D, T > > &subfactory)
 Add a new subfactory to the list.
Ramp< 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.
Ramp< 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.
Ramp< 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< Ramp< D, T > >
Ramp< D, T > * trySubfactories (const std::string &className) const
 Search through subfactories for match.

Detailed Description

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

Factory for subclasses of Ramp.

Definition at line 35 of file RampFactory.h.

Constructor & Destructor Documentation

◆ RampFactory()

template<int D, class T>
Pscf::Rp::RampFactory< D, T >::RampFactory ( Simulator< D, T > & simulator)

Constructor.

Parameters
simulatorparent Simulator<D, T > object

Definition at line 22 of file RampFactory.tpp.

Referenced by Pscf::Rp::Simulator< D, T >::Simulator().

Member Function Documentation

◆ factory()

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

Method to create any Ramp supplied with PSCF.

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

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

Definition at line 30 of file RampFactory.tpp.

References Pscf::Rp::LinearRamp< D, T >::LinearRamp(), and Util::Factory< Ramp< D, T > >::trySubfactories().


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