Simpatico  v1.10
MdCommandManager.h
1 #ifndef MCMD_MD_COMMAND_MANAGER_H
2 #define MCMD_MD_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 Util { template <typename T> class Factory; }
14 
15 namespace McMd
16 {
17 
18  class Simulation;
19  class MdSimulation;
20  class MdSystem;
21 
22  using namespace Util;
23 
39  {
40 
41  public:
42 
48  MdCommandManager(MdSimulation& simulation);
49 
56  MdCommandManager(MdSimulation& simulation, MdSystem& system);
57 
61  virtual ~MdCommandManager();
62 
63  protected:
64 
68  virtual Util::Factory<Command>* newDefaultFactory() const;
69 
73  MdSimulation& simulation() const;
74 
78  MdSystem& system() const;
79 
93  virtual
94  bool readStandardCommand(std::string command, std::istream& in);
95 
96  private:
97 
99  MdSimulation* simulationPtr_;
100 
102  MdSystem* systemPtr_;
103 
104  };
105 
106  // Inline member functions
107 
108  inline
109  MdSimulation& MdCommandManager::simulation() const
110  {
111  assert(simulationPtr_);
112  return *simulationPtr_;
113  }
114 
115  inline
116  MdSystem& MdCommandManager::system() const
117  {
118  assert(systemPtr_);
119  return *systemPtr_;
120  }
121 
122 }
123 #endif
Manager for Command objects in an MdSimulation.
Utility classes for scientific computation.
Definition: accumulators.mod:1
Command interpreter and Command Manager for an MdSimulation.
Single-processor Monte Carlo (MC) and molecular dynamics (MD).
A System for Molecular Dynamics simulation.
Definition: MdSystem.h:68
A molecular dynamics simulation of a single MdSystem.
Definition: MdSimulation.h:26