Simpatico  v1.10
McCommandManager.h
1 #ifndef MCMD_MC_COMMAND_MANAGER_H
2 #define MCMD_MC_COMMAND_MANAGER_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 <mcMd/commands/CommandManager.h> // base class
12 
13 namespace McMd
14 {
15 
16  class McSimulation;
17  class McSystem;
18 
19  using namespace Util;
20 
36  {
37 
38  public:
39 
45  McCommandManager(McSimulation& simulation);
46 
53  McCommandManager(McSimulation& simulation, McSystem& system);
54 
58  virtual ~McCommandManager();
59 
60  protected:
61 
65  virtual Util::Factory<Command>* newDefaultFactory() const;
66 
70  McSimulation& simulation() const;
71 
75  McSystem& system() const;
76 
88  virtual
89  bool readStandardCommand(std::string command, std::istream& in);
90 
91  private:
92 
94  McSimulation* simulationPtr_;
95 
97  McSystem* systemPtr_;
98 
99  };
100 
101 
102  // Inline functions
103 
104  inline
106  {
107  assert(simulationPtr_);
108  return *simulationPtr_;
109  }
110 
111  inline
113  {
114  assert(systemPtr_);
115  return *systemPtr_;
116  }
117 
118 }
119 #endif
Manager for Command objects in an MdSimulation.
A System for use in a Markov chain Monte Carlo simulation.
Definition: McSystem.h:52
McSimulation & simulation() const
Get parent McSimulation by reference.
A Monte-Carlo simulation of one McSystem.
Definition: McSimulation.h:32
Utility classes for scientific computation.
Definition: accumulators.mod:1
Command interpreter and Manager for an McSimulation.
Single-processor Monte Carlo (MC) and molecular dynamics (MD).
McSystem & system() const
Get associated McSystem by reference.