.TH "kdb::Context" 3elektra "Tue Aug 19 2014" "Version 0.8.7" "Elektra" \" -*- nroff -*- .ad l .nh .SH NAME kdb::Context \- .PP Provides a context for configuration\&. .SH SYNOPSIS .br .PP .PP \fC#include \fP .PP Inherits kdb::Subject\&. .SS "Public Member Functions" .in +1c .ti -1c .RI "std::string \fBoperator[]\fP (std::string const &layer) const " .br .ti -1c .RI "void \fBattachByName\fP (std::string const &key_name, Observer &observer)" .br .ti -1c .RI "std::string \fBevaluate\fP (std::string const &key_name) const " .br .ti -1c .RI "std::string \fBevaluate\fP (std::string const &key_name, std::function< bool(std::string const &, std::string &, bool in_group)> const &on_layer) const " .br .ti -1c .RI "template void \fBactivate\fP (Args &&\&.\&.\&.args)" .br .RI "\fIGlobally activate the layer\&. \fP" .in -1c .SH "Detailed Description" .PP Provides a context for configuration\&. Is a subject for observers\&. .PP Holds currently active layers and allows global/scoped activation of layers\&. .SH "Member Function Documentation" .PP .SS "template void kdb::Context::activate (Args &&\&.\&.\&.args)\fC [inline]\fP" .PP Globally activate the layer\&. .PP \fBTemplate Parameters:\fP .RS 4 \fIT\fP the layer to activate .br \fIArgs\fP the types for the arguments to pass to layer construction .RE .PP \fBParameters:\fP .RS 4 \fIargs\fP the arguments to pass to layer construction .RE .PP .SS "void kdb::Context::attachByName (std::string const &key_name, Observer &observer)\fC [inline]\fP" Attach observer using to all events given by its specification (name) .PP \fBParameters:\fP .RS 4 \fIkey_name\fP the name with placeholders to be used for attaching .br \fIobserver\fP the observer to attach to .RE .PP .SS "std::string kdb::Context::evaluate (std::string const &key_name) const\fC [inline]\fP" Evaluate a specification (name) and return a key name under current context .PP \fBParameters:\fP .RS 4 \fIkey_name\fP the name with placeholders to be evaluated .RE .PP .SS "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\fC [inline]\fP" Evaluate specification with this context\&. .PP \fBParameters:\fP .RS 4 \fIkey_name\fP the keyname with placeholders to evaluate .br \fIon_layer\fP the function to be called for every placeholder found .RE .PP \fBon_layer is called for every layer in the\fP .RS 4 specification\&. .RE .PP .SS "std::string kdb::Context::operator[] (std::string const &layer) const\fC [inline]\fP" Lookup value for a current active layer .PP \fBParameters:\fP .RS 4 \fIlayer\fP the name of the requested layer .RE .PP .SH "Author" .PP Generated automatically by Doxygen for Elektra from the source code\&.