boost::logging::detail::default_cache_keeper< cache_type > Struct Template Reference

default implementation of keeping cache More...

Inheritance diagram for boost::logging::detail::default_cache_keeper< cache_type >:

List of all members.

Public Member Functions

bool is_cache_turned_off () const
virtual cache_type & cache ()

Detailed Description

template<class cache_type>
struct boost::logging::detail::default_cache_keeper< cache_type >

default implementation of keeping cache

(note : you can override the cache() functions, to implement your own cache keeping strategy)

Member Function Documentation

template<class cache_type>
bool boost::logging::detail::default_cache_keeper< cache_type >::is_cache_turned_off (  )  const [inline]

I've implemented this as a fast "is turned off" question.

that is, I want to avoid calling cache().is_cache_turned_off(), since calling cache() involves a virtual call

template<class cache_type>
virtual cache_type& boost::logging::detail::default_cache_keeper< cache_type >::cache (  )  [inline, virtual]

note: this call does not need to be very efficient, since the cache is used seldom, only at the beginning of the app, when the logging hasn't yet been initialized thus, we can afford to make it virtual, and the code will become easier

Reimplemented in boost::logging::forward_to_logger< gather_msg, write_msg >, boost::logging::forward_to_logger< boost::logging::detail::format_find_gather< gather >::unsigned int, write_type >, boost::logging::forward_to_logger< gather_msg, write_type >, and boost::logging::forward_to_logger< gather_msg, write_msg * >.

The documentation for this struct was generated from the following file:

Copyright John Torjo © 2007
Have a question/ suggestion/ comment? Send me feedback