OpenVPN 3 Core Library
|
#include <options.hpp>
Public Types | |
enum | { MULTILINE = 0x8000000 } |
enum | validate_status { STATUS_GOOD , STATUS_MULTILINE , STATUS_LENGTH } |
enum | render_flags { RENDER_TRUNC_64 = (1 << 0) , RENDER_PASS_FMT = (1 << 1) , RENDER_NUMBER = (1 << 2) , RENDER_BRACKET = (1 << 3) , RENDER_UNUSED = (1 << 4) } |
Public Member Functions | |
OPENVPN_UNTAGGED_EXCEPTION (RejectedException) | |
Option () | |
template<typename T , typename... Args> | |
Option (T first, Args... args) | |
void | min_args (const size_t n) const |
void | exact_args (const size_t n) const |
void | validate_arg (const size_t index, const size_t max_len) const |
bool | is_multiline () const |
std::string | printable_directive () const |
const std::string & | get (const size_t index, const size_t max_len) const |
std::string | get_optional (const size_t index, const size_t max_len) const |
std::string | get_default (const size_t index, const size_t max_len, const std::string &default_value) const |
const std::string * | get_ptr (const size_t index, const size_t max_len) const |
template<typename T > | |
T | get_num (const size_t idx) const |
template<typename T > | |
T | get_num (const size_t idx, const T default_value) const |
template<typename T > | |
T | get_num (const size_t idx, const T default_value, const T min_value, const T max_value) const |
template<typename T > | |
T | get_num (const size_t idx, const T min_value, const T max_value) const |
std::string | render (const unsigned int flags) const |
std::string | escape (const bool csv) const |
void | clear () |
size_t | size () const |
bool | empty () const |
void | push_back (const std::string &item) |
void | push_back (std::string &&item) |
void | reserve (const size_t n) |
void | resize (const size_t n) |
const std::string & | ref (const size_t i) const |
std::string & | ref (const size_t i) |
bool | operator== (const Option &other) const |
bool | operator!= (const Option &other) const |
void | remove_first (const size_t n_elements) |
void | touch (bool lightly=false) const |
void | enableWarnOnly () |
bool | warnonlyunknown () const |
bool | touched () const |
bool | touched_lightly () const |
std::string | err_ref () const |
void | set_meta (bool value=true) |
bool | meta () const |
Static Public Member Functions | |
static validate_status | validate (const std::string &str, const size_t max_len) |
static const char * | validate_status_description (const validate_status status) |
static void | validate_string (const std::string &name, const std::string &str, const size_t max_len) |
static void | escape_string (std::ostream &out, const std::string &term, const bool must_quote) |
Private Types | |
enum class | touchedState { NOT_TOUCHED , OPTION_OF_SAME_NAME_TOUCHED , TOUCHED } |
Private Member Functions | |
void | from_list (std::string arg) |
void | from_list (const char *arg) |
void | from_list (std::vector< std::string > arg) |
template<typename T , typename... Args> | |
void | from_list (T first, Args... args) |
template<typename T > | |
void | range_error (const size_t idx, const T min_value, const T max_value) const |
bool | must_quote_string (const std::string &str, const bool csv) const |
Private Attributes | |
volatile touchedState | touched_ = touchedState::NOT_TOUCHED |
bool | warn_only_if_unknown_ = false |
bool | meta_ = false |
std::vector< std::string > | data |
Definition at line 61 of file options.hpp.
anonymous enum |
Enumerator | |
---|---|
MULTILINE |
Definition at line 65 of file options.hpp.
Enumerator | |
---|---|
RENDER_TRUNC_64 | |
RENDER_PASS_FMT | |
RENDER_NUMBER | |
RENDER_BRACKET | |
RENDER_UNUSED |
Definition at line 81 of file options.hpp.
|
strongprivate |
Indicates that this option was used/consumed
Enumerator | |
---|---|
NOT_TOUCHED | |
OPTION_OF_SAME_NAME_TOUCHED | Indicates that another option with the same name was considered. Ie, the option was not used because another option with same overrode it |
TOUCHED | Option has be used |
Definition at line 498 of file options.hpp.
Enumerator | |
---|---|
STATUS_GOOD | |
STATUS_MULTILINE | |
STATUS_LENGTH |
Definition at line 73 of file options.hpp.
|
inline |
Definition at line 90 of file options.hpp.
|
inlineexplicit |
Definition at line 96 of file options.hpp.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlinestatic |
|
inline |
|
inlineprivate |
Definition at line 462 of file options.hpp.
|
inlineprivate |
|
inlineprivate |
Definition at line 467 of file options.hpp.
|
inlineprivate |
Definition at line 473 of file options.hpp.
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 238 of file options.hpp.
|
inline |
Definition at line 247 of file options.hpp.
|
inline |
Definition at line 256 of file options.hpp.
|
inline |
|
inline |
|
inline |
Definition at line 153 of file options.hpp.
|
inline |
This option has been parsed from a meta options like
Definition at line 451 of file options.hpp.
|
inline |
|
inlineprivate |
openvpn::Option::OPENVPN_UNTAGGED_EXCEPTION | ( | RejectedException | ) |
|
inline |
Definition at line 367 of file options.hpp.
|
inline |
Definition at line 363 of file options.hpp.
|
inline |
|
inline |
|
inline |
Definition at line 339 of file options.hpp.
|
inlineprivate |
|
inline |
Definition at line 357 of file options.hpp.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Marks this option as parsed from a meta options like
Definition at line 441 of file options.hpp.
|
inline |
|
inline |
indicate that this option was processed
lightly | an option of the same name has been used |
Definition at line 385 of file options.hpp.
|
inline |
|
inline |
Definition at line 418 of file options.hpp.
|
inlinestatic |
|
inline |
|
inlinestatic |
|
inlinestatic |
|
inline |
Definition at line 405 of file options.hpp.
|
private |
Definition at line 513 of file options.hpp.
|
private |
Definition at line 512 of file options.hpp.
|
mutableprivate |
Definition at line 509 of file options.hpp.
|
private |
Definition at line 511 of file options.hpp.