MessageImpl.h
Go to the documentation of this file.00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 
00021 
00029 #ifndef KEYVALUE_SYS_MESSAGEIMPL_H_
00030 #define KEYVALUE_SYS_MESSAGEIMPL_H_
00031 
00032 #include <boost/static_assert.hpp>
00033 
00034 #include "keyvalue/sys/message/Message.h"
00035 
00036 namespace keyvalue {
00037 
00060 template <unsigned int id>
00061 class MessageImpl : public Message {
00062 
00063 public:
00064 
00065   MessageImpl() : Message(0) {
00074     BOOST_STATIC_ASSERT(id < 2);
00075   }
00076 
00077   explicit
00078   MessageImpl(unsigned int level);
00079 
00085   const string&
00086   getPrefix() const;
00087 
00093   logger::Color
00094   getColor() const;
00095 
00096 private:
00097 
00098   
00099   Message&
00100   operator=(const MessageImpl& orig);
00101 
00102 }; 
00103 
00113 typedef MessageImpl<0> Error;
00114 
00124 typedef MessageImpl<1> Logic;
00125 
00135 typedef MessageImpl<2> Info;
00136 
00146 typedef MessageImpl<3> Warning;
00147 
00157 typedef MessageImpl<4> Report;
00158 
00168 typedef MessageImpl<5> Debug;
00169 
00170 } 
00171 
00172 #endif // KEYVALUE_SYS_MESSAGEIMPL_H_