Template Class register_with_sink

Inheritance Relationships

Base Types

  • public rcppsw::er::client< register_with_sink< TMetricsManager, TSinkMixin, void > > (Template Class client)

  • public TSinkMixin

Class Documentation

template<typename TMetricsManager, typename TSinkMixin, typename TExtraArgsType = void>
class register_with_sink : public rcppsw::er::client<register_with_sink<TMetricsManager, TSinkMixin, void>>, public TSinkMixin

After enabled collectors have been parsed from an XML input file, register the enabled collectors with a base_manager or a class derived from it.

This class is a partial specialization which specializes the generic collector_registerer_impl, which can take an arbitrary # of types, to take a std::tuple which in turn takes an arbitrary # of types. This is a better design than simply having a class that takes an arbitrary # of types, because it makes it clearer that the template parameters are considered a single unit, and are NOT part of the constructor arguments for the class.

Public Types

using extra_args_type = typename std::conditional<std::is_same<TExtraArgsType, void>::value, std::tuple<int>, TExtraArgsType>::type
template<typename T>
using no_extra_args = typename std::is_same<T, void>

Public Functions

register_with_sink(const register_with_sink&) = default
inline register_with_sink(TMetricsManager *const manager, const creatable_collector_set &set, const extra_args_type &extra_args = {})

Initialize the registerer.

Parameters:
  • manager – The metrics manager to register the collectors with.

  • create_set – Definitions for all the possible collectors to create.

template<typename TSinkTypeWrapped, typename TConfig>
inline void operator()(const TSinkTypeWrapped&, const TConfig *config)
register_with_sink &operator=(const register_with_sink&) = default

Protected Functions

inline const creatable_collector_set &creatable_set(void) const
template<typename TCollector, typename TSink, typename U = TExtraArgsType, typename std::enable_if<!no_extra_args<U>::value, int>::type = 0>
inline bool do_register(const std::string &scoped_name, collector_registration_spec<TSink> &&spec)
template<typename TCollector, typename TSink, typename U = TExtraArgsType, typename std::enable_if<no_extra_args<U>::value, int>::type = 0>
inline bool do_register(const std::string &scoped_name, collector_registration_spec<TSink> &&spec)
inline TMetricsManager *manager(void) const