Design Pattern Examples
Overview of object-oriented design patterns
Program::Exercise Struct Reference

Represents a single exercise or example for a design pattern. More...

Collaboration diagram for Program::Exercise:
Collaboration graph

Public Member Functions

 Exercise (const char *nameOfExercise, Action exercise)
 Constructor.
 

Public Attributes

std::string name
 Name of the exercise.
 
Action exercise_to_run
 Method to call to run the exercise.
 

Detailed Description

Represents a single exercise or example for a design pattern.

Definition at line 54 of file program.cpp.

Constructor & Destructor Documentation

◆ Exercise()

Exercise ( const char *  nameOfExercise,
Action  exercise 
)
inline

Constructor.

Parameters
nameOfExerciseName of the exercise.
exerciseMethod to run (of type void ()(void)).

Definition at line 72 of file program.cpp.

References Program::Exercise::exercise_to_run, and Program::Exercise::name.

Member Data Documentation

◆ exercise_to_run

Action exercise_to_run

Method to call to run the exercise.

Definition at line 64 of file program.cpp.

Referenced by Program::Exercise::Exercise().

◆ name

std::string name

Name of the exercise.

Definition at line 59 of file program.cpp.

Referenced by Program::Exercise::Exercise().


The documentation for this struct was generated from the following file: