Open Lighting Architecture  0.10.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | List of all members
ola::FlagInterface Class Referenceabstract

Detailed Description

The interface for the Flag classes.

Inheritance diagram for ola::FlagInterface:
Inheritance graph
[legend]

Public Member Functions

virtual const char * name () const =0
 Get the flag name.
 
virtual char short_opt () const =0
 Get the flag short option.
 
virtual bool has_arg () const =0
 Whether the flag requires an argument.
 
virtual const char * arg_type () const =0
 Get the flag argument type.
 
virtual std::string help () const =0
 Get the flag help string.
 
virtual bool present () const =0
 Check if the flag was present on the command line. Good for switching behaviour when a flag is used. More...
 
virtual bool SetValue (const std::string &input)=0
 Set the flag value. More...
 

Member Function Documentation

virtual bool ola::FlagInterface::present ( ) const
pure virtual

Check if the flag was present on the command line. Good for switching behaviour when a flag is used.

Returns
true if the flag was present, false otherwise

Implemented in ola::BaseFlag.

virtual bool ola::FlagInterface::SetValue ( const std::string &  input)
pure virtual

Set the flag value.

Parameters
inputthe input passed on the command line
Returns
true on success, false otherwise

Implemented in ola::Flag< std::string >, ola::Flag< bool >, and ola::Flag< T >.


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