#include <CLTool.h>
Public Types | |
enum | { unset, commandline, ifile } |
How is the input specified on the command line or in an input file. More... | |
Public Member Functions | |
CLTool (const CLToolOptions &co) | |
virtual | ~CLTool () |
virtual destructor to allow inheritance More... | |
virtual std::string | description () const |
virtual function returning a one-line descriptor for the tool More... | |
const std::map< std::string, std::string > & | getInputData () |
virtual int | main (FILE *in, FILE *out, Communicator &pc)=0 |
virtual function mapping to the specific main for each tool More... | |
bool | readInput (int argc, char **argv, FILE *in, FILE *out) |
Read the arguments from the command line. More... | |
void | setInputData (const std::map< std::string, std::string > &inputData) |
Set the input data: More... | |
Static Public Member Functions | |
static void | registerKeywords (Keywords &keys) |
Create the help keywords. More... | |
Public Attributes | |
enum PLMD::CLTool:: { ... } | inputdata |
How is the input specified on the command line or in an input file. More... | |
Protected Member Functions | |
void | error (const std::string &msg) |
Crash the command line tool with an error. More... | |
template<class T > | |
bool | parse (const std::string &key, T &t) |
Get the value of one of the command line arguments. More... | |
void | parseFlag (const std::string &key, bool &t) |
Find out whether one of the command line flags is present or not. More... | |
template<class T > | |
bool | parseVector (const std::string &key, std::vector< T > &t) |
Private Member Functions | |
bool | readCommandLineArgs (int argc, char **argv, FILE *out) |
Read the arguments from the command line. More... | |
bool | readInputFile (int argc, char **argv, FILE *in, FILE *out) |
Read the arguments from an input file specified on the command line. More... | |
void | setRemainingToDefault (FILE *out) |
Set arguments from the default options provided to Keywords. More... | |
Private Attributes | |
std::map< std::string, std::string > | inputData |
The data read in from the command line stored in a map with the keywords. More... | |
const Keywords & | keywords |
The list of keywords for this CLTool. More... | |
const std::string | name |
The name of this command line tool. More... | |
This is the abstract base class to use for implementing new command line tool, within it there is information as to how to go about implemneting a new tool.
anonymous enum |
|
explicit |
|
inlinevirtual |
virtual destructor to allow inheritance
|
inlinevirtual |
virtual function returning a one-line descriptor for the tool
Reimplemented in PLMD::cltools::Driver< real >, PLMD::cltools::CLToolSumHills, PLMD::ves::MD_LinearExpansionPES, PLMD::cltools::PdbRenumber, PLMD::cltools::PesMD, PLMD::cltools::SimpleMD, PLMD::cltools::GenExample, PLMD::cltools::Manual, PLMD::cltools::Completion, PLMD::cltools::GenTemplate, PLMD::cltools::kt, PLMD::cltools::Info, PLMD::mapping::PathTools, and PLMD::cltools::Driver< real >.
|
protected |
Crash the command line tool with an error.
|
inline |
|
pure virtual |
virtual function mapping to the specific main for each tool
Implemented in PLMD::cltools::SimpleMD, PLMD::cltools::PesMD, PLMD::ves::MD_LinearExpansionPES, PLMD::cltools::Driver< real >, PLMD::cltools::CLToolSumHills, PLMD::cltools::PdbRenumber, PLMD::cltools::GenExample, PLMD::cltools::Manual, PLMD::cltools::Completion, PLMD::cltools::GenTemplate, PLMD::cltools::kt, PLMD::cltools::Info, and PLMD::mapping::PathTools.
|
protected |
Get the value of one of the command line arguments.
|
protected |
Find out whether one of the command line flags is present or not.
|
protected |
|
private |
Read the arguments from the command line.
bool PLMD::CLTool::readInput | ( | int | argc, |
char ** | argv, | ||
FILE * | in, | ||
FILE * | out | ||
) |
Read the arguments from the command line.
|
private |
Read the arguments from an input file specified on the command line.
|
static |
Create the help keywords.
|
inline |
Set the input data:
|
private |
Set arguments from the default options provided to Keywords.
|
private |
The data read in from the command line stored in a map with the keywords.
enum { ... } PLMD::CLTool::inputdata |
How is the input specified on the command line or in an input file.
|
private |
The name of this command line tool.
Hosted by GitHub | 1.8.17 |