Skip to content
Snippets Groups Projects
Commit 1f47eb63 authored by Giovanni Bussi's avatar Giovanni Bussi
Browse files

Improved doc

parent 9c6796ba
No related branches found
No related tags found
No related merge requests found
......@@ -12,10 +12,12 @@ namespace PLMD{
class PlumedCommunicator;
/**
Interface to all the command-line tools.
Class providing access to command line tools.
This class just define an interface, and does not implement anything.
Inherits from this class to create a new command-line tool.
This class provides an interface using the "cmd()" syntax to all the
command-line tools. In this manner, it allows all the registered
tools to be called directly from a PlumedMain object using proper
commands. It is only accessed via the cmd() function.
*/
class CLToolMain:
public WithCmd
......@@ -31,7 +33,25 @@ public WithCmd
public:
CLToolMain();
~CLToolMain();
/// virtual function returning a one-line descriptor for the tool
/**
Send messages to the CLToolMain.
Messages are used to set the MPI communicator, input, output etc. See the CLToolMain.cpp
file for details. A typical usage is:
\verbatim
#include "CLToolMain.h"
int main(int argc,char**argv){
PLMD::CLToolMain cltoolMain;
cltoolMain.cmd("setArgc",&argc);
cltoolMain.cmd("setArgv",argv);
int ret;
cltoolMain.cmd("run",&ret);
return ret;
}
\endverbatim
This will run the tool registered with name argv[1] with options argv[2]...argv[argc-1].
*/
void cmd(const std::string& key,void*val=NULL);
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment