Design Pattern Examples
Overview of object-oriented design patterns
decorator_classes.py File Reference

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

Go to the source code of this file.

Classes

class  IRenderElement
 Represents an element that can be rendered in text. 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. More...
 

Namespaces

namespace  DesignPatternExamples_python
 The DesignPatternExamples_python package, containing 20 examples of design patterns, each in their own namespace.
 
namespace  DesignPatternExamples_python.decorator
 
namespace  DesignPatternExamples_python.decorator.decorator_classes
 

Detailed Description

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

Definition in file decorator_classes.py.