X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Utils%2FLogger%2FAreaRegistry.ih;fp=Utils%2FLogger%2FDefaults.hh;h=362c3f6411eee1769de23e307f480b86528033d6;hb=61419d9a2e1060f7ede22fa19fd9d0b401bbc87a;hp=a6d63407ac8e0760535fd5ef9cf196ea1db6a575;hpb=759310ea14e1fa1eb65f029762efa32d52539e59;p=senf.git diff --git a/Utils/Logger/Defaults.hh b/Utils/Logger/AreaRegistry.ih similarity index 58% rename from Utils/Logger/Defaults.hh rename to Utils/Logger/AreaRegistry.ih index a6d6340..362c3f6 100644 --- a/Utils/Logger/Defaults.hh +++ b/Utils/Logger/AreaRegistry.ih @@ -21,32 +21,46 @@ // 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. /** \file - \brief Defaults public header */ + \brief AreaRegistry internal header */ -#ifndef HH_Defaults_ -#define HH_Defaults_ 1 +#ifndef IH_AreaRegistry_ +#define IH_AreaRegistry_ 1 // Custom includes -#include "Stream.hh" -#include "Area.hh" +#include +#include -//#include "Defaults.mpp" -///////////////////////////////hh.p//////////////////////////////////////// +///////////////////////////////ih.p//////////////////////////////////////// namespace senf { namespace log { +namespace detail { - SENF_LOG_DEF_STREAM(Debug, MESSAGE, DISABLED, DISABLED); + class StreamBase; - SENF_LOG_DEF_AREA_I(DefaultArea, - std::string v_name() const { return ""; }); + /** \brief Internal: Area base class */ + struct AreaBase + { + virtual ~AreaBase() {}; + + std::string fullName() const; + virtual std::string v_name() const; -}} + void init(); -///////////////////////////////hh.e//////////////////////////////////////// -//#include "Defaults.cci" -//#include "Defaults.ct" -//#include "Defaults.cti" + unsigned streamLimit(StreamBase const & stream) const; + void setStreamLimit(StreamBase const & stream, unsigned value) const; + + private: + typedef std::vector StreamLimits; + // mutable since this is a cache and may therefore change at unexpected places ... + mutable StreamLimits streamLimits_; + }; + +}}} + + +///////////////////////////////ih.e//////////////////////////////////////// #endif