X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Utils%2FLogger%2FTarget.cti;h=bad63ab45695f1f5daaa7617b85811f616148e04;hb=412024ed31a4ab4eaea7a4165a434f8efebee325;hp=0f7e287ff931018c53e0a975ead3e4337104bdd7;hpb=82ad2ed94c12c3e53097fef92978de8c28239fab;p=senf.git diff --git a/Utils/Logger/Target.cti b/Utils/Logger/Target.cti index 0f7e287..bad63ab 100644 --- a/Utils/Logger/Target.cti +++ b/Utils/Logger/Target.cti @@ -1,8 +1,8 @@ // $Id$ // -// Copyright (C) 2007 -// Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS) -// Kompetenzzentrum fuer NETwork research (NET) +// Copyright (C) 2007 +// Fraunhofer Institute for Open Communication Systems (FOKUS) +// Competence Center NETwork research (NET), St. Augustin, GERMANY // Stefan Bund // // This program is free software; you can redistribute it and/or modify @@ -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 @@ -143,12 +93,6 @@ prefix_ void senf::log::detail::write(std::string 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_