Seastar
High performance C++ framework for concurrent servers
Public Member Functions | List of all members
seastar::program_options::options_mutator Class Referenceabstract

Detailed Description

Visitor interface option_group::mutate().

See option_group::mutate() for more details on the visiting algorithm.

#include <seastar/util/program-options.hh>

Public Member Functions

virtual bool visit_group_start (const std::string &name, bool used)=0
 
virtual void visit_group_end ()=0
 
virtual bool visit_value_metadata (const std::string &name, bool used)=0
 
virtual bool visit_value ()=0
 Visit a switch (value<std::monostate>), switch is set to returned value.
 
virtual bool visit_value (bool &val)=0
 Visit and optionally mutate a value (value), should return true if value was mutated.
 
virtual bool visit_value (int &val)=0
 Visit a value (value), default_val is null when value has no default.
 
virtual bool visit_value (unsigned &val)=0
 Visit and optionally mutate a value (value), should return true if value was mutated.
 
virtual bool visit_value (float &val)=0
 Visit and optionally mutate a value (value), should return true if value was mutated.
 
virtual bool visit_value (double &val)=0
 Visit and optionally mutate a value (value), should return true if value was mutated.
 
virtual bool visit_value (std::string &val)=0
 Visit and optionally mutate a value (value), should return true if value was mutated.
 
virtual bool visit_value (std::set< unsigned > &val)=0
 Visit and optionally mutate a value (value), should return true if value was mutated.
 
virtual bool visit_value (log_level &val)=0
 Visit and optionally mutate a value (value), should return true if value was mutated.
 
virtual bool visit_value (logger_timestamp_style &val)=0
 Visit and optionally mutate a value (value), should return true if value was mutated.
 
virtual bool visit_value (logger_ostream_type &val)=0
 Visit and optionally mutate a value (value), should return true if value was mutated.
 
virtual bool visit_value (memory::alloc_failure_kind &val)=0
 Visit and optionally mutate a value (value), should return true if value was mutated.
 
virtual bool visit_value (std::unordered_map< sstring, log_level > &val)=0
 Visit and optionally mutate a value (value), should return true if value was mutated.
 
virtual bool visit_selection_value (const std::vector< std::string > &candidate_names, std::size_t &selected_candidate)=0
 Visit and optionally mutate a selection value (selection_value), should return true if value was mutated.
 

Member Function Documentation

◆ visit_group_end()

virtual void seastar::program_options::options_mutator::visit_group_end ( )
pure virtual

Visit the end of the group.

Called after all values and nested groups were visited in the current group.

◆ visit_group_start()

virtual bool seastar::program_options::options_mutator::visit_group_start ( const std::string &  name,
bool  used 
)
pure virtual

Visit the start of the group.

Called when entering a group. Groups can be nested, in which case there will be another call to this method, before the current groups is closed.

Returns
whether visitor is interested in the group: true - visit, false - skip.

◆ visit_value_metadata()

virtual bool seastar::program_options::options_mutator::visit_value_metadata ( const std::string &  name,
bool  used 
)
pure virtual

Visit value metadata, common across all value types.

Called at the start of visiting a value. After this, a call to the appropriate visit_value() overload (or visit_selection_value()) follows.

Returns
whether visitor is interested in the value: true - visit, false - skip.

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