Design Pattern Examples
Overview of object-oriented design patterns
c/Bridge_ConsoleLogger.h File Reference

Declaration of the CreateConsoleLogger() and DestroyConsoleLogger() factory functions used in the Bridge Pattern. More...

#include "Bridge_ILogger.h"
Include dependency graph for c/Bridge_ConsoleLogger.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define __BRIDGE_CONSOLELOGGER_H__
 

Functions

ILoggerCreateConsoleLogger (void)
 Create an instance of an ILogger that outputs to a console.
 
void DestroyConsoleLogger (ILogger *logger)
 Destroy the given instance of an ILogger for outputting to a console.
 

Detailed Description

Declaration of the CreateConsoleLogger() and DestroyConsoleLogger() factory functions used in the Bridge Pattern.

Definition in file c/Bridge_ConsoleLogger.h.

Macro Definition Documentation

◆ __BRIDGE_CONSOLELOGGER_H__

#define __BRIDGE_CONSOLELOGGER_H__

Definition at line 8 of file c/Bridge_ConsoleLogger.h.

Function Documentation

◆ CreateConsoleLogger()

ILogger * CreateConsoleLogger ( void  )

Create an instance of an ILogger that outputs to a console.

Returns
Returns an ILogger instance to use for logging to a console; returns NULL if something went wrong in creating the logger.

Definition at line 79 of file Bridge_ConsoleLogger.c.

References _Console_LogError(), _Console_LogInfo(), _Console_LogTrace(), ILogger::data, ILogger::LogError, ILogger::LogInfo, and ILogger::LogTrace.

Referenced by CreateLogger().

◆ DestroyConsoleLogger()

void DestroyConsoleLogger ( ILogger logger)

Destroy the given instance of an ILogger for outputting to a console.

Parameters
loggerThe ILogger instance to destroy.

Definition at line 96 of file Bridge_ConsoleLogger.c.

Referenced by DestroyLogger().