CernVM-FS  2.9.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
publish::Command::Parameter Struct Reference

#include <command.h>

Public Member Functions

 Parameter (const std::string &key)
 
 Parameter (const std::string &key, char short_key, const std::string &arg_name, const std::string &desc, bool is_switch, bool is_optional)
 
bool operator== (const Parameter &other) const
 
bool operator!= (const Parameter &other) const
 
bool operator< (const Parameter &other) const
 

Static Public Member Functions

static Parameter Mandatory (const std::string &key, char short_key, const std::string &arg_name, const std::string &desc)
 
static Parameter Optional (const std::string &key, char short_key, const std::string &arg_name, const std::string &desc)
 
static Parameter Switch (const std::string &key, char short_key, const std::string &desc)
 

Public Attributes

std::string key
 
char short_key
 
std::string arg_name
 
std::string description
 
bool is_switch
 
bool is_optional
 

Detailed Description

A parameter is information that can be passed by -$short_key or –$key to a command. Parameters can be boolean switches (they have no arguments). If they have an argument, parameters can be required for the command or optional.

Definition at line 30 of file command.h.

Constructor & Destructor Documentation

publish::Command::Parameter::Parameter ( const std::string &  key)
inlineexplicit

This constructor should only be used for objects that are meant for comparison with / search of existing parameters.

Definition at line 35 of file command.h.

Referenced by Mandatory(), Optional(), and Switch().

Here is the caller graph for this function:

publish::Command::Parameter::Parameter ( const std::string &  key,
char  short_key,
const std::string &  arg_name,
const std::string &  desc,
bool  is_switch,
bool  is_optional 
)
inline

Definition at line 44 of file command.h.

Here is the call graph for this function:

Member Function Documentation

static Parameter publish::Command::Parameter::Mandatory ( const std::string &  key,
char  short_key,
const std::string &  arg_name,
const std::string &  desc 
)
inlinestatic

Definition at line 67 of file command.h.

Referenced by publish::CmdHash::GetParams().

Here is the call graph for this function:

Here is the caller graph for this function:

bool publish::Command::Parameter::operator!= ( const Parameter other) const
inline

Definition at line 64 of file command.h.

bool publish::Command::Parameter::operator< ( const Parameter other) const
inline

Definition at line 65 of file command.h.

bool publish::Command::Parameter::operator== ( const Parameter other) const
inline

Definition at line 63 of file command.h.

static Parameter publish::Command::Parameter::Optional ( const std::string &  key,
char  short_key,
const std::string &  arg_name,
const std::string &  desc 
)
inlinestatic

Definition at line 73 of file command.h.

Referenced by publish::CmdMkfs::GetParams(), publish::CmdHash::GetParams(), publish::CmdZpipe::GetParams(), publish::CmdInfo::GetParams(), publish::CmdEnter::GetParams(), publish::CmdTransaction::GetParams(), and publish::CmdDiff::GetParams().

Here is the call graph for this function:

Here is the caller graph for this function:

static Parameter publish::Command::Parameter::Switch ( const std::string &  key,
char  short_key,
const std::string &  desc 
)
inlinestatic

Definition at line 79 of file command.h.

Referenced by publish::CmdMkfs::GetParams(), publish::CmdZpipe::GetParams(), publish::CmdHash::GetParams(), publish::CmdInfo::GetParams(), publish::CmdEnter::GetParams(), publish::CmdAbort::GetParams(), and publish::CmdDiff::GetParams().

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

std::string publish::Command::Parameter::arg_name

Definition at line 87 of file command.h.

std::string publish::Command::Parameter::description

Definition at line 88 of file command.h.

bool publish::Command::Parameter::is_optional

Definition at line 90 of file command.h.

bool publish::Command::Parameter::is_switch

Definition at line 89 of file command.h.

std::string publish::Command::Parameter::key

Definition at line 85 of file command.h.

Referenced by operator!=(), operator<(), and operator==().

char publish::Command::Parameter::short_key

Definition at line 86 of file command.h.


The documentation for this struct was generated from the following file: