JayBeams  0.1
Another project to have fun coding.
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
jb::config_object::attribute_base Class Referenceabstract

Define the interface to manipulate and access configuration attributes embedded in a config_object. More...

#include <config_object.hpp>

Inheritance diagram for jb::config_object::attribute_base:
jb::config_attribute< jb::book_depth_statistics::config, book_depth_t > jb::config_attribute< jb::itch5::array_based_order_book::config, int > jb::config_attribute< jb::itch5::mold_udp_pacer_config, int > jb::config_attribute< jb::itch5::udp_config_common, bool > jb::config_attribute< jb::itch5::udp_config_common, int > jb::config_attribute< jb::itch5::udp_receiver_config, int > jb::config_attribute< jb::itch5::udp_receiver_config, std::string > jb::config_attribute< jb::itch5::udp_sender_config, bool > jb::config_attribute< jb::itch5::udp_sender_config, int > jb::config_attribute< jb::itch5::udp_sender_config, std::string > jb::config_attribute< jb::log::config, bool > jb::config_attribute< jb::log::config, jb::severity_level > jb::config_attribute< jb::log::config, long > jb::config_attribute< jb::log::config, std::string > jb::config_attribute< jb::offline_feed_statistics::config, int > jb::config_attribute< jb::offline_feed_statistics::config, std::int64_t > jb::config_attribute< jb::opencl::config, std::string > jb::config_attribute< jb::opencl::microbenchmark_config, jb::log::config > jb::config_attribute< jb::opencl::microbenchmark_config, jb::opencl::config > jb::config_attribute< jb::opencl::microbenchmark_config, jb::testing::microbenchmark_config > jb::config_attribute< jb::testing::microbenchmark_config, bool > jb::config_attribute< jb::testing::microbenchmark_config, int > jb::config_attribute< jb::testing::microbenchmark_config, jb::thread_config > jb::config_attribute< jb::testing::microbenchmark_config, std::string > jb::config_attribute< jb::thread_config, bool > jb::config_attribute< jb::thread_config, jb::cpu_set > jb::config_attribute< jb::thread_config, std::string > jb::config_attribute< program_config, std::vector< std::string > > jb::config_attribute< program_config, std::vector< worker_config > > jb::config_attribute< thread_config, int > jb::config_attribute< thread_config, std::string > jb::config_attribute< worker_config, std::string > jb::config_attribute< worker_config, thread_config > jb::config_attribute< C, T >

Public Member Functions

virtual ~attribute_base ()=0
 Destructor. More...
 
virtual void apply_overrides (YAML::Node const &by_name, class_overrides const &by_class)=0
 Apply any overrides set in the YAML document. More...
 
virtual void add_options (boost::program_options::options_description &options, std::string const &prefix, attribute_descriptor const &d) const =0
 Apply the necessary command-line options to the descriptors. More...
 
virtual void apply_cmdline_values (boost::program_options::variables_map const &vm, std::string const &name)=0
 Apply any overrides set in the command-line flags. More...
 
virtual void validate () const =0
 Validate the attribute, mostly a no-op except for embedded config_objects. More...
 
virtual YAML::Node to_yaml () const =0
 Convert to a YAML Node, useful to dump the configuration. More...
 
attribute_descriptor const & descriptor () const
 
std::string const & name () const
 
std::string const & class_name () const
 
std::string const & help () const
 
bool positional () const
 

Protected Member Functions

 attribute_base (attribute_descriptor const &d, config_object *container)
 Constructor. More...
 
template<typename container_type >
 attribute_base (container_type *)
 

Private Attributes

attribute_descriptor const descriptor_
 

Detailed Description

Define the interface to manipulate and access configuration attributes embedded in a config_object.

Definition at line 182 of file config_object.hpp.

Constructor & Destructor Documentation

◆ attribute_base() [1/2]

jb::config_object::attribute_base::attribute_base ( attribute_descriptor const &  d,
config_object container 
)
protected

Constructor.

Definition at line 190 of file config_object.cpp.

References jb::config_object::auto_register().

◆ attribute_base() [2/2]

template<typename container_type >
jb::config_object::attribute_base::attribute_base ( container_type *  )
inlineexplicitprotected

◆ ~attribute_base()

jb::config_object::attribute_base::~attribute_base ( )
pure virtual

Destructor.

Definition at line 196 of file config_object.cpp.

Member Function Documentation

◆ add_options()

virtual void jb::config_object::attribute_base::add_options ( boost::program_options::options_description &  options,
std::string const &  prefix,
attribute_descriptor const &  d 
) const
pure virtual

Apply the necessary command-line options to the descriptors.

Implemented in jb::config_attribute< C, T >, jb::config_attribute< jb::itch5::udp_config_common, int >, jb::config_attribute< jb::opencl::config, std::string >, jb::config_attribute< jb::testing::microbenchmark_config, std::string >, jb::config_attribute< jb::offline_feed_statistics::config, std::int64_t >, jb::config_attribute< jb::log::config, std::string >, jb::config_attribute< jb::book_depth_statistics::config, book_depth_t >, jb::config_attribute< jb::opencl::microbenchmark_config, jb::opencl::config >, jb::config_attribute< thread_config, int >, jb::config_attribute< jb::itch5::udp_sender_config, int >, jb::config_attribute< jb::log::config, bool >, jb::config_attribute< program_config, std::vector< std::string > >, jb::config_attribute< jb::thread_config, bool >, jb::config_attribute< thread_config, std::string >, jb::config_attribute< worker_config, std::string >, jb::config_attribute< jb::log::config, long >, jb::config_attribute< jb::itch5::array_based_order_book::config, int >, jb::config_attribute< jb::testing::microbenchmark_config, int >, jb::config_attribute< jb::offline_feed_statistics::config, int >, jb::config_attribute< jb::itch5::udp_receiver_config, int >, jb::config_attribute< worker_config, thread_config >, jb::config_attribute< jb::itch5::mold_udp_pacer_config, int >, jb::config_attribute< jb::itch5::udp_sender_config, std::string >, jb::config_attribute< jb::opencl::microbenchmark_config, jb::testing::microbenchmark_config >, jb::config_attribute< jb::log::config, jb::severity_level >, jb::config_attribute< jb::testing::microbenchmark_config, jb::thread_config >, jb::config_attribute< jb::opencl::microbenchmark_config, jb::log::config >, jb::config_attribute< jb::itch5::udp_receiver_config, std::string >, jb::config_attribute< jb::itch5::udp_sender_config, bool >, jb::config_attribute< program_config, std::vector< worker_config > >, jb::config_attribute< jb::thread_config, jb::cpu_set >, jb::config_attribute< jb::thread_config, std::string >, jb::config_attribute< jb::itch5::udp_config_common, bool >, and jb::config_attribute< jb::testing::microbenchmark_config, bool >.

◆ apply_cmdline_values()

virtual void jb::config_object::attribute_base::apply_cmdline_values ( boost::program_options::variables_map const &  vm,
std::string const &  name 
)
pure virtual

Apply any overrides set in the command-line flags.

Implemented in jb::config_attribute< C, T >, jb::config_attribute< jb::itch5::udp_config_common, int >, jb::config_attribute< jb::opencl::config, std::string >, jb::config_attribute< jb::testing::microbenchmark_config, std::string >, jb::config_attribute< jb::offline_feed_statistics::config, std::int64_t >, jb::config_attribute< jb::log::config, std::string >, jb::config_attribute< jb::book_depth_statistics::config, book_depth_t >, jb::config_attribute< jb::opencl::microbenchmark_config, jb::opencl::config >, jb::config_attribute< thread_config, int >, jb::config_attribute< jb::itch5::udp_sender_config, int >, jb::config_attribute< jb::log::config, bool >, jb::config_attribute< program_config, std::vector< std::string > >, jb::config_attribute< jb::thread_config, bool >, jb::config_attribute< thread_config, std::string >, jb::config_attribute< worker_config, std::string >, jb::config_attribute< jb::log::config, long >, jb::config_attribute< jb::itch5::array_based_order_book::config, int >, jb::config_attribute< jb::testing::microbenchmark_config, int >, jb::config_attribute< jb::offline_feed_statistics::config, int >, jb::config_attribute< jb::itch5::udp_receiver_config, int >, jb::config_attribute< worker_config, thread_config >, jb::config_attribute< jb::itch5::mold_udp_pacer_config, int >, jb::config_attribute< jb::itch5::udp_sender_config, std::string >, jb::config_attribute< jb::opencl::microbenchmark_config, jb::testing::microbenchmark_config >, jb::config_attribute< jb::log::config, jb::severity_level >, jb::config_attribute< jb::testing::microbenchmark_config, jb::thread_config >, jb::config_attribute< jb::opencl::microbenchmark_config, jb::log::config >, jb::config_attribute< jb::itch5::udp_receiver_config, std::string >, jb::config_attribute< jb::itch5::udp_sender_config, bool >, jb::config_attribute< program_config, std::vector< worker_config > >, jb::config_attribute< jb::thread_config, jb::cpu_set >, jb::config_attribute< jb::thread_config, std::string >, jb::config_attribute< jb::itch5::udp_config_common, bool >, and jb::config_attribute< jb::testing::microbenchmark_config, bool >.

◆ apply_overrides()

virtual void jb::config_object::attribute_base::apply_overrides ( YAML::Node const &  by_name,
class_overrides const &  by_class 
)
pure virtual

Apply any overrides set in the YAML document.

Implemented in jb::config_attribute< C, T >, jb::config_attribute< jb::itch5::udp_config_common, int >, jb::config_attribute< jb::opencl::config, std::string >, jb::config_attribute< jb::testing::microbenchmark_config, std::string >, jb::config_attribute< jb::offline_feed_statistics::config, std::int64_t >, jb::config_attribute< jb::log::config, std::string >, jb::config_attribute< jb::book_depth_statistics::config, book_depth_t >, jb::config_attribute< jb::opencl::microbenchmark_config, jb::opencl::config >, jb::config_attribute< thread_config, int >, jb::config_attribute< jb::itch5::udp_sender_config, int >, jb::config_attribute< jb::log::config, bool >, jb::config_attribute< program_config, std::vector< std::string > >, jb::config_attribute< jb::thread_config, bool >, jb::config_attribute< thread_config, std::string >, jb::config_attribute< worker_config, std::string >, jb::config_attribute< jb::log::config, long >, jb::config_attribute< jb::itch5::array_based_order_book::config, int >, jb::config_attribute< jb::testing::microbenchmark_config, int >, jb::config_attribute< jb::offline_feed_statistics::config, int >, jb::config_attribute< jb::itch5::udp_receiver_config, int >, jb::config_attribute< worker_config, thread_config >, jb::config_attribute< jb::itch5::mold_udp_pacer_config, int >, jb::config_attribute< jb::itch5::udp_sender_config, std::string >, jb::config_attribute< jb::opencl::microbenchmark_config, jb::testing::microbenchmark_config >, jb::config_attribute< jb::log::config, jb::severity_level >, jb::config_attribute< jb::testing::microbenchmark_config, jb::thread_config >, jb::config_attribute< jb::opencl::microbenchmark_config, jb::log::config >, jb::config_attribute< jb::itch5::udp_receiver_config, std::string >, jb::config_attribute< jb::itch5::udp_sender_config, bool >, jb::config_attribute< program_config, std::vector< worker_config > >, jb::config_attribute< jb::thread_config, jb::cpu_set >, jb::config_attribute< jb::thread_config, std::string >, jb::config_attribute< jb::itch5::udp_config_common, bool >, and jb::config_attribute< jb::testing::microbenchmark_config, bool >.

◆ class_name()

std::string const& jb::config_object::attribute_base::class_name ( ) const
inline

Definition at line 224 of file config_object.hpp.

◆ descriptor()

attribute_descriptor const& jb::config_object::attribute_base::descriptor ( ) const
inline

Definition at line 217 of file config_object.hpp.

◆ help()

std::string const& jb::config_object::attribute_base::help ( ) const
inline

Definition at line 227 of file config_object.hpp.

◆ name()

std::string const& jb::config_object::attribute_base::name ( ) const
inline

Definition at line 221 of file config_object.hpp.

◆ positional()

bool jb::config_object::attribute_base::positional ( ) const
inline

Definition at line 230 of file config_object.hpp.

◆ to_yaml()

virtual YAML::Node jb::config_object::attribute_base::to_yaml ( ) const
pure virtual

Convert to a YAML Node, useful to dump the configuration.

Implemented in jb::config_attribute< C, T >, jb::config_attribute< jb::itch5::udp_config_common, int >, jb::config_attribute< jb::opencl::config, std::string >, jb::config_attribute< jb::testing::microbenchmark_config, std::string >, jb::config_attribute< jb::offline_feed_statistics::config, std::int64_t >, jb::config_attribute< jb::log::config, std::string >, jb::config_attribute< jb::book_depth_statistics::config, book_depth_t >, jb::config_attribute< jb::opencl::microbenchmark_config, jb::opencl::config >, jb::config_attribute< thread_config, int >, jb::config_attribute< jb::itch5::udp_sender_config, int >, jb::config_attribute< jb::log::config, bool >, jb::config_attribute< program_config, std::vector< std::string > >, jb::config_attribute< jb::thread_config, bool >, jb::config_attribute< thread_config, std::string >, jb::config_attribute< worker_config, std::string >, jb::config_attribute< jb::log::config, long >, jb::config_attribute< jb::itch5::array_based_order_book::config, int >, jb::config_attribute< jb::testing::microbenchmark_config, int >, jb::config_attribute< jb::offline_feed_statistics::config, int >, jb::config_attribute< jb::itch5::udp_receiver_config, int >, jb::config_attribute< worker_config, thread_config >, jb::config_attribute< jb::itch5::mold_udp_pacer_config, int >, jb::config_attribute< jb::itch5::udp_sender_config, std::string >, jb::config_attribute< jb::opencl::microbenchmark_config, jb::testing::microbenchmark_config >, jb::config_attribute< jb::log::config, jb::severity_level >, jb::config_attribute< jb::testing::microbenchmark_config, jb::thread_config >, jb::config_attribute< jb::opencl::microbenchmark_config, jb::log::config >, jb::config_attribute< jb::itch5::udp_receiver_config, std::string >, jb::config_attribute< jb::itch5::udp_sender_config, bool >, jb::config_attribute< program_config, std::vector< worker_config > >, jb::config_attribute< jb::thread_config, jb::cpu_set >, jb::config_attribute< jb::thread_config, std::string >, jb::config_attribute< jb::itch5::udp_config_common, bool >, and jb::config_attribute< jb::testing::microbenchmark_config, bool >.

◆ validate()

virtual void jb::config_object::attribute_base::validate ( ) const
pure virtual

Validate the attribute, mostly a no-op except for embedded config_objects.

Implemented in jb::config_attribute< C, T >, jb::config_attribute< jb::itch5::udp_config_common, int >, jb::config_attribute< jb::opencl::config, std::string >, jb::config_attribute< jb::testing::microbenchmark_config, std::string >, jb::config_attribute< jb::offline_feed_statistics::config, std::int64_t >, jb::config_attribute< jb::log::config, std::string >, jb::config_attribute< jb::book_depth_statistics::config, book_depth_t >, jb::config_attribute< jb::opencl::microbenchmark_config, jb::opencl::config >, jb::config_attribute< thread_config, int >, jb::config_attribute< jb::itch5::udp_sender_config, int >, jb::config_attribute< jb::log::config, bool >, jb::config_attribute< program_config, std::vector< std::string > >, jb::config_attribute< jb::thread_config, bool >, jb::config_attribute< thread_config, std::string >, jb::config_attribute< worker_config, std::string >, jb::config_attribute< jb::log::config, long >, jb::config_attribute< jb::itch5::array_based_order_book::config, int >, jb::config_attribute< jb::testing::microbenchmark_config, int >, jb::config_attribute< jb::offline_feed_statistics::config, int >, jb::config_attribute< jb::itch5::udp_receiver_config, int >, jb::config_attribute< worker_config, thread_config >, jb::config_attribute< jb::itch5::mold_udp_pacer_config, int >, jb::config_attribute< jb::itch5::udp_sender_config, std::string >, jb::config_attribute< jb::opencl::microbenchmark_config, jb::testing::microbenchmark_config >, jb::config_attribute< jb::log::config, jb::severity_level >, jb::config_attribute< jb::testing::microbenchmark_config, jb::thread_config >, jb::config_attribute< jb::opencl::microbenchmark_config, jb::log::config >, jb::config_attribute< jb::itch5::udp_receiver_config, std::string >, jb::config_attribute< jb::itch5::udp_sender_config, bool >, jb::config_attribute< program_config, std::vector< worker_config > >, jb::config_attribute< jb::thread_config, jb::cpu_set >, jb::config_attribute< jb::thread_config, std::string >, jb::config_attribute< jb::itch5::udp_config_common, bool >, and jb::config_attribute< jb::testing::microbenchmark_config, bool >.

Member Data Documentation

◆ descriptor_

attribute_descriptor const jb::config_object::attribute_base::descriptor_
private

Definition at line 235 of file config_object.hpp.


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