Simpatico  v1.10
SpecialFactory.h
1 #ifndef MCMD_SPECIAL_FACTORY_H
2 #define MCMD_SPECIAL_FACTORY_H
3 
4 /*
5 * Simpatico - Simulation Package for Polymeric and Molecular Liquids
6 *
7 * Copyright 2010 - 2014, The Regents of the University of Minnesota
8 * Distributed under the terms of the GNU General Public License.
9 */
10 
11 #include <util/global.h>
12 #include <iostream>
13 #include <vector>
14 
15 namespace McMd
16 {
17 
18  class System;
19  class SpecialPotential;
20 
27  {
28 
29  public:
30 
35 
39  virtual ~SpecialFactory()
40  {}
41 
50  void addSubfactory(SpecialFactory& subfactory);
51 
58  virtual
59  SpecialPotential* mdFactory(const std::string& subclass, System& system)
60  const;
61 
62  protected:
63 
71  SpecialPotential* tryMdSubfactories(const std::string& className,
72  System& system) const;
73 
74  private:
75 
77  std::vector< SpecialFactory* > subfactories_;
78 
79  };
80 
81 }
82 #endif
83 
SpecialFactory()
Constructor.
SpecialPotential * tryMdSubfactories(const std::string &className, System &system) const
Search subfactories for match to SpecialPotential subclass name.
A set of interacting Molecules enclosed by a Boundary.
Definition: System.h:115
File containing preprocessor macros for error handling.
Specialized potential for an MD simulation.
virtual SpecialPotential * mdFactory(const std::string &subclass, System &system) const
Return a pointer to a new SpecialPotential, if possible.
Single-processor Monte Carlo (MC) and molecular dynamics (MD).
Factory for specialized subclasses of SpecialPotential.
void addSubfactory(SpecialFactory &subfactory)
Add a new subfactory to the list.
virtual ~SpecialFactory()
Destructor.