EPICS ARCHIVER V4
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups
Public Member Functions | List of all members
CmdArg Class Referenceabstract

Base class for all arguments. More...

#include <ArgParser.h>

Inheritance diagram for CmdArg:
CmdArgDouble CmdArgFlag CmdArgInt CmdArgString

Public Member Functions

 CmdArg (CmdArgParser &args, const char *option, const char *arguments, const char *description)
 All arguments follow this schema: More...
 
size_t findMatches (const char *option) const
 Called with option (minus '-'), determine how many characters match.
 
void usage_option () const
 Show info on option for command line.
 
size_t option_size () const
 Get string length of option w/o description.
 
void usage (size_t tab) const
 Show option description.
 
virtual size_t parse (const char *arg)=0
 Parse arguments from current option. More...
 

Detailed Description

Base class for all arguments.

See Also
CmdArgFlag for boolean arguments,
CmdArgDouble for double arguments etc.

Constructor & Destructor Documentation

CmdArg::CmdArg ( CmdArgParser args,
const char *  option,
const char *  arguments,
const char *  description 
)

All arguments follow this schema:

Parameters
argsspecifies the CmdArgParser,
optionis the (long) option string, excluding the '-',
arguments
descriptionis the one-line description.

Member Function Documentation

virtual size_t CmdArg::parse ( const char *  arg)
pure virtual

Parse arguments from current option.

args: following arg Result: 0: error 1: option ok, no argument needed 2: option ok, argument swallowed

Implemented in CmdArgString, CmdArgDouble, CmdArgInt, and CmdArgFlag.


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