DynamoRIO API
droption_t< T > Class Template Reference

#include <droption.h>

Inherits droption_parser_t.

Public Member Functions

 droption_t (unsigned int scope_, std::string name_, T defval_, std::string desc_short_, std::string desc_long_)
 
 droption_t (unsigned int scope_, std::string name_, unsigned int flags_, T defval_, std::string desc_short_, std::string desc_long_)
 
 droption_t (unsigned int scope_, std::string name_, unsigned int flags_, std::string valsep_, T defval_, std::string desc_short_, std::string desc_long_)
 
 droption_t (unsigned int scope_, std::string name_, T defval_, T minval_, T maxval_, std::string desc_short_, std::string desc_long_)
 
get_value () const
 
std::string get_value_separator () const
 
void set_value (T new_value)
 
- Public Member Functions inherited from droption_parser_t
bool specified ()
 
std::string get_name ()
 

Additional Inherited Members

- Static Public Member Functions inherited from droption_parser_t
static bool parse_argv (unsigned int scope, int argc, const char *argv[], std::string *error_msg, int *last_index)
 
static std::string usage_short (unsigned int scope)
 
static std::string usage_long (unsigned int scope, std::string pre_name="----------\, std::string post_name="\", std::string pre_value="", std::string post_value="\", std::string pre_desc="", std::string post_desc="\")
 

Detailed Description

template<typename T>
class droption_t< T >

Option class for declaring new options.

Constructor & Destructor Documentation

◆ droption_t() [1/4]

template<typename T>
droption_t< T >::droption_t ( unsigned int  scope_,
std::string  name_,
defval_,
std::string  desc_short_,
std::string  desc_long_ 
)
inline

Declares a new option of type T with the given scope, default value, and description in short and long forms.

◆ droption_t() [2/4]

template<typename T>
droption_t< T >::droption_t ( unsigned int  scope_,
std::string  name_,
unsigned int  flags_,
defval_,
std::string  desc_short_,
std::string  desc_long_ 
)
inline

Declares a new option of type T with the given scope, behavior flags, default value, and description in short and long forms.

◆ droption_t() [3/4]

template<typename T>
droption_t< T >::droption_t ( unsigned int  scope_,
std::string  name_,
unsigned int  flags_,
std::string  valsep_,
defval_,
std::string  desc_short_,
std::string  desc_long_ 
)
inline

Declares a new option of type T with the given scope, behavior flags, accumulated value separator (see DROPTION_FLAG_ACCUMULATE), default value, and description in short and long forms.

◆ droption_t() [4/4]

template<typename T>
droption_t< T >::droption_t ( unsigned int  scope_,
std::string  name_,
defval_,
minval_,
maxval_,
std::string  desc_short_,
std::string  desc_long_ 
)
inline

Declares a new option of type T with the given scope, default value, minimum and maximum values, and description in short and long forms.

Member Function Documentation

◆ get_value()

template<typename T>
T droption_t< T >::get_value ( ) const
inline

Returns the value of this option.

◆ get_value_separator()

template<typename T>
std::string droption_t< T >::get_value_separator ( ) const
inline

Returns the separator of the option value (see DROPTION_FLAG_ACCUMULATE).

◆ set_value()

template<typename T>
void droption_t< T >::set_value ( new_value)
inline

Sets the value of this option, overriding the command line.


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