Design Pattern Examples
Overview of object-oriented design patterns
IRenderElement Struct Referenceabstract

Represents an element that can be rendered in text. All decorators and the core element class implement this interface. More...

#include <Decorator_Classes.h>

Inheritance diagram for IRenderElement:
Inheritance graph
Collaboration diagram for IRenderElement:
Collaboration graph

Public Types

using shared_ptr_t = std::shared_ptr< IRenderElement >
 An alias to simplify syntax for this shared pointer.
 

Public Member Functions

virtual ~IRenderElement ()
 
virtual std::string Render ()=0
 Render this element as a string.
 

Detailed Description

Represents an element that can be rendered in text. All decorators and the core element class implement this interface.

Definition at line 29 of file Decorator_Classes.h.

Member Typedef Documentation

◆ shared_ptr_t

using shared_ptr_t = std::shared_ptr<IRenderElement>

An alias to simplify syntax for this shared pointer.

Definition at line 34 of file Decorator_Classes.h.

Constructor & Destructor Documentation

◆ ~IRenderElement()

virtual ~IRenderElement ( )
inlinevirtual

Definition at line 36 of file Decorator_Classes.h.

Member Function Documentation

◆ Render()

virtual std::string Render ( )
pure virtual

Render this element as a string.

Returns
A string containing the rendering of the element.

Implemented in Decorator, WhiteBackgroundDecorator, UnderlineDecorator, RedForegroundDecorator, and TextElement.


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