Simpatico  v1.10
McCommandFactory.h
1 #ifndef MCMD_MC_COMMAND_FACTORY_H
2 #define MCMD_MC_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 McSimulation;
20  class McSystem;
21 
28  class McCommandFactory : public Factory<Command>
29  {
30 
31  public:
32 
39  McCommandFactory(McSimulation& simulation, McSystem& system);
40 
47  virtual Command* factory(const std::string& className) const;
48 
49  protected:
50 
54  McSystem& system() const
55  { return *systemPtr_; }
56 
61  { return *simulationPtr_; }
62 
63  private:
64 
65  // Pointer to parent Simulation
66  McSimulation *simulationPtr_;
67 
68  // Pointer to parent System
69  McSystem *systemPtr_;
70 
71  };
72 
73 }
74 #endif
A System for use in a Markov chain Monte Carlo simulation.
Definition: McSystem.h:52
McSystem & system() const
Return reference to parent McSystem.
McSimulation & simulation() const
Return reference to parent McSimulation.
A Monte-Carlo simulation of one McSystem.
Definition: McSimulation.h:32
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 McSimulation.
Single-processor Monte Carlo (MC) and molecular dynamics (MD).
Factory template.
Definition: Factory.h:32