Workspace 6.21.5
Public Member Functions | List of all members
SerializingInputEvent Class Reference

Event class raised when InputScalar::save() is called just before the input's values are serialized. More...

#include <Workspace/DataExecution/InputOutput/inputscalarevents.h>

Inheritance diagram for SerializingInputEvent:
[legend]

Public Member Functions

 SerializingInputEvent (const InputScalar &input)
 
const InputScalargetInput () const
 
- Public Member Functions inherited from ObservableEventType< SerializingInputEvent >
CSIRO_WORKSPACE_API const EventIDSingleton< CSIRO::DataExecution::AllObservableEvents > & eventID ()
 
CSIRO_WORKSPACE_API const EventIDSingleton< CSIRO::DataExecution::ProgressEvent > & eventID ()
 
const EventIDSingleton< SerializingInputEvent > & getEventID () const override
 
- Public Member Functions inherited from ObservableEvent
virtual ~ObservableEvent ()=default
 
virtual const EventIDgetEventID () const =0
 

Additional Inherited Members

- Static Public Member Functions inherited from ObservableEventType< SerializingInputEvent >
static const EventIDSingleton< SerializingInputEvent > & eventID ()
 
- Protected Member Functions inherited from ObservableEventType< SerializingInputEvent >
 ObservableEventType ()=default
 

Detailed Description

When an input is being serialized (ie saved), the serialization needs to be confident that the value held by the input reflects what the user thinks it does. Certain types of widgets (which can attach to an input) implement a delayed update mechanism whereby the input's data is not immediately updated when the widget is modified by the user. A good example of this is a line edit widget whose connector only updates the underlying data when the user presses Return on the widget, or if the widget loses focus. This allows the user to edit the string held in the line edit without every single keypress resulting in the underlying workflow being updated. The same situation exists for text edit fields, where the amount of text that would have to be updated each time could be quite large.

To handle these scenarios, the InputScalar::save() function will raise a SerializingInputEvent notification just before it tries to serialize/save the value held by the input. This allows widget connectors, etc. to monitor for this event and to forcibly update the data just before the serialization. This will always be safe to do directly, since it must be safe to access (and hence modify) the input's data for that input to be serialized.

Constructor & Destructor Documentation

◆ SerializingInputEvent()

SerializingInputEvent ( const InputScalar input)
inline
Parameters
inputThe input whose value is being serialized.

Member Function Documentation

◆ getInput()

const InputScalar & getInput ( ) const
inline
Returns
The input that is being serialized.