OpenVPN 3 Core Library
|
#include <options.hpp>
Classes | |
struct | FilterBase |
class | KeyValue |
struct | KeyValueList |
class | LexComment |
class | Limits |
Public Types | |
typedef RCPtr< OptionList > | Ptr |
typedef std::vector< unsigned int > | IndexList |
typedef std::unordered_map< std::string, IndexList > | IndexMap |
typedef std::pair< std::string, IndexList > | IndexPair |
typedef StandardLex | Lex |
Public Member Functions | |
OptionList () | |
template<typename T , typename... Args> | |
OptionList (T first, Args... args) | |
void | clear () |
void | parse_from_csv (const std::string &str, Limits *lim) |
void | parse_from_argv (const std::vector< std::string > &argv) |
void | parse_from_peer_info (const std::string &str, Limits *lim) |
void | parse_from_key_value_list (const KeyValueList &list, const std::string &meta_tag, Limits *lim) |
void | parse_from_config (const std::string &str, Limits *lim) |
void | parse_meta_from_config (const std::string &str, const std::string &tag, Limits *lim) |
void | extend (const OptionList &other, FilterBase *filt=nullptr) |
void | extend (OptionList &&other, FilterBase *filt=nullptr) |
unsigned int | extend (const OptionList &other, const std::string &name) |
void | extend_nonexistent (const OptionList &other) |
const Option * | get_ptr (const std::string &name) const |
const Option * | get_unique_ptr (const std::string &name) const |
const Option * | get_consistent (const std::string &name) const |
const Option & | get (const std::string &name) const |
const IndexList & | get_index (const std::string &name) const |
const IndexList * | get_index_ptr (const std::string &name) const |
std::string | cat (const std::string &name) const |
bool | exists_unique (const std::string &name) const |
bool | exists (const std::string &name) const |
const std::string & | get (const std::string &name, size_t index, const size_t max_len) const |
std::string | get_optional (const std::string &name, size_t index, const size_t max_len) const |
std::string | get_optional_relaxed (const std::string &name, size_t index, const size_t max_len) const |
std::string | get_optional_noexcept (const std::string &name, size_t index, const size_t max_len) const |
const char * | get_c_str (const std::string &name, size_t index, const size_t max_len) const |
std::string | get_default (const std::string &name, size_t index, const size_t max_len, const std::string &default_value) const |
std::string | get_default_relaxed (const std::string &name, size_t index, const size_t max_len, const std::string &default_value) const |
template<typename T > | |
T | get_num (const std::string &name, const size_t idx, const T default_value) const |
template<typename T > | |
T | get_num (const std::string &name, const size_t idx, const T default_value, const T min_value, const T max_value) const |
template<typename T > | |
T | get_num (const std::string &name, const size_t idx, const T min_value, const T max_value) const |
template<typename T > | |
T | get_num (const std::string &name, const size_t idx) const |
void | touch (const std::string &name) const |
std::string | render (const unsigned int flags) const |
std::string | render_csv () const |
std::string | render_map () const |
size_t | n_unused (bool ignore_meta=false) const |
size_t | meta_unused () const |
void | show_unused_options (const char *title=nullptr) const |
void | add_item (const Option &opt) |
const IndexMap & | map () const |
void | update_map () |
![]() | |
virtual | ~RCCopyable ()=default |
RCCopyable () noexcept=default | |
RCCopyable (const RCCopyable &) noexcept | |
Construct a new RCCopyable object. | |
RCCopyable (RCCopyable &&) noexcept | |
Construct a new RCCopyable object by move. | |
RCCopyable & | operator= (const RCCopyable &) noexcept |
Ensures the new ref count is not copied with the rest of the object. | |
RCCopyable & | operator= (RCCopyable &&) noexcept |
Ensures the new ref count is not moved with the rest of the object. | |
olong | use_count () const noexcept |
Returns the use count as reported by defering to the injected ref count type. | |
Static Public Member Functions | |
static bool | is_comment (const char c) |
static OptionList | parse_from_csv_static (const std::string &str, Limits *lim) |
static OptionList | parse_from_csv_static_nomap (const std::string &str, Limits *lim) |
static OptionList | parse_from_config_static (const std::string &str, Limits *lim) |
static OptionList::Ptr | parse_from_config_static_ptr (const std::string &str, Limits *lim) |
static OptionList | parse_from_argv_static (const std::vector< std::string > &argv) |
static Option | parse_option_from_line (const std::string &line, Limits *lim) |
static bool | ignore_line (const std::string &line) |
static bool | is_open_tag (const std::string &str) |
static bool | is_close_tag (const std::string &str, const std::string &tag) |
static void | untag_open_tag (std::string &str) |
static bool | detect_multiline_breakout_nothrow (const std::string &opt, const std::string &tag) |
static void | detect_multiline_breakout (const std::string &opt, const std::string &tag) |
Private Member Functions | |
void | from_list (Option opt) |
template<typename T , typename... Args> | |
void | from_list (T first, Args... args) |
Static Private Member Functions | |
static bool | is_open_meta_tag (const std::string &str) |
static bool | is_close_meta_tag (const std::string &str, const std::string &prefix, const std::string &tag) |
static void | untag_open_meta_tag (std::string &str) |
static void | extraneous_err (const int line_num, const char *type, const Option &opt) |
static void | not_closed_out_err (const char *type, const Option &opt) |
static void | line_too_long (const int line_num) |
Private Attributes | |
IndexMap | map_ |
Definition at line 516 of file options.hpp.
typedef std::vector<unsigned int> openvpn::OptionList::IndexList |
Definition at line 520 of file options.hpp.
typedef std::unordered_map<std::string, IndexList> openvpn::OptionList::IndexMap |
Definition at line 521 of file options.hpp.
typedef std::pair<std::string, IndexList> openvpn::OptionList::IndexPair |
Definition at line 522 of file options.hpp.
typedef StandardLex openvpn::OptionList::Lex |
Definition at line 530 of file options.hpp.
typedef RCPtr<OptionList> openvpn::OptionList::Ptr |
Definition at line 519 of file options.hpp.
|
inline |
|
inlineexplicit |
Definition at line 837 of file options.hpp.
|
inline |
|
inline |
|
inline |
|
inlinestatic |
|
inlinestatic |
|
inline |
|
inline |
Definition at line 1319 of file options.hpp.
|
inline |
Definition at line 1152 of file options.hpp.
|
inline |
|
inline |
Definition at line 1139 of file options.hpp.
|
inline |
|
inlinestaticprivate |
|
inlineprivate |
|
inlineprivate |
Definition at line 1692 of file options.hpp.
|
inline |
|
inline |
Definition at line 1333 of file options.hpp.
|
inline |
Definition at line 1375 of file options.hpp.
|
inline |
Definition at line 1228 of file options.hpp.
|
inline |
|
inline |
Definition at line 1400 of file options.hpp.
|
inline |
|
inline |
|
inline |
Definition at line 1449 of file options.hpp.
|
inline |
|
inline |
Definition at line 1427 of file options.hpp.
|
inline |
Definition at line 1442 of file options.hpp.
|
inline |
|
inline |
Definition at line 1362 of file options.hpp.
|
inline |
Definition at line 1352 of file options.hpp.
|
inline |
|
inline |
|
inlinestatic |
|
inlinestaticprivate |
|
inlinestatic |
|
inlinestatic |
|
inlinestaticprivate |
|
inlinestatic |
|
inlinestaticprivate |
|
inline |
|
inline |
Definition at line 1526 of file options.hpp.
|
inline |
|
inlinestaticprivate |
|
inline |
|
inlinestatic |
|
inline |
|
inlinestatic |
|
inlinestatic |
|
inline |
|
inlinestatic |
|
inlinestatic |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 1538 of file options.hpp.
|
inline |
|
inlinestaticprivate |
|
inlinestatic |
|
inline |
|
private |
Definition at line 1698 of file options.hpp.