---
title: "droption_t< T > Class Template Reference"
layout: default
permalink: /classdroption__t.html
---
#include <droption.h>
Inherits droption_parser_t.
|
| 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) |
|
| droption_t (unsigned int scope, std::vector< std::string > names, T defval, std::string desc_short, std::string desc_long) |
|
| droption_t (unsigned int scope, std::vector< std::string > names, unsigned int flags, T defval, std::string desc_short, std::string desc_long) |
|
| droption_t (unsigned int scope, std::vector< std::string > names, unsigned int flags, std::string valsep, T defval, std::string desc_short, std::string desc_long) |
|
| droption_t (unsigned int scope, std::vector< std::string > names, T defval, T minval, T maxval, std::string desc_short, std::string desc_long) |
|
T | get_value () const |
|
void | clear_value () override |
|
std::string | get_value_separator () const |
|
void | set_value (T new_value) |
|
bool | specified () |
|
std::string | get_name () |
|
|
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="----------\n", std::string post_name="\n", std::string pre_value="", std::string post_value="\n", std::string pre_desc="", std::string post_desc="\n") |
|
static void | clear_values () |
|
template<typename T>
class droption_t< T >
Option class for declaring new options.
◆ droption_t() [1/8]
template<typename T >
droption_t< T >::droption_t |
( |
unsigned int |
scope, |
|
|
std::string |
name, |
|
|
T |
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/8]
template<typename T >
droption_t< T >::droption_t |
( |
unsigned int |
scope, |
|
|
std::string |
name, |
|
|
unsigned int |
flags, |
|
|
T |
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/8]
template<typename T >
droption_t< T >::droption_t |
( |
unsigned int |
scope, |
|
|
std::string |
name, |
|
|
unsigned int |
flags, |
|
|
std::string |
valsep, |
|
|
T |
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/8]
template<typename T >
droption_t< T >::droption_t |
( |
unsigned int |
scope, |
|
|
std::string |
name, |
|
|
T |
defval, |
|
|
T |
minval, |
|
|
T |
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.
◆ droption_t() [5/8]
template<typename T >
droption_t< T >::droption_t |
( |
unsigned int |
scope, |
|
|
std::vector< std::string > |
names, |
|
|
T |
defval, |
|
|
std::string |
desc_short, |
|
|
std::string |
desc_long |
|
) |
| |
|
inline |
Declares a new option of type T with the given scope, list of alternative names, default value, and description in short and long forms.
◆ droption_t() [6/8]
template<typename T >
droption_t< T >::droption_t |
( |
unsigned int |
scope, |
|
|
std::vector< std::string > |
names, |
|
|
unsigned int |
flags, |
|
|
T |
defval, |
|
|
std::string |
desc_short, |
|
|
std::string |
desc_long |
|
) |
| |
|
inline |
Declares a new option of type T with the given scope, list of alternative names, behavior flags, default value, and description in short and long forms.
◆ droption_t() [7/8]
template<typename T >
droption_t< T >::droption_t |
( |
unsigned int |
scope, |
|
|
std::vector< std::string > |
names, |
|
|
unsigned int |
flags, |
|
|
std::string |
valsep, |
|
|
T |
defval, |
|
|
std::string |
desc_short, |
|
|
std::string |
desc_long |
|
) |
| |
|
inline |
Declares a new option of type T with the given scope, list of alternative names, behavior flags, accumulated value separator (see DROPTION_FLAG_ACCUMULATE), default value, and description in short and long forms. The first listed name is considered the primary name; the others are aliases.
◆ droption_t() [8/8]
template<typename T >
droption_t< T >::droption_t |
( |
unsigned int |
scope, |
|
|
std::vector< std::string > |
names, |
|
|
T |
defval, |
|
|
T |
minval, |
|
|
T |
maxval, |
|
|
std::string |
desc_short, |
|
|
std::string |
desc_long |
|
) |
| |
|
inline |
Declares a new option of type T with the given scope, list of alternative names, default value, minimum and maximum values, and description in short and long forms.
◆ clear_value()
◆ get_value()
Returns the value of this option.
◆ get_value_separator()
template<typename T >
std::string droption_t< T >::get_value_separator |
( |
| ) |
const |
|
inline |
◆ set_value()
Sets the value of this option, overriding the command line.
The documentation for this class was generated from the following file:
- /home/runner/work/dynamorio/dynamorio/ext/droption/droption.h