libpressio 0.93.0
|
#include <configurable.h>
Public Member Functions | |
virtual const char * | prefix () const =0 |
std::string const & | get_name () const |
virtual void | set_name (std::string const &new_name) |
virtual void | set_name_impl (std::string const &new_name) |
virtual struct pressio_options | get_configuration () const |
virtual struct pressio_options | get_documentation () const |
virtual int | check_options (struct pressio_options const &) |
virtual struct pressio_options | get_options () const |
virtual int | set_options (struct pressio_options const &options) |
int | cast_options (pressio_options const &early_config, pressio_options const &config) |
Public Member Functions inherited from pressio_errorable | |
const char * | error_msg () const |
int | error_code () const |
Protected Member Functions | |
template<class StringType > | |
void | set (pressio_options &options, StringType const &key, pressio_option const &value) const |
template<class StringType > | |
void | set_type (pressio_options &options, StringType const &key, pressio_option_type type) const |
template<class StringType , class PointerType > | |
enum pressio_options_key_status | get (pressio_options const &options, StringType &&key, PointerType value) const |
template<class StringType , class Wrapper , class... Args> | |
void | set_meta (pressio_options &options, StringType &&key, std::string const ¤t_id, Wrapper const ¤t_value, Args &&... args) const |
template<class StringType , class Wrapper , class... Args> | |
void | set_meta_docs (pressio_options &options, StringType &&key, std::string const &docstring, Wrapper const ¤t_value, Args &&... args) const |
template<class StringType , class Wrapper , class Registry , class... Args> | |
void | set_meta_configuration (pressio_options &options, StringType &&key, Registry const ®istry, Wrapper const ¤t_value) const |
template<class StringType , class Wrapper , class Registry , class... Args> | |
void | set_meta_many_configuration (pressio_options &options, StringType &&key, Registry const ®istry, std::vector< Wrapper > const ¤t_values) const |
template<class StringType , class Wrapper , class... Args> | |
void | set_meta_many_docs (pressio_options &options, StringType &&key, std::string const &docstring, std::vector< Wrapper > const ¤t_values, Args &&... args) const |
template<class StringType , class Wrapper , class... Args> | |
void | set_meta_many (pressio_options &options, StringType &&key, std::vector< std::string > const ¤t_ids, std::vector< Wrapper > const ¤t_values, Args &&... args) const |
template<class StringType , class Registry , class Wrapper > | |
pressio_options_key_status | get_meta (pressio_options const &options, StringType &&key, Registry const ®istry, std::string ¤t_id, Wrapper ¤t_value) |
template<class StringType , class Registry , class Wrapper > | |
pressio_options_key_status | get_meta_many (pressio_options const &options, StringType &&key, Registry const ®istry, std::vector< std::string > ¤t_ids, std::vector< Wrapper > ¤t_values) |
template<class T > | |
void | set_names_many (std::string const &name, std::vector< T > &plugins, std::vector< std::string > const &names) const |
std::string | get_metrics_key_name () const |
Protected Member Functions inherited from pressio_errorable | |
int | set_error (int code, std::string const &msg) |
void | clear_error () |
Static Protected Member Functions | |
static pressio_thread_safety | get_threadsafe (pressio_configurable const &c) |
Protected Attributes | |
std::string | name |
Base interface for configurable objects in libpressio
|
virtual |
checks for extra arguments set for the configurable object.
Reimplemented in libpressio_io_plugin, and libpressio_compressor_plugin.
|
inlineprotected |
helper function to get the type of options according to name prefixes if provided
[in] | options | the options structure to set |
[in] | key | the key to set |
[in] | value | the value to get |
|
virtual |
get the compile time configuration of a configurable object
Reimplemented in libpressio_compressor_plugin, and libpressio_io_plugin.
|
virtual |
get the documentation strings for a compressor
Reimplemented in libpressio_metrics_plugin, libpressio_launch_plugin, pressio_distributed_manager, pressio_subgroup_manager, libpressio_compressor_plugin, and libpressio_io_plugin.
|
inlineprotected |
helper function to get from a pressio_options structure the values associated with a meta-object
[in] | options | the options to set |
[in] | key | the meta-key to query |
[in] | registry | the registry to construct new values from |
[in] | current_id | the id of the current module |
[in] | current_value | the wrapper for the current module |
|
inlineprotected |
helper function to get from a pressio_options structure the values associated with multiple meta-objects
[in] | options | the options to set |
[in] | key | the meta-key to query |
[in] | registry | the registry to construct new values from |
[in] | current_ids | the id of the current module |
[in] | current_values | the wrapper for the current module |
|
inlineprotected |
|
inline |
|
virtual |
get a set of options available for the configurable object.
The compressor should set a value if they have been set as default The compressor should set a "reset" value if they are required to be set, but don't have a meaningful default
include/ext/<my_plugin>
.h to define the structure used Reimplemented in pressio_distributed_manager, pressio_subgroup_manager, libpressio_compressor_plugin, and libpressio_io_plugin.
|
inlinestaticprotected |
|
pure virtual |
get the prefix used by this compressor for options
Implemented in pressio_distributed_manager, and pressio_subgroup_manager.
|
inlineprotected |
helper function to set options according to name prefixes if provided
[in] | options | the options structure to set |
[in] | key | the key to set |
[in] | value | the value to set |
|
inlineprotected |
helper function to set on a pressio_options structure the values associated with a meta-object
[in] | options | the options structure to set |
[in] | key | the key for the name of the child meta-object |
[in] | current_id | name for the current meta-object |
[in] | current_value | value of the current meta-object |
[in] | args | the remaining args needed for some meta modules |
|
inlineprotected |
helper function to set docs on a pressio_options structure the configuration associated with a meta-object
[in] | options | the options structure to set |
[in] | key | the key for the name of the child meta-object |
[in] | registry | docs for the purpose of the meta object |
[in] | current_value | value of the current meta-object |
[in] | args | the remaining args needed for some meta modules |
|
inlineprotected |
helper function to set docs on a pressio_options structure the values associated with a meta-object
[in] | options | the options structure to set |
[in] | key | the key for the name of the child meta-object |
[in] | docstring | docs for the purpose of the meta object |
[in] | current_value | value of the current meta-object |
[in] | args | the remaining args needed for some meta modules |
|
inlineprotected |
helper function to set on a pressio_options structure the values associated with a collection of meta-objects
[in] | options | the options structure to set |
[in] | key | the key for the name of the child meta-object |
[in] | current_ids | name for the current meta-object |
[in] | current_values | value of the current meta-object |
[in] | args | the remaining args needed for some meta modules |
|
inlineprotected |
helper function to set on a pressio_options structure the configuration associated with a collection of meta-objects
[in] | options | the options structure to set |
[in] | key | the key for the name of the child meta-object |
[in] | docstring | docs for the purpose of this collection of meta objects |
[in] | current_values | value of the current meta-object |
[in] | args | the remaining args needed for some meta modules |
|
inlineprotected |
helper function to set on a pressio_options structure the docs associated with a collection of meta-objects
[in] | options | the options structure to set |
[in] | key | the key for the name of the child meta-object |
[in] | docstring | docs for the purpose of this collection of meta objects |
[in] | current_values | value of the current meta-object |
[in] | args | the remaining args needed for some meta modules |
|
inlinevirtual |
sets the assigned name for the compressor used in options getting/setting
[in] | new_name | the name to be used |
Reimplemented in libpressio_io_plugin, libpressio_compressor_plugin, and libpressio_metrics_plugin.
|
inlinevirtual |
Meta-compressors need to know when names are changed so they can update their children
[in] | new_name | the name to be used |
|
inlineprotected |
Apply names to a set of plugins
[in] | name | the new name to apply to the plugins |
[in] | plugins | the list of plugins to rename |
[in] | names | the names to apply to the plugins, if empty, the prefix() will be used |
|
virtual |
sets a set of options for the configurable object
[in] | options | to set for configuration of the configurable object |
Reimplemented in pressio_subgroup_manager, pressio_distributed_manager, libpressio_compressor_plugin, and libpressio_io_plugin.
|
inlineprotected |
helper function to set the type of options according to name prefixes if provided
[in] | options | the options structure to set |
[in] | key | the key to set |
[in] | type | the type to set |
|
protected |
the name of the configurable used in nested hierarchies