X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Utils%2FLogger%2FTarget.cti;h=bad63ab45695f1f5daaa7617b85811f616148e04;hb=412024ed31a4ab4eaea7a4165a434f8efebee325;hp=2312dc64f2c08e8a939e210c0541a2473bf715e9;hpb=ac86c2bb40746fbedf70a19af3307e5da642b04a;p=senf.git diff --git a/Utils/Logger/Target.cti b/Utils/Logger/Target.cti index 2312dc6..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 @@ -23,7 +23,7 @@ /** \file \brief Target inline template implementation */ -//#include "Target.ih" +#include "Target.ih" // Custom includes #include "Levels.hh" @@ -36,105 +36,59 @@ // senf::log::Target::route -template -prefix_ void senf::log::Target::route(action_t action, int index) -{ - route(&Stream::instance(), 0, NONE::value, action, index); -} +#ifndef DOXYGEN -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 *) +template +prefix_ void senf::log::Target::route(action_t action, int index) { - route(&Stream::instance(), &AreaClass::SENFLogArea::instance(), 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 *) +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); + 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(), 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); + typedef detail::RouteParameters Params; + unroute( detail::InstanceP::value(), + detail::InstanceP::value(), + Params::Level::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(), Level::value, action); -} +#endif /////////////////////////////////////////////////////////////////////////// -// namespace senf::log members +// namespace senf::log::detail members template -prefix_ void senf::log::write(std::string msg) +prefix_ void senf::log::detail::write(std::string msg) { TargetRegistry::instance().write(Stream::instance(), Area::instance(), Level::value, msg); }