56 #ifndef _RNR_CMD_DEF_H 57 #define _RNR_CMD_DEF_H 127 bool isDefined()
const;
245 void setUid(
const int uid);
252 void setName(
const std::string &strName);
263 void addHelp(
const char *sSynopsis,
const char *sLongDesc);
265 void addHelp(
const std::string &strSynopsis,
266 const std::string &strLongDesc);
296 #endif // _RNR_CMD_DEF_H
CmdFormDef & formAt(const int nIndex)
Get command modifiable form at index.
Command line extended argument interface.
void reset()
Reset command definition to pre-compiled state.
const CmdFormDef & operator[](const int nIndex) const
Index operator.
std::string m_strSynopsis
short command synopsis
int getUid() const
Get command's unique id.
int m_nUid
command unique id
virtual ~CmdDef()
Destructor.
std::string m_strLongDesc
long command description
const std::string & getSynopsis() const
Return command's synopsis.
const CmdFormDef & at(const int nIndex) const
Get command form at index.
CmdDef()
Default constructor.
Of string spaces and their strangian operators.
Compiled command definition class.
std::string m_strName
command name
std::string m_strSyntax
parsable command extended usage syntax
CmdDef & operator=(const CmdDef &rhs)
Assignment operator.
void addHelp(const char *sSynopsis, const char *sLongDesc)
Add help to command.
Command line argument definition class interface.
void setName(const std::string &strName)
Set command's name.
const std::string & getName() const
Return command's name.
void pushForm(CmdFormDef &formdef)
Push new command form to end of form list.
const std::string & getLongDesc() const
Return command's long description.
void setUid(const int uid)
Set command's unique id.
Command line core data types.
std::vector< CmdFormDef > CmdFormDefVec
vector of command forms
int numOfForms() const
Get the total number command forms.
const std::string & getSyntax() const
Return command's syntax usage.
friend std::ostream & operator<<(std::ostream &os, const CmdDef &cmddef)
Insert object into output stream.
CmdFormDefVec m_formDefs
vector of command forms