Simpatico  v1.10
MdCommandFactory.h
1 #ifndef MCMD_MD_COMMAND_FACTORY_H
2 #define MCMD_MD_COMMAND_FACTORY_H
3 
4 /*
5 * Simpatico - Simulation Package for Polymeric and Molecular Liquids
6 *
7 * Copyright 2010 - 2017, The Regents of the University of Minnesota
8 * Distributed under the terms of the GNU General Public License.
9 */
10 
11 #include <util/param/Factory.h> // base class template
12 #include <mcMd/commands/Command.h> // class template param.
13 
14 namespace McMd
15 {
16 
17  using namespace Util;
18 
19  class MdSimulation;
20  class MdSystem;
21 
28  class MdCommandFactory : public Factory<Command>
29  {
30 
31  public:
32 
39  MdCommandFactory(MdSimulation& simulation, MdSystem& system);
40 
47  virtual Command* factory(const std::string& className) const;
48 
49  protected:
50 
54  MdSystem& system() const
55  { return *systemPtr_; }
56 
61  { return *simulationPtr_; }
62 
63  private:
64 
65  // Pointer to parent Simulation
66  MdSimulation *simulationPtr_;
67 
68  // Pointer to parent System
69  MdSystem *systemPtr_;
70 
71  };
72 
73 }
74 #endif
Utility classes for scientific computation.
Definition: accumulators.mod:1
Command is an object that can be invoked from the command script.
Definition: Command.h:40
CommandFactory for an MdSimulation.
Single-processor Monte Carlo (MC) and molecular dynamics (MD).
A System for Molecular Dynamics simulation.
Definition: MdSystem.h:68
Factory template.
Definition: Factory.h:32
MdSimulation & simulation() const
Return reference to parent MdSimulation.
MdSystem & system() const
Return reference to parent MdSystem.
A molecular dynamics simulation of a single MdSystem.
Definition: MdSimulation.h:26