git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@12613 f3b2605a-c512-4ea7-a41b-209d697bcdaa

This commit is contained in:
sjplimp
2014-10-07 20:30:53 +00:00
parent 044084847b
commit 211c12c39e
5 changed files with 1649 additions and 0 deletions

View File

@ -0,0 +1,47 @@
/// -*- c++ -*-
#ifndef COLVARSCRIPT_H
#define COLVARSCRIPT_H
#include <string>
#include "colvarmodule.h"
#include "colvarvalue.h"
#include "colvarbias.h"
#include "colvarproxy.h"
#define COLVARSCRIPT_ERROR -1
#define COLVARSCRIPT_OK 0
class colvarscript {
private:
colvarproxy *proxy;
colvarmodule *colvars;
inline colvarscript() {} // no-argument construction forbidden
public:
friend class colvarproxy;
colvarscript(colvarproxy * p);
inline ~colvarscript() {}
/// If an error is caught by the proxy through fatal_error(), this is set to COLVARSCRIPT_ERROR
int proxy_error;
/// If an error is returned by one of the methods, it should set this to the error message
std::string result;
/// Run script command with given positional arguments
int run (int argc, char const *argv[]);
/// Run subcommands on colvar
int proc_colvar (int argc, char const *argv[]);
/// Run subcommands on bias
int proc_bias (int argc, char const *argv[]);
};
#endif