AtilaCalculatorSoftware  2.3.4
C++ Interface for Atila fem resources files
common.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Project: AtilaCalculatorSoftware
4  File: common.h
5 
6  Copyright (c) 2020 - All rights reserved
7  Distributed under the MIT License (https://opensource.org/licenses/MIT)
8 
9 =========================================================================*/
10 #pragma once
11 #ifndef ATILACALCULATORSOFTWARE_COMMON_H
12 #define ATILACALCULATORSOFTWARE_COMMON_H
13 
14 #include <string>
15 #include <utility>
16 
17 // --------------------------------------------------------------------------------------
18 // DEFINED LATER
19 // --------------------------------------------------------------------------------------
20 
21 class LogEntries;
22 class LogMetaData;
23 class Logger;
24 
25 // --------------------------------------------------------------------------------------
26 // ENUMS
27 // --------------------------------------------------------------------------------------
28 
33 
38 enum LogLevel { Trace = -1, Debug = 0, Info = 1, Warn = 2, Error = 3, Fatal = 4 };
39 
40 // --------------------------------------------------------------------------------------
41 // STRUCTURES AND TYPES
42 // --------------------------------------------------------------------------------------
43 
52 typedef void (*entry_listener)(size_t index,
53  const std::pair<LogMetaData, std::string>& entry,
54  const std::string& formatted,
55  const LogEntries& entries);
56 
57 #endif // ATILACALCULATORSOFTWARE_COMMON_H
Logging interface that stores logs, allow logfile writing, also contains other output methods...
Definition: logger.h:68
Definition: common.h:38
Definition: common.h:38
Definition: common.h:32
Contains the entries of the logger.
Definition: log_entries.h:25
LogEntries * entries
Nonformatted raw log entries.
Definition: logger.h:332
Store information about the log entry (LogLevel, Timestamp, ...)
Definition: logger.h:32
LogTimeMode
Logging time mode, TimeUTC means use abo.
Definition: common.h:32
Definition: common.h:38
Definition: common.h:38
Definition: common.h:38
LogLevel
Logging level of a log entry, used to filter log entries, each filtering level will hide lower level ...
Definition: common.h:38
void(* entry_listener)(size_t index, const std::pair< LogMetaData, std::string > &entry, const std::string &formatted, const LogEntries &entries)
Entry listener for Logger, will be called as callback for each new entry in the logger with the given...
Definition: common.h:52
Definition: common.h:32
Definition: common.h:38