|
Simpatico
v1.10
|
Factory for subclasses MdPairPotential or McPairPotential.
This class is not derived from the Factory template because it provides a different interface, with separate mcFactory() and mdFactory() methods to create McPairPotential and MdPairPotential objects. Unlike a standard Factory, it also does not provide a readObject method, and so does not require a param communicator.
Definition at line 34 of file mcMd/potentials/pair/PairFactory.h.
#include <PairFactory.h>
Public Member Functions | |
| PairFactory () | |
| Constructor. More... | |
| virtual | ~PairFactory () |
| Destructor. More... | |
| void | addSubfactory (PairFactory &subfactory) |
| Add a new subfactory to the list. More... | |
| virtual McPairPotential * | mcFactory (const std::string &subclass, System &system) const |
| Return a pointer to a new McPairPotential, if possible. More... | |
| virtual MdPairPotential * | mdFactory (const std::string &subclass, System &system) const |
| Return a pointer to a new McPairPotential, if possible. More... | |
| virtual MdPairPotential * | mdFactory (McPairPotential &potential) const |
| Create an MdPairPotential from a McPairPotential. More... | |
Protected Member Functions | |
| McPairPotential * | tryMcSubfactories (const std::string &className, System &system) const |
| Search subfactories for match to McPairPotential subclass name. More... | |
| MdPairPotential * | tryMdSubfactories (const std::string &className, System &system) const |
| Search subfactories for match to MdPairPotential subclass name. More... | |
| MdPairPotential * | tryMdSubfactories (McPairPotential &potential) const |
| Search through subfactories for match for an mc potential. More... | |
| McMd::PairFactory::PairFactory | ( | ) |
Constructor.
Default constructor.
Definition at line 42 of file mcMd/potentials/pair/PairFactory.cpp.
|
inlinevirtual |
Destructor.
Definition at line 47 of file mcMd/potentials/pair/PairFactory.h.
References addSubfactory(), mcFactory(), mdFactory(), tryMcSubfactories(), and tryMdSubfactories().
| void McMd::PairFactory::addSubfactory | ( | PairFactory & | subfactory | ) |
Add a new subfactory to the list.
If this Factory has a param communicator, this method also sets the child subfactory communicator to that of the parent.
| subfactory | New subfactory to be added |
Definition at line 48 of file mcMd/potentials/pair/PairFactory.cpp.
Referenced by ~PairFactory().
|
virtual |
Return a pointer to a new McPairPotential, if possible.
| subclass | name of desired subclass of McPairPotential |
| system | associated System |
Definition at line 55 of file mcMd/potentials/pair/PairFactory.cpp.
Referenced by McMd::McSystem::loadParameters(), McMd::McSystem::readParameters(), and ~PairFactory().
|
virtual |
Return a pointer to a new McPairPotential, if possible.
| subclass | name of desired subclass of MdPairPotential |
| system | associated System |
Definition at line 85 of file mcMd/potentials/pair/PairFactory.cpp.
References McMd::Simulation::hasCoulomb(), and McMd::System::simulation().
Referenced by McMd::MdSystem::loadParameters(), McMd::MdSystem::MdSystem(), McMd::MdSystem::readParameters(), and ~PairFactory().
|
virtual |
Create an MdPairPotential from a McPairPotential.
| potential | McPairPotential to be cloned |
Definition at line 147 of file mcMd/potentials/pair/PairFactory.cpp.
References McMd::PairPotential::interactionClassName().
|
protected |
Search subfactories for match to McPairPotential subclass name.
| className | name of subclass |
| system | associated System |
Definition at line 186 of file mcMd/potentials/pair/PairFactory.cpp.
Referenced by ~PairFactory().
|
protected |
Search subfactories for match to MdPairPotential subclass name.
| className | name of subclass |
| system | associated System |
Definition at line 200 of file mcMd/potentials/pair/PairFactory.cpp.
Referenced by ~PairFactory().
|
protected |
Search through subfactories for match for an mc potential.
| potential | McPairPotential to be cloned |
Definition at line 213 of file mcMd/potentials/pair/PairFactory.cpp.
1.8.11