![]() |
CernVM-FS
2.12.0
|
#include <command.h>
Classes | |
struct | Argument |
class | Options |
struct | Parameter |
Public Types | |
typedef std::vector< Parameter > | ParameterList |
Public Member Functions | |
virtual | ~Command () |
virtual std::string | GetName () const =0 |
virtual std::string | GetBrief () const =0 |
virtual std::string | GetDescription () const |
virtual ParameterList | GetParams () const =0 |
virtual std::string | GetUsage () const |
std::string | GetExamples () const |
virtual unsigned | GetMinPlainArgs () const |
virtual bool | IsHidden () const |
Options | ParseOptions (int argc, char **argv) |
virtual int | Main (const Options &options)=0 |
std::string | progname () const |
Protected Member Functions | |
virtual std::vector< std::string > | DoGetExamples () const |
Private Attributes | |
std::string | progname_ |
Friends | |
class | CmdHelp |
typedef std::vector<Parameter> publish::Command::ParameterList |
|
inlineprotectedvirtual |
Example one-liners which get prepended by the command invocation
Reimplemented in publish::CmdTransaction, publish::CmdDiff, and publish::CmdAbort.
|
pure virtual |
A one-line explanation of what the command does
Implemented in publish::CmdEnter, publish::CmdCommit, publish::CmdAbort, publish::CmdDiff, publish::CmdHelp, publish::CmdTransaction, publish::CmdHash, publish::CmdInfo, publish::CmdLsof, publish::CmdMkfs, and publish::CmdZpipe.
Referenced by GetDescription().
|
inlinevirtual |
An extended description of the functionality
Reimplemented in publish::CmdCommit, publish::CmdAbort, publish::CmdDiff, publish::CmdTransaction, publish::CmdHash, publish::CmdInfo, publish::CmdLsof, and publish::CmdZpipe.
Definition at line 157 of file command.h.
Referenced by publish::CmdHelp::Main().
std::string publish::Command::GetExamples | ( | ) | const |
Definition at line 23 of file command.cc.
Referenced by publish::CmdHelp::Main().
|
inlinevirtual |
The command needs at least so many non-parameter arguments (e.g. fqrn)
Reimplemented in publish::CmdMkfs, publish::CmdEnter, publish::CmdLsof, and publish::CmdHelp.
|
pure virtual |
Used to call the command as cvmfs_server $GetName() ...
Implemented in publish::CmdEnter, publish::CmdAbort, publish::CmdCommit, publish::CmdDiff, publish::CmdHelp, publish::CmdTransaction, publish::CmdHash, publish::CmdInfo, publish::CmdLsof, publish::CmdMkfs, and publish::CmdZpipe.
Referenced by publish::CmdHelp::Main(), and publish::CommandList::TakeCommand().
|
pure virtual |
Returns the ordered array of possible parameters to this command
Implemented in publish::CmdDiff, publish::CmdTransaction, publish::CmdAbort, publish::CmdEnter, publish::CmdCommit, publish::CmdInfo, publish::CmdLsof, publish::CmdHash, publish::CmdZpipe, publish::CmdHelp, and publish::CmdMkfs.
Referenced by publish::CmdHelp::Main().
|
inlinevirtual |
Reimplemented in publish::CmdMkfs, publish::CmdEnter, publish::CmdTransaction, publish::CmdDiff, publish::CmdCommit, publish::CmdAbort, publish::CmdInfo, publish::CmdLsof, and publish::CmdHelp.
Definition at line 162 of file command.h.
Referenced by publish::CmdHelp::Main().
|
inlinevirtual |
Internal commands can be added that will be omitted from the printed list of available commands. By default, commands are visible though.
Reimplemented in publish::CmdHash, publish::CmdZpipe, and publish::CmdLsof.
|
pure virtual |
The dictionary of passed arguments can be obtained by a call to ParseOptions()
Implemented in publish::CmdMkfs, publish::CmdDiff, publish::CmdTransaction, publish::CmdEnter, publish::CmdCommit, publish::CmdAbort, publish::CmdInfo, publish::CmdHash, publish::CmdZpipe, publish::CmdLsof, and publish::CmdHelp.
Referenced by main().
Command::Options publish::Command::ParseOptions | ( | int | argc, |
char ** | argv | ||
) |
Definition at line 33 of file command.cc.
Referenced by main().
|
private |
Definition at line 193 of file command.h.
Referenced by publish::CmdHelp::Main(), and progname().