Declaration of the ILogger interface, along with the CreateLogger() and DestroyLogger() functions used in the Bridge Pattern. More...
Go to the source code of this file.
Classes | |
struct | ILogger |
Macros | |
#define | __BRIDGE_ILOGGER_H__ |
Enumerations | |
enum | LoggerTypes { LoggerType_ToNull , LoggerType_ToFile , LoggerType_ToConsole } |
A value passed to CreateLogger() to specify the type of logger to create. More... | |
Functions | |
ILogger * | CreateLogger (LoggerTypes loggerType, const char *filename) |
Return an interface for the specified logger. | |
void | DestroyLogger (ILogger *logger) |
Release any resources associated with the given logger. The given ILogger instance is no longer valid after this function returns. | |
Declaration of the ILogger interface, along with the CreateLogger() and DestroyLogger() functions used in the Bridge Pattern.
Definition in file Bridge_ILogger.h.
#define __BRIDGE_ILOGGER_H__ |
Definition at line 9 of file Bridge_ILogger.h.
enum LoggerTypes |
A value passed to CreateLogger() to specify the type of logger to create.
Definition at line 14 of file Bridge_ILogger.h.
ILogger * CreateLogger | ( | LoggerTypes | loggerType, |
const char * | filename | ||
) |
Return an interface for the specified logger.
loggerType | A value from the LoggerTypes enumeration specifying the type of logger to create. |
filename | For LoggerType_ToFile, this is the path and name of the log file to write to. Ignored for other logger types. |
Definition at line 19 of file Bridge_ILogger.c.
References CreateConsoleLogger(), CreateFileLogger(), CreateNullLogger(), ILogger::loggerType, LoggerType_ToConsole, LoggerType_ToFile, and LoggerType_ToNull.
Referenced by Bridge_Exercise().
void DestroyLogger | ( | ILogger * | logger | ) |
Release any resources associated with the given logger. The given ILogger instance is no longer valid after this function returns.
logger | An ILogger object representing a logger to be destroyed. |
Definition at line 52 of file Bridge_ILogger.c.
References DestroyConsoleLogger(), DestroyFileLogger(), DestroyNullLogger(), ILogger::loggerType, LoggerType_ToConsole, LoggerType_ToFile, and LoggerType_ToNull.
Referenced by Bridge_Exercise().