Simpatico  v1.10
Command.h
1 #ifndef MCMD_COMMAND_H
2 #define MCMD_COMMAND_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/ParamComposite.h>
12 
13 namespace McMd
14 {
15 
16  using namespace Util;
17 
40  class Command : public ParamComposite
41  {
42 
43  public:
44 
50  Command(std::string name);
51 
57  virtual ~Command();
58 
64  virtual bool match(std::string name);
65 
76  virtual void execute(std::istream& in) = 0;
77 
81  virtual void save(Serializable::OArchive& ar)
82  {}
83 
88  {}
89 
90  private:
91 
93  std::string name_;
94 
95  };
96 
97 }
98 #endif
Saving / output archive for binary ostream.
Utility classes for scientific computation.
Definition: accumulators.mod:1
virtual void loadParameters(Serializable::IArchive &ar)
Load parameters from an archive (empty default implementation).
Definition: Command.h:87
Command is an object that can be invoked from the command script.
Definition: Command.h:40
virtual void save(Serializable::OArchive &ar)
Save state to archive (empty default implementation).
Definition: Command.h:81
Saving archive for binary istream.
Single-processor Monte Carlo (MC) and molecular dynamics (MD).
An object that can read multiple parameters from file.