X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Utils%2FLogger%2FTarget.cti;h=2312dc64f2c08e8a939e210c0541a2473bf715e9;hb=d6abda313f70c8a849c5e3f3bbfc12ce301789f1;hp=a61c70330322cc0c855507c2a329530dde3ea5c2;hpb=f6f670f2dbc82b77db29df6cd452f2b351b9662a;p=senf.git diff --git a/Utils/Logger/Target.cti b/Utils/Logger/Target.cti index a61c703..2312dc6 100644 --- a/Utils/Logger/Target.cti +++ b/Utils/Logger/Target.cti @@ -34,39 +34,100 @@ /////////////////////////////////////////////////////////////////////////// // senf::log::Target +// senf::log::Target::route + template -prefix_ void senf::log::Target::route(action_t action) +prefix_ void senf::log::Target::route(action_t action, int index) +{ + route(&Stream::instance(), 0, 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(), 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(), 0, NONE::value, action); + route(&Stream::instance(), &Area::instance(), NONE::value, action, index); } -template -prefix_ void senf::log::Target::route(action_t action) +template +prefix_ void senf::log::Target:: +route(action_t action, int index, + typename boost::enable_if< boost::is_convertible >::type *) { - route(&Stream::instance(), static_cast(0), action); + route(&Stream::instance(), &AreaClass::SENFLogArea::instance(), NONE::value, action, index); } template -prefix_ void senf::log::Target::route(action_t action) +prefix_ void senf::log::Target:: +route(action_t action, int index, + typename boost::enable_if< boost::is_convertible >::type *) +{ + route(&Stream::instance(), &Area::instance(), 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(), &AreaClass::SENFLogArea::instance(), Level::value, action, index); +} + +// senf::log::target::ununroute + +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 *) { - route(&Stream::instance(), &Area::instance(), Level::value, action); + unroute(&Stream::instance(), 0, Level::value, action); } -//////////////////////////////////////// -// private members +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); +} -template -prefix_ void senf::log::Target::route(detail::StreamBase const * stream, - detail::AreaBase const *, action_t action) +template +prefix_ void senf::log::Target:: +unroute(action_t action, + typename boost::enable_if< boost::is_convertible >::type *) { - route(stream, &Area::instance(), NONE::value, action); + unroute(&Stream::instance(), &Area::instance(), Level::value, action); } -template -prefix_ void senf::log::Target::route(detail::StreamBase const * stream, - detail::LevelBase const *, action_t action) +template +prefix_ void senf::log::Target:: +unroute(action_t action, + typename boost::enable_if< boost::is_convertible >::type *) { - route(stream, 0, Level::value, action); + unroute(&Stream::instance(), &AreaClass::SENFLogArea::instance(), Level::value, action); } ///////////////////////////////////////////////////////////////////////////