Lumiera  0.pre.03
»edit your freedom«
OutputDirector Class Reference

#include "steam/play/output-director.hpp"

Description

Management of external Output connections.

Todo:
write Type comment

Definition at line 60 of file output-director.hpp.

Public Member Functions

bool connectUp ()
 connect and bring up the external input/output connections, handlers and interface services and the render/playback service. More...
 
bool isOperational () const
 
void triggerDisconnect (SigTerm) noexcept
 initiate shutdown of all ongoing render/playback processes and closing of all external input/output interfaces. More...
 

Static Public Attributes

static lib::Depend< OutputDirectorinstance
 storage for the single application wide OutputDirector instance
 

Friends

class lib::DependencyFactory< OutputDirector >
 

Private Types

using PlayServiceHandle = lib::DependInject< lumiera::Play >::ServiceInstance< PlayService >
 
using SigTerm = lumiera::Subsys::SigTerm
 

Private Member Functions

 OutputDirector ()
 bring up the framework for handling input/output connections. More...
 
void bringDown (SigTerm completedSignal)
 
- Private Member Functions inherited from NonCopyable
 NonCopyable (NonCopyable const &)=delete
 
NonCopyableoperator= (NonCopyable const &)=delete
 

Private Attributes

PlayServiceHandle player_
 
bool shutdown_initiated_ = false
 

Additional Inherited Members

- Static Public Member Functions inherited from Sync<>
static MonitorgetMonitor (Sync const *forThis)
 

Constructor & Destructor Documentation

◆ OutputDirector()

OutputDirector ( )
private

bring up the framework for handling input/output connections.

Creating this object happens on first access and shouldn't be confused with actually booting up / shutting down this subsystem. Rather, the purpose of the OutputDirector is actively to conduct the Lifecycle of booting, connecting, operating, disconnecting.

Definition at line 49 of file output-director.cpp.

Member Function Documentation

◆ connectUp()

bool connectUp ( )

connect and bring up the external input/output connections, handlers and interface services and the render/playback service.

Returns
true if the output subsystem can be considered operational

Definition at line 63 of file output-director.cpp.

References OutputDirector::isOperational().

+ Here is the call graph for this function:

◆ triggerDisconnect()

void triggerDisconnect ( SigTerm  completedSignal)
noexcept

initiate shutdown of all ongoing render/playback processes and closing of all external input/output interfaces.

Works as an asynchronous operation; the given callback signal will be invoked when the shutdown is complete.

Note
starting a new thread, which might fail. When this happens, the raised exception will cause immediate unconditional termination of the application.

Definition at line 91 of file output-director.cpp.

References OutputDirector::bringDown(), and lib::launchDetached().

+ Here is the call graph for this function:

◆ isOperational()

bool isOperational ( ) const
Todo:
WIP-WIP-WIP 6/2011

Definition at line 75 of file output-director.cpp.

Referenced by OutputDirector::bringDown(), and OutputDirector::connectUp().

+ Here is the caller graph for this function:

◆ bringDown()

void bringDown ( SigTerm  completedSignal)
private

actually bring down any calculation processes and finally disconnect any external input/output interfaces. This shutdown and cleanup operation is executed in a separate "Output shutdown supervisor" thread and has the liability to bring down the relevant facilities within a certain timespan. When done, the last operation within this thread will be to invoke the callback signal given as parameter.

Note
locks the OutputDirector

Definition at line 114 of file output-director.cpp.

References OutputDirector::isOperational(), lumiera_error(), and Error::what().

Referenced by OutputDirector::triggerDisconnect().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:
+ Inheritance diagram for OutputDirector:
+ Collaboration diagram for OutputDirector:

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