Simo 0.0.1
Loading...
Searching...
No Matches
Simo::Parameters Class Reference

Collects parameters that are then passed to a Module instance. More...

#include <Module.h>

Inheritance diagram for Simo::Parameters:
PingPongParameters Simo::Modules::Core::Collector::Parameters TestParameters

Public Member Functions

std::string_view name () const
void name (std::string_view name)
virtual bool check () const
template<typename T>
Parameter::ParameterTyped< T > & set (const std::string &name, const T &value)
 Create a new parameter with the given type and return a reference to it.
template<typename T>
Parameter::ParameterTyped< T > * get (const std::string &name) const
Parameter::Parameterget (const std::string &name) const
std::optional< Parametersget_subtree (const std::string &name) const

Protected Attributes

Parameter::ParameterTrie trie
std::string name_

Detailed Description

Collects parameters that are then passed to a Module instance.

Member Function Documentation

◆ check()

bool Simo::Parameters::check ( ) const
nodiscardvirtual

Implement checks on the set of parameters

The default behavior is that everything is fine

Reimplemented in TestParameters.

◆ get()

template<typename T>
Parameter::ParameterTyped< T > * Simo::Parameters::get ( const std::string & name) const
inlinenodiscard

Get a parameters with the given name.

nullptr is returned if the type does not match or there is no parameter with this name

◆ get_subtree()

std::optional< Parameters > Simo::Parameters::get_subtree ( const std::string & name) const
nodiscard

Get a set of parameters in a parameter subtree

Parameters are organized in a tree-like structure (a trie), so it is possible to fetch a part of if. Return std::nullopt if the name does not match anything


The documentation for this class was generated from the following files:
  • include/Simo/module/Module.h
  • src/module/Module.cc