A class of an attribute that holds stack of named scopes of the current thread. More...
#include <named_scope.hpp>


Classes | |
| struct | sentry |
| Sentry object class to automatically push and pop scopes. More... | |
Public Types | |
| typedef named_scope_list | value_type |
| Scope names stack (the attribute value type) More... | |
| typedef value_type::value_type | scope_entry |
| Scope entry. More... | |
Public Member Functions | |
| named_scope () | |
| Constructor. More... | |
| named_scope (cast_source const &source) | |
| Constructor for casting support. More... | |
| bool | operator! () const BOOST_NOEXCEPT |
| Verifies that the factory is not in empty state. More... | |
| attribute_value | get_value () const |
| void | swap (attribute &that) BOOST_NOEXCEPT |
| The method swaps two factories (i.e. More... | |
Static Public Member Functions | |
| static void | push_scope (scope_entry const &entry) BOOST_NOEXCEPT |
| The method pushes the scope to the back of the current thread's scope list. More... | |
| static void | pop_scope () BOOST_NOEXCEPT |
| The method pops the last pushed scope from the current thread's scope list. More... | |
| static value_type const & | get_scopes () |
Protected Member Functions | |
| impl * | get_impl () const BOOST_NOEXCEPT |
| void | set_impl (intrusive_ptr< impl > p) BOOST_NOEXCEPT |
| Sets the pointer to the factory implementation. More... | |
A class of an attribute that holds stack of named scopes of the current thread.
The basic_named_scope attribute is essentially a hook to the thread-specific instance of scope list. This means that the attribute will generate different values if get_value is called in different threads. The attribute generates value with stored type basic_named_scope_list< CharT >.
The attribute class can also be used to gain access to the scope stack instance, e.g. to get its copy or to push or pop a scope entry. However, it is highly not recommended to maintain scope list manually. Use BOOST_LOG_NAMED_SCOPE or BOOST_LOG_FUNCTION macros instead.
Scope entry.
Scope names stack (the attribute value type)
| boost::attributes::named_scope::named_scope | ( | ) |
Constructor.
Creates an attribute.
|
explicit |
Constructor for casting support.
|
inlineprotectedinherited |
References boost::intrusive_ptr< T >::get().
Referenced by boost::attribute_cast(), boost::attributes::constant< process_id >::get(), boost::attributes::mutable_constant< channel_type >::get_impl(), and boost::attributes::mutable_constant< T, void, void, void >::get_impl().
|
static |
push_scope or pop_scope is called). User has to copy the stack if he wants to keep it intact regardless of the execution scope. Referenced by boost::current_scope().
|
inherited |
|
inlineinherited |
Verifies that the factory is not in empty state.
Verifies that the factory is in empty state
|
static |
The method pops the last pushed scope from the current thread's scope list.
Throws: Nothing.
Referenced by boost::attributes::named_scope::sentry::~sentry().
|
static |
The method pushes the scope to the back of the current thread's scope list.
Throws: Nothing.
Referenced by boost::attributes::named_scope::sentry::sentry().
|
inlineprotectedinherited |
Sets the pointer to the factory implementation.
| p | Pointer to the implementation. Must not be NULL. |
References boost::multiprecision::backends::p, and boost::intrusive_ptr< T >::swap().
Referenced by boost::attributes::counter< T >::counter().
|
inlineinherited |
The method swaps two factories (i.e.
their implementations).
References boost::intrusive_ptr< T >::swap().
Referenced by boost::sources::aux::severity_level< severity_level >::operator=(), and boost::sources::basic_severity_logger< BaseT, LevelT >::swap_unlocked().