abstract_option Class Referenceabstract

#include <option_parser.h>

Inheritance diagram for abstract_option:
option< T >

Public Member Functions

 abstract_option (const std::string &flag, const std::string &help)
 
virtual ~abstract_option ()
 
virtual void set_value (const std::string &str)=0
 
virtual std::string get_value () const =0
 
const std::string & flag () const
 
const std::string & help () const
 

Detailed Description

Abstract option

Constructor & Destructor Documentation

abstract_option ( const std::string &  flag,
const std::string &  help 
)
inline

Constructor

Parameters
flagname of the flag without -- prefix
helpmessage describing the function of the flag
virtual ~abstract_option ( )
inlinevirtual

Destructor

Member Function Documentation

const std::string& flag ( ) const
inline

Get name of the flag

Returns
flag name
virtual std::string get_value ( ) const
pure virtual

Get the current value of the option

Returns
value as a string

Implemented in option< T >.

const std::string& help ( ) const
inline

Get help description of flag

Returns
description
virtual void set_value ( const std::string &  str)
pure virtual

Parses value from given string

Parameters
strvalue as a string

Implemented in option< T >.


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