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...
#include <Decorator_Classes.h>
Public Member Functions | |
TextElement (std::string element) | |
Constructor. | |
std::string | Render () |
Render this element as a string. | |
Public Member Functions inherited from IRenderElement | |
virtual | ~IRenderElement () |
virtual std::string | Render ()=0 |
Render this element as a string. | |
Private Attributes | |
std::string | _elementText |
The raw text at the center of all decorators. | |
Additional Inherited Members | |
Public Types inherited from IRenderElement | |
using | shared_ptr_t = std::shared_ptr< IRenderElement > |
An alias to simplify syntax for this shared pointer. | |
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.
This class wraps a string and does nothing other than return the string. This way, this class can be decorated because it implements the IRenderElement interface.
Definition at line 210 of file Decorator_Classes.h.
|
inline |
Constructor.
element | The text to be rendered. |
Definition at line 224 of file Decorator_Classes.h.
References TextElement::_elementText.
|
inlinevirtual |
Render this element as a string.
Implements IRenderElement.
Definition at line 235 of file Decorator_Classes.h.
References TextElement::_elementText.
|
private |
The raw text at the center of all decorators.
Definition at line 216 of file Decorator_Classes.h.
Referenced by TextElement::Render(), and TextElement::TextElement().