2 #ifndef _loglevels_hpp_ 3 #define _loglevels_hpp_ 11 void insert ( std::ostream& aStr ,
const U& aU )
21 #define log_insert_warning warning 23 #define log_insert_warning deprecated 26 __attribute__ ( (
log_insert_warning (
"Insertion of integer types can result in implicit casts. Consider using the Integer() formatter instead" ) ) )
27 void
insert (
std::ostream& aStr , const uint32_t& aUint ) ;
29 __attribute__ ( (
log_insert_warning ( "Insertion of integer types can result in implicit casts. Consider using the
Integer() formatter instead" ) ) )
30 void insert (
std::ostream& aStr , const int32_t& aInt );
32 __attribute__ ( (
log_insert_warning ( "Insertion of
boolean types can result in implicit casts. Consider using the Boolean() formatter instead" ) ) )
33 void insert (
std::ostream& aStr , const
bool& aBool );
39 template<
typename T >
43 typedef void ( *fPtr ) ( std::ostream& aStr );
45 BaseLogLevel ( std::ostream& aStr , fPtr aHeadFunction , fPtr aTailFunction ) : mStr ( aStr ) , mHeadFunction ( aHeadFunction ) , mTailFunction ( aTailFunction )
51 return static_cast<T&
> ( *this );
56 mHeadFunction ( mStr );
57 return static_cast<T&
> ( *this );
62 mTailFunction ( mStr );
63 return static_cast<T&
> ( *this );
87 FatalLevel ( std::ostream& aStr = std::cout , Base::fPtr aHeadFunction = FatalLevel::colour_head, Base::fPtr aTailFunction = FatalLevel::colour_tail );
89 static void colour_head ( std::ostream& aStr );
90 static void colour_tail ( std::ostream& aStr );
102 ErrorLevel ( std::ostream& aStr = std::cout , Base::fPtr aHeadFunction = ErrorLevel::colour_head, Base::fPtr aTailFunction = ErrorLevel::colour_tail );
104 static void colour_head ( std::ostream& aStr );
105 static void colour_tail ( std::ostream& aStr );
118 WarningLevel ( std::ostream& aStr = std::cout , Base::fPtr aHeadFunction = WarningLevel::colour_head, Base::fPtr aTailFunction = WarningLevel::colour_tail );
120 static void colour_head ( std::ostream& aStr );
121 static void colour_tail ( std::ostream& aStr );
133 NoticeLevel ( std::ostream& aStr = std::cout , Base::fPtr aHeadFunction = NoticeLevel::colour_head, Base::fPtr aTailFunction = NoticeLevel::colour_tail );
135 static void colour_head ( std::ostream& aStr );
136 static void colour_tail ( std::ostream& aStr );
147 InfoLevel ( std::ostream& aStr = std::cout , Base::fPtr aHeadFunction = InfoLevel::colour_head, Base::fPtr aTailFunction = InfoLevel::colour_tail );
149 static void colour_head ( std::ostream& aStr );
150 static void colour_tail ( std::ostream& aStr );
161 DebugLevel ( std::ostream& aStr = std::cout , Base::fPtr aHeadFunction = DebugLevel::colour_head, Base::fPtr aTailFunction = DebugLevel::colour_tail );
163 static void colour_head ( std::ostream& aStr );
164 static void colour_tail ( std::ostream& aStr );
void insert(std::ostream &aStr, const U &aU)
BaseLogLevel< NoticeLevel > Base
BaseLogLevel< FatalLevel > Base
Helper struct representing the Info log level to allow us to specialize functions according to their ...
Helper struct representing the Debug log level to allow us to specialize functions according to their...
Helper struct representing the Error log level to allow us to specialize functions according to their...
Helper struct representing the Warning log level to allow us to specialize functions according to the...
#define log_insert_warning
BaseLogLevel< DebugLevel > Base
Helper struct representing the Fatal log level to allow us to specialize functions according to their...
BaseLogLevel< InfoLevel > Base
BaseLogLevel(std::ostream &aStr, fPtr aHeadFunction, fPtr aTailFunction)
BaseLogLevel< ErrorLevel > Base
Helper struct representing the Notice log level to allow us to specialize functions according to thei...
BaseLogLevel< WarningLevel > Base
_Integer< T, IntFmt<> > Integer(const T &aT)
Forward declare a function which creates an instance of the ultra-lightweight wrapper from an integer...