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

Declaration of the Bridge_Exercise() function as used in the Bridge Pattern. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define __BRIDGE_EXERCISE_H__
 

Functions

void Bridge_Exercise (void)
 Example of using the Bridge Pattern.
 

Detailed Description

Declaration of the Bridge_Exercise() function as used in the Bridge Pattern.

Definition in file c/Bridge_Exercise.h.

Macro Definition Documentation

◆ __BRIDGE_EXERCISE_H__

#define __BRIDGE_EXERCISE_H__

Definition at line 9 of file c/Bridge_Exercise.h.

Function Documentation

◆ Bridge_Exercise()

void Bridge_Exercise ( void  )

Example of using the Bridge Pattern.

The Bridge pattern is used to allow a program to offer multiple ways to perform logging without changing how the logging is used throughout the program.

In this exercise, note how the calls into the logger are the same regardless of the logger used.

Definition at line 68 of file Bridge_Exercise.c.

References _Bridge_Exercise_Demonstrate_Logging(), CreateLogger(), DestroyLogger(), LoggerType_ToConsole, LoggerType_ToFile, and LoggerType_ToNull.