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

Declaration of the CreateNullLogger() and DestroyNullLogger() factory functions used in the Bridge Pattern. More...

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

Go to the source code of this file.

Macros

#define __BRIDGE_NULLLOGGER_H__
 

Functions

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

Detailed Description

Declaration of the CreateNullLogger() and DestroyNullLogger() factory functions used in the Bridge Pattern.

Definition in file c/Bridge_NullLogger.h.

Macro Definition Documentation

◆ __BRIDGE_NULLLOGGER_H__

#define __BRIDGE_NULLLOGGER_H__

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

Function Documentation

◆ CreateNullLogger()

ILogger * CreateNullLogger ( 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 60 of file Bridge_NullLogger.c.

References _Null_LogError(), _Null_LogInfo(), _Null_LogTrace(), ILogger::data, ILogger::LogError, ILogger::LogInfo, and ILogger::LogTrace.

Referenced by CreateLogger().

◆ DestroyNullLogger()

void DestroyNullLogger ( ILogger logger)

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

Parameters
loggerThe ILogger instance to destroy.

Definition at line 77 of file Bridge_NullLogger.c.

Referenced by DestroyLogger().