00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef _CERTI_AUDIT_FILE_HH
00026 #define _CERTI_AUDIT_FILE_HH
00027
00028 #include "AuditLine.hh"
00029 #include "certi.hh"
00030 #include "Exception.hh"
00031
00032 #include <fstream>
00033 #include <string>
00034
00035 #define AUDIT_MIN_LEVEL 0
00036 #define AUDIT_MAX_LEVEL 10
00037
00038 #define AUDITEVENT_START_AUDIT 128
00039 #define AUDITEVENT_STOP_AUDIT 129
00040 #define AUDITEVENT_START_RTIG 130
00041 #define AUDITEVENT_STOP_RTIG 131
00042
00043 namespace certi {
00044
00045
00047
00057 class CERTI_EXPORT AuditFile
00058 {
00059 public:
00060 AuditFile(const std::string);
00061 ~AuditFile();
00062
00063 void startLine(Handle, FederateHandle, unsigned short EventType);
00064 void setLevel(unsigned short EventLevel);
00065
00066
00067 void endLine(unsigned short, std::string);
00068 void putLine(unsigned short, unsigned short, unsigned short, std::string);
00069
00070 AuditFile &operator<<(const char *);
00071 AuditFile &operator<<(int);
00072 AuditFile &operator<<(unsigned int);
00073 AuditFile &operator<<(long);
00074 AuditFile &operator<<(unsigned long);
00075 AuditFile &operator<<(double);
00076
00077 protected:
00078 std::ofstream auditFile ;
00079 AuditLine currentLine ;
00080
00081 };
00082
00083 }
00084
00085 #endif // _CERTI_AUDIT_FILE_HH
00086
00087