table of contents
- unstable 0.8.14-5.1
kdb::Context(3elektra) | Elektra | kdb::Context(3elektra) |
NAME¶
kdb::Context - Provides a context for configuration.
SYNOPSIS¶
#include <kdbcontext.hpp>
Inherits kdb::Subject.
Inherited by kdb::ThreadContext.
Public Member Functions¶
std::string operator[] (std::string const &layer) const
Lookup value for a current active layer. size_t size () const
void attachByName (std::string const &key_name,
ValueObserver &observer)
Attach observer using to all events given by its specification (name)
std::string evaluate (std::string const &key_name) const
Evaluate a specification (name) and return a key name under current
context. std::string evaluate (std::string const &key_name,
std::function< bool(std::string const &, std::string &, bool
in_group)> const &on_layer) const
Evaluate specification with this context. template<typename T ,
typename... Args> std::shared_ptr< Layer > activate
(Args &&...args)
Globally activate the layer.
Detailed Description¶
Provides a context for configuration.
Is a subject for observers.
Holds currently active layers and allows global/scoped activation of layers.
Member Function Documentation¶
template<typename T , typename... Args> std::shared_ptr<Layer> kdb::Context::activate (Args &&... args) [inline]¶
Globally activate the layer.
Template Parameters:
Args the types for the arguments to pass to layer construction
Parameters:
void kdb::Context::attachByName (std::string const & key_name, ValueObserver & observer) [inline]¶
Attach observer using to all events given by its specification (name)
Parameters:
observer the observer to attach to
std::string kdb::Context::evaluate (std::string const & key_name) const [inline]¶
Evaluate a specification (name) and return a key name under current context.
Parameters:
std::string kdb::Context::evaluate (std::string const & key_name, std::function< bool(std::string const &, std::string &, bool in_group)> const & on_layer) const [inline]¶
Evaluate specification with this context.
Parameters:
on_layer the function to be called for every placeholder found
on_layer is called for every layer in the
Returns:
std::string kdb::Context::operator[] (std::string const & layer) const [inline]¶
Lookup value for a current active layer.
Parameters:
Returns:
size_t kdb::Context::size () const [inline]¶
Returns:
Author¶
Generated automatically by Doxygen for Elektra from the source code.
Sun May 29 2016 | Version 0.8.14 |