X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Utils%2FLogger%2FTarget.cti;h=5d906ee52d84967b606d0489e13f95aa7c6ec471;hb=532240d72e09e19e57fac9bb55c2560b9c9e5b97;hp=8718906e5e7fa25d5fac80ec1fe57051bcb1aa7b;hpb=a1a6c76a214ad1935032826713cabaf9ac57bf07;p=senf.git diff --git a/Utils/Logger/Target.cti b/Utils/Logger/Target.cti index 8718906..5d906ee 100644 --- a/Utils/Logger/Target.cti +++ b/Utils/Logger/Target.cti @@ -38,98 +38,48 @@ #ifndef DOXYGEN -template +template prefix_ void senf::log::Target::route(action_t action, int index) { - route(&Stream::instance(), 0, NONE::value, action, index); + route(action, index); } -template -prefix_ void senf::log::Target:: -route(action_t action, int index, - typename boost::enable_if< boost::is_convertible >::type *) -{ - route(&Stream::instance(), 0, Level::value, action, index); -} - -template -prefix_ void senf::log::Target:: -route(action_t action, int index, - typename boost::enable_if< boost::is_convertible >::type *) -{ - route(&Stream::instance(), &Area::instance(), NONE::value, action, index); -} - -template -prefix_ void senf::log::Target:: -route(action_t action, int index, - typename boost::enable_if< boost::is_convertible >::type *) -{ - route(&Stream::instance(), &AreaClass::SENFLogArea::instance(), NONE::value, action, index); -} - -template -prefix_ void senf::log::Target:: -route(action_t action, int index, - typename boost::enable_if< boost::is_convertible >::type *) +template +prefix_ void senf::log::Target::route(action_t action, int index) { - route(&Stream::instance(), &Area::instance(), Level::value, action, index); + route(action, index); } -template -prefix_ void senf::log::Target:: -route(action_t action, int index, - typename boost::enable_if< boost::is_convertible >::type *) +template +prefix_ void senf::log::Target::route(action_t action, int index) { - route(&Stream::instance(), &AreaClass::SENFLogArea::instance(), Level::value, action, index); + typedef detail::RouteParameters Params; + route( detail::InstanceP::value(), + detail::InstanceP::value(), + Params::Level::value, + action, index); } -// senf::log::target::ununroute - -template +template prefix_ void senf::log::Target::unroute(action_t action) { - unroute(&Stream::instance(), 0, NONE::value, action); -} - -template -prefix_ void senf::log::Target:: -unroute(action_t action, - typename boost::enable_if< boost::is_convertible >::type *) -{ - unroute(&Stream::instance(), 0, Level::value, action); -} - -template -prefix_ void senf::log::Target:: -unroute(action_t action, - typename boost::enable_if< boost::is_convertible >::type *) -{ - unroute(&Stream::instance(), &Area::instance(), NONE::value, action); -} - -template -prefix_ void senf::log::Target:: -unroute(action_t action, - typename boost::enable_if< boost::is_convertible >::type *) -{ - unroute(&Stream::instance(), &AreaClass::SENFLogArea::instance(), NONE::value, action); + unroute(action); } -template -prefix_ void senf::log::Target:: -unroute(action_t action, - typename boost::enable_if< boost::is_convertible >::type *) +template +prefix_ void senf::log::Target::unroute(action_t action) { - unroute(&Stream::instance(), &Area::instance(), Level::value, action); + unroute(action); } -template -prefix_ void senf::log::Target:: -unroute(action_t action, - typename boost::enable_if< boost::is_convertible >::type *) +template +prefix_ void senf::log::Target::unroute(action_t action) { - unroute(&Stream::instance(), &AreaClass::SENFLogArea::instance(), Level::value, action); + typedef detail::RouteParameters Params; + unroute( detail::InstanceP::value(), + detail::InstanceP::value(), + Params::Level::value, + action); } #endif @@ -138,17 +88,11 @@ unroute(action_t action, // namespace senf::log::detail members template -prefix_ void senf::log::detail::write(std::string msg) +prefix_ void senf::log::detail::write(std::string const & msg) { TargetRegistry::instance().write(Stream::instance(), Area::instance(), Level::value, msg); } -template -prefix_ void senf::log::timeSource() -{ - timeSource(std::auto_ptr(new Source())); -} - ///////////////////////////////cti.e/////////////////////////////////////// #undef prefix_