43 const std::string &
type()
const ;
48 const std::string &
name()
const ;
55 void setName(
const std::string &n ) ;
183 log<T>() <<
name() <<
" (" <<
type() <<
") parameters:" << std::endl ;
185 auto paramStr = iter.second->isSet() ? iter.second->str() : ( iter.second->hasDefault() ? iter.second->defaultStr() :
"[undefined]" ) ;
186 log<T>() << iter.first <<
" (" << iter.second->typeStr() <<
"): " << paramStr << std::endl ;
Logging::StreamType error() const
Shortcut for log<ERROR>()
std::string _type
The component type.
Configurable class Interface for configuring components in the framework.
Logging::StreamType debug() const
Shortcut for log<DEBUG>()
const std::string & name() const
Get the component name.
Application * _application
The application in which the component has been registered.
void setup(Application *app)
Setup the component.
void setName(const std::string &n)
Set the component name.
Component & operator=(const Component &)=delete
std::string _name
The component name.
void setParameters(const ConfigSection §ion, bool throwIfNotFound=false)
Set the parameters from the configuration section.
LoggerPtr _logger
The logger instance.
Logging::StreamType message() const
Shortcut for log<MESSAGE>()
Component()=delete
No default constructor.
const std::string & type() const
Get the component name.
Logger::element_type::stream_type StreamType
std::string _description
The component description.
void setDescription(const std::string &desc)
Set the component description.
const std::string & description() const
Get the component description.
Application class Base application interface for running a Marlin application.
Logging::StreamType log() const
Log a message with specific log level.
void setVerbosity(const std::string &level)
Set the verbosity level.
const Application & application() const
Get the application in which the component is registered.
bool isInitialized() const
Whether the component has been initialized.
StringParameter _verbosity
The verbosity level of the logger (parameter)
virtual ~Component()=default
Default destructor.
std::shared_ptr< streamlog::logstreamT< mutex_type > > Logger
const std::string & verbosity() const
Get the verbosity level.
Logging::Logger LoggerPtr
virtual void initialize()
Initialize the component.
ConfigSection class Holds a set of parameters and subsection.
void getParameters(ConfigSection §ion, const std::set< std::string > &exclude={}) const
Get the parameters from configurable object and populate the config section with. ...
void printParameters() const
Print the component parameters.
ParameterMap _parameters
The parameter map.
Logging::StreamType warning() const
Shortcut for log<WARNING>()