Struct IObjectControl#
Defined in File core.h
Inheritance Relationships#
Derived Types#
public CIsoMonitor(Class CIsoMonitor)public sdv::CSdvObject(Class CSdvObject)
Struct Documentation#
-
struct IObjectControl#
Optional interface allowing for additional control of more complex SDVObjects. To be implemented if the object in question calls other SDVobjects via running threads or callbacks, requires configuration or performs other complex behavior during creation/shutdown.
Subclassed by CIsoMonitor, sdv::CSdvObject
Public Functions
-
virtual void Initialize(const sdv::u8string &ssObjectConfig) = 0#
Initialize the object.
- Parameters:
ssObjectConfig – [in] Optional configuration string.
-
virtual EObjectState GetObjectState() const = 0#
Get the current state of the object.
- Returns:
Return the current state of the object.
-
virtual void SetOperationMode(EOperationMode eMode) = 0#
Set the component operation mode.
- Parameters:
eMode – [in] The operation mode, the component should run in.
-
virtual sdv::u8string GetObjectConfig() const = 0#
Get the object configuration for persistence.
- Returns:
The object configuration as TOML string.
-
virtual void Shutdown() = 0#
Shutdown called before the object is destroyed.
- Attention
Implement calls to other SDV objects here as this is no longer considered safe during the destructor of the object! After a call to shutdown any threads/callbacks/etc that could call other SDV objects need to have been stopped. The SDV object itself is to remain in a state where it can respond to calls to its interfaces as other objects may still call it during the shutdown sequence! Any subsequent call to GetObjectState should return EObjectState::destruction_pending
- void Initialize (in u8string ssObjectConfig)
Initialize the object.
- Parameters:
ssObjectConfig – [in] Optional configuration string.
-
EObjectState GetObjectState() const
Get the current state of the object.
- Returns:
Return the current state of the object.
- void SetOperationMode (in EOperationMode eMode)
Set the component operation mode.
- Parameters:
eMode – [in] The operation mode, the component should run in.
-
u8string GetObjectConfig() const
Get the object configuration for persistence.
- Returns:
The object configuration as TOML string.
-
void Shutdown()
Shutdown called before the object is destroyed.
- Attention
Implement calls to other SDV objects here as this is no longer considered safe during the destructor of the object! After a call to shutdown any threads/callbacks/etc that could call other SDV objects need to have been stopped. The SDV object itself is to remain in a state where it can respond to calls to its interfaces as other objects may still call it during the shutdown sequence! Any subsequent call to GetObjectState should return EObjectState::destruction_pending
Public Static Attributes
-
static constexpr ::sdv::interface_id _id = 0x42C63A3374DB3813#
Interface ID.
-
virtual void Initialize(const sdv::u8string &ssObjectConfig) = 0#