salsa 0.7.1
Loading...
Searching...
No Matches
Salsa::ConfigZyre Class Reference

Base ConfigZyre class. More...

#include <ConfigZyre.hh>

Inheritance diagram for Salsa::ConfigZyre:
Salsa::Config Salsa::Object

Public Member Functions

 ConfigZyre ()
 
virtual ~ConfigZyre ()
 
std::shared_ptr< Salsa::Nodeapply (std::vector< std::shared_ptr< Salsa::ActorZmq > > *targetActors)
 
virtual bool load (std::string file)
 
void filter (std::string const &f)
 
virtual void print () const
 

Static Public Member Functions

static std::shared_ptr< spdlog::logger > getConsoleOutput ()
 Get console output.
 
static void setConsoleLevel (spdlog::level::level_enum level)
 Sets console log level.
 

Protected Attributes

YAML::Node mConfig
 YAML Configuration.
 
std::map< std::string, YAML::Node > mFilter {}
 Filter list.
 

Private Member Functions

void applyOptions (YAML::detail::iterator_value &src, YAML::Node &opt)
 
void findAndReplaceAll (std::string &data, std::string toSearch, std::string replaceStr)
 

Static Private Attributes

static std::shared_ptr< spdlog::logger > mspConsoleLogger = spdlog::stdout_color_mt("salsa")
 Pointer to spd logger.
 

Detailed Description

Constructor & Destructor Documentation

◆ ConfigZyre()

Salsa::ConfigZyre::ConfigZyre ( )

Constructor

Definition at line 5 of file ConfigZyre.cc.

◆ ~ConfigZyre()

Salsa::ConfigZyre::~ConfigZyre ( )
virtual

Destructor

Definition at line 12 of file ConfigZyre.cc.

Member Function Documentation

◆ apply()

std::shared_ptr< Salsa::Node > Salsa::ConfigZyre::apply ( std::vector< std::shared_ptr< Salsa::ActorZmq > > * targetActors)

◆ applyOptions()

void Salsa::ConfigZyre::applyOptions ( YAML::detail::iterator_value & src,
YAML::Node & opt )
private

Apply options

Definition at line 255 of file ConfigZyre.cc.

Referenced by apply().

◆ filter()

void Salsa::Config::filter ( std::string const & f)
inherited

Set Filter List

Definition at line 27 of file Config.cc.

References Salsa::Config::filter(), Salsa::Config::findAndReplaceAll(), and Salsa::Config::mFilter.

Referenced by apply(), and Salsa::Config::filter().

◆ findAndReplaceAll()

void Salsa::Config::findAndReplaceAll ( std::string & data,
std::string toSearch,
std::string replaceStr )
privateinherited

Replase all

Definition at line 69 of file Config.cc.

Referenced by Salsa::Config::filter().

◆ getConsoleOutput()

static std::shared_ptr< spdlog::logger > Salsa::Object::getConsoleOutput ( )
inlinestaticinherited

Get console output.

Definition at line 21 of file Object.hh.

References Salsa::Object::mspConsoleLogger.

Referenced by apply().

◆ load()

bool Salsa::Config::load ( std::string file)
virtualinherited

Load config file

Definition at line 17 of file Config.cc.

References Salsa::Config::mConfig.

◆ print()

void Salsa::Config::print ( ) const
virtualinherited

Prints config file

Definition at line 61 of file Config.cc.

References Salsa::Config::mConfig.

◆ setConsoleLevel()

static void Salsa::Object::setConsoleLevel ( spdlog::level::level_enum level)
inlinestaticinherited

Sets console log level.

Definition at line 29 of file Object.hh.

References Salsa::Object::mspConsoleLogger.

Member Data Documentation

◆ mConfig

YAML::Node Salsa::Config::mConfig
protectedinherited

YAML Configuration.

Definition at line 30 of file Config.hh.

Referenced by apply(), Salsa::Config::load(), and Salsa::Config::print().

◆ mFilter

std::map<std::string, YAML::Node> Salsa::Config::mFilter {}
protectedinherited

Filter list.

Definition at line 31 of file Config.hh.

Referenced by apply(), and Salsa::Config::filter().

◆ mspConsoleLogger

std::shared_ptr< spdlog::logger > Salsa::Object::mspConsoleLogger = spdlog::stdout_color_mt("salsa")
staticprivateinherited

Pointer to spd logger.

Definition at line 32 of file Object.hh.

Referenced by Salsa::Object::getConsoleOutput(), and Salsa::Object::setConsoleLevel().


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