Design Pattern Examples
Overview of object-oriented design patterns
Decorator_Classes.h File Reference

Implementation of the IRenderElement interface, Decorator base class, TextElement class, and the concrete decorator classes used in the Decorator Pattern. More...

#include <string>
#include <memory>
#include "helpers/argumentnull_error.h"
#include "helpers/formatstring.h"
Include dependency graph for Decorator_Classes.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  IRenderElement
 Represents an element that can be rendered in text. All decorators and the core element class implement this interface. More...
 
class  Decorator
 Represents the base class of all decorators and is responsible for handling the wrapped element being decorated. More...
 
class  WhiteBackgroundDecorator
 Represents the WhiteBackground decorator, which changes the background color of the wrapped element to white. More...
 
class  UnderlineDecorator
 Represents the Underline decorator, which underlines the wrapped content. More...
 
class  RedForegroundDecorator
 Represents the RedForeground decorator, which renders the wrapped content as red text. More...
 
class  TextElement
 Represents the core element that can be decorated. Note that this class implements the IRenderElement but otherwise has no knowledge of any of the decorators that might be applied. More...
 

Namespaces

namespace  DesignPatternExamples_cpp
 The namespace containing all Design Pattern Examples implemented in C++.
 

Macros

#define __DECORATOR_CLASSES_H__
 

Detailed Description

Implementation of the IRenderElement interface, Decorator base class, TextElement class, and the concrete decorator classes used in the Decorator Pattern.

Definition in file Decorator_Classes.h.

Macro Definition Documentation

◆ __DECORATOR_CLASSES_H__

#define __DECORATOR_CLASSES_H__

Definition at line 10 of file Decorator_Classes.h.