Moogli
 All Classes
record.hpp
1 #ifndef __RECORD__
2 #define __RECORD__
3 
4 #include <string>
5 #include <iostream>
6 
7 using namespace std;
8 
9 enum class record_t { ERROR = 0
10  , WARNING = 1
11  , INFO = 2
12  };
13 
14 void
15 record_error( const string & file_name
16  , const string & function_name
17  , const unsigned int line_number
18  , const string & message
19  );
20 
21 void
22 record_warning( const string & file_name
23  , const string & function_name
24  , const unsigned int line_number
25  , const string & message
26  );
27 
28 void
29 record_info( const string & file_name
30  , const string & function_name
31  , const unsigned int line_number
32  , const string & message
33 );
34 
35 
36 void
37 record( record_t record_type
38  , const string & file_name
39  , const string & function_name
40  , const unsigned int line_number
41  , const string & message
42  );
43 
44 #define RECORD(type, message) (record(type, __FILE__, __FUNCTION__, __LINE__, message))
45 
46 #define RECORD_ERROR(message) RECORD(record_t::ERROR, message)
47 
48 #define RECORD_WARNING(message) RECORD(record_t::WARNING, message)
49 
50 #define RECORD_INFO(message) RECORD(record_t::INFO, message)
51 
52 #endif /* __RECORD__ */