VR-Vantage
Loading...
Searching...
No Matches
HumbleDialogLogic Class Reference

The logic for the HumbleDialogWidget. This class does not have knowledge about how the widget was implemented, but communicates with the widget through an interface. The interface allows the widget or logic to be independently re-factored without affecting the other. More...

Public Member Functions

 HumbleDialogLogic (HumbleDialogWidgetInterface &iFace)
 At construction time, this logic is connected to the boost::signals of the widget-interface to receive updates when the widget changes. A reference to the widget-interface is saved to call back to the widget and disconnect during destruction.
virtual ~HumbleDialogLogic ()
 Disconnect from the boost::signals of the widget-interface.
void slot_processText (const std::string &text)
 Called when the user presses Return or Enter in the widget. When signaled the given text is simply printed to the console, then this logic-object clears the text-box in the widget by calling setText on the widget-interface.

Private Attributes

HumbleDialogWidgetInterface & myInterface
makVrv::DtSignalConnectionManager myConnections

Detailed Description

The logic for the HumbleDialogWidget. This class does not have knowledge about how the widget was implemented, but communicates with the widget through an interface. The interface allows the widget or logic to be independently re-factored without affecting the other.

Examples

Constructor & Destructor Documentation

◆ HumbleDialogLogic()

HumbleDialogLogic::HumbleDialogLogic ( HumbleDialogWidgetInterface & iFace)

At construction time, this logic is connected to the boost::signals of the widget-interface to receive updates when the widget changes. A reference to the widget-interface is saved to call back to the widget and disconnect during destruction.

Initializing CTOR.

◆ ~HumbleDialogLogic()

virtual HumbleDialogLogic::~HumbleDialogLogic ( )
virtual

Disconnect from the boost::signals of the widget-interface.

Virtual DTOR.

Member Function Documentation

◆ slot_processText()

void HumbleDialogLogic::slot_processText ( const std::string & text)

Called when the user presses Return or Enter in the widget. When signaled the given text is simply printed to the console, then this logic-object clears the text-box in the widget by calling setText on the widget-interface.

Member Data Documentation

◆ myInterface

HumbleDialogWidgetInterface& HumbleDialogLogic::myInterface
private

◆ myConnections

makVrv::DtSignalConnectionManager HumbleDialogLogic::myConnections
private

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