CernVM-FS  2.12.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
publish::Command Class Referenceabstract

#include <command.h>

Inheritance diagram for publish::Command:

Classes

struct  Argument
 
class  Options
 
struct  Parameter
 

Public Types

typedef std::vector< ParameterParameterList
 

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
 

Detailed Description

Definition at line 20 of file command.h.

Member Typedef Documentation

Definition at line 92 of file command.h.

Constructor & Destructor Documentation

virtual publish::Command::~Command ( )
inlinevirtual

Definition at line 144 of file command.h.

Member Function Documentation

virtual std::vector<std::string> publish::Command::DoGetExamples ( ) const
inlineprotectedvirtual

Example one-liners which get prepended by the command invocation

Reimplemented in publish::CmdTransaction, publish::CmdDiff, and publish::CmdAbort.

Definition at line 188 of file command.h.

virtual std::string publish::Command::GetBrief ( ) const
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().

Here is the caller graph for this function:

virtual std::string publish::Command::GetDescription ( ) const
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().

Here is the call graph for this function:

Here is the caller graph for this function:

std::string publish::Command::GetExamples ( ) const

Definition at line 23 of file command.cc.

Referenced by publish::CmdHelp::Main().

Here is the caller graph for this function:

virtual unsigned publish::Command::GetMinPlainArgs ( ) const
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.

Definition at line 167 of file command.h.

virtual std::string publish::Command::GetName ( ) const
pure virtual
virtual ParameterList publish::Command::GetParams ( ) const
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().

Here is the caller graph for this function:

virtual std::string publish::Command::GetUsage ( ) const
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().

Here is the caller graph for this function:

virtual bool publish::Command::IsHidden ( ) const
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.

Definition at line 172 of file command.h.

virtual int publish::Command::Main ( const Options options)
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().

Here is the caller graph for this function:

Command::Options publish::Command::ParseOptions ( int  argc,
char **  argv 
)

Definition at line 33 of file command.cc.

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

std::string publish::Command::progname ( ) const
inline

Definition at line 182 of file command.h.

Friends And Related Function Documentation

friend class CmdHelp
friend

Definition at line 21 of file command.h.

Member Data Documentation

std::string publish::Command::progname_
private

Definition at line 193 of file command.h.

Referenced by publish::CmdHelp::Main(), and progname().


The documentation for this class was generated from the following files: