FrontWidget class reference
Implements the WidgetVariant union in that way to make it easier to use and manage non-trivial variables. Auto-deletes contained widget.
Functions
Functions documentation
FrontWidget();
Default constructor. Sets internals to nullptr.
FrontWidget(WidgetTypebaseWidgetType,Widget2D* realWidget);
Second constructor.
FrontWidget(constFrontWidget& copy);
Copy constructor.
~FrontWidget();
Destructor.
FrontWidget& operator=(FrontWidgetrhs);
Assignment operator.
friend void swap(FrontWidget& first,FrontWidget& second) noexcept;
Swap function.
void SetWidget(WidgetTypebaseWidgetType,Widget2D* realWidget);
Sets the public class fields.
void Cleanup();Clears the class by deleting the stored object.
Variables documentation
WidgetTypem_Type;
Describes the type of stored widget.
WidgetVariant m_Variant;Stores the real widget.