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

Declaration of the Composite_Exercise() function as used in the Composite Pattern. More...

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

Go to the source code of this file.

Macros

#define __COMPOSITE_EXERCISE_H__
 

Functions

void Composite_Exercise (void)
 Example of using the Composite Pattern.
 

Detailed Description

Declaration of the Composite_Exercise() function as used in the Composite Pattern.

Definition in file c/Composite_Exercise.h.

Macro Definition Documentation

◆ __COMPOSITE_EXERCISE_H__

#define __COMPOSITE_EXERCISE_H__

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

Function Documentation

◆ Composite_Exercise()

void Composite_Exercise ( void  )

Example of using the Composite Pattern.

The Composite pattern is used when a collection of objects is to be formed in a hierarchical form where each object needs to be treated like any other object but some objects can contain other objects.

This example uses a file structure of file and directories to represent each object type.

Definition at line 112 of file Composite_Exercise.c.

References Composite_Exercise_ShowEntry(), and Composite_FileAccess_GetEntry().