Lumiera 0.pre.04
»edit your freedom«
Loading...
Searching...
No Matches
OutputSlotImplBase::ConnectionManager< CON > Class Template Referenceabstract

#include "steam/play/output-slot-connection.hpp"

Description

template<class CON>
class steam::play::OutputSlotImplBase::ConnectionManager< CON >

Maintaining a list of active connections.

Base class for the typical implementation approach. Using this class is not mandatory. But obviously, we'd get to manage a selection of Connection objects representing the "active points" in several media channels connected through this OutputSlot. These Connection subclasses are what is referenced by the DataSink smart-ptrs handed out to the client code. As ConnectionState implements the Allocation API, it has the liability to create these DataSink smart-ptrs, which means to wire them appropriately and also provide an deleter function (here shutdownConnection) to be invoked when the last copy of the smart-handle goes out of scope.

The typical standard/base implementation provided here manages a collection of active Connection subclass objects.

Definition at line 154 of file output-slot-connection.hpp.

Public Member Functions

virtual ~ConnectionManager ()
 
- Public Member Functions inherited from OutputSlot::ConnectionState
virtual ~ConnectionState ()
 

Protected Types

using ConnectionStorage = Connections::ElementHolder &
 

Protected Member Functions

void init ()
 
virtual void buildConnection (ConnectionStorage)=0
 factory function to build the actual connection handling objects per channel
 
 ConnectionManager (uint numChannels)
 
- Protected Member Functions inherited from OutputSlot::Allocation
 ~Allocation ()
 never to be managed by clients directly
 

Private Types

typedef lib::ScopedCollection< CON > Connections
 
typedef OutputSlot::OpenedSinks OpenedSinks
 

Private Member Functions

OpenedSinks getOpenedSinks ()
 
Timings getTimingConstraints ()
 
bool isActive () const
 
CON & access (uint chanNr) const
 

Static Private Member Functions

static DataSink connectOutputSink (CON &connection)
 
static void shutdownConnection (OutputSlot::Connection *toClose)
 

Private Attributes

Connections connections_
 

Constructor & Destructor Documentation

◆ ConnectionManager()

template<class CON >
ConnectionManager ( uint  numChannels)
inlineprotected

Definition at line 207 of file output-slot-connection.hpp.

◆ ~ConnectionManager()

template<class CON >
virtual ~ConnectionManager ( )
inlinevirtual

Definition at line 213 of file output-slot-connection.hpp.

Member Typedef Documentation

◆ Connections

template<class CON >
typedef lib::ScopedCollection<CON> Connections
private

Definition at line 157 of file output-slot-connection.hpp.

◆ OpenedSinks

template<class CON >
typedef OutputSlot::OpenedSinks OpenedSinks
private

Definition at line 158 of file output-slot-connection.hpp.

◆ ConnectionStorage

template<class CON >
using ConnectionStorage = Connections::ElementHolder&
protected

Definition at line 200 of file output-slot-connection.hpp.

Member Function Documentation

◆ getOpenedSinks()

template<class CON >
OpenedSinks getOpenedSinks ( )
inlineprivatevirtual

Implements OutputSlot::Allocation.

Definition at line 166 of file output-slot-connection.hpp.

References OutputSlotImplBase::ConnectionManager< CON >::connections_, OutputSlotImplBase::ConnectionManager< CON >::connectOutputSink(), OutputSlotImplBase::ConnectionManager< CON >::isActive(), and lib::iter_source::transform().

+ Here is the call graph for this function:

◆ getTimingConstraints()

template<class CON >
Timings getTimingConstraints ( )
inlineprivatevirtual

Implements OutputSlot::Allocation.

Definition at line 174 of file output-slot-connection.hpp.

◆ isActive()

template<class CON >
bool isActive ( ) const
inlineprivatevirtual

Implements OutputSlot::Allocation.

Definition at line 180 of file output-slot-connection.hpp.

References OutputSlotImplBase::ConnectionManager< CON >::connections_, and ScopedCollection< I, siz >::size().

Referenced by OutputSlotImplBase::ConnectionManager< CON >::getOpenedSinks().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ access()

template<class CON >
CON & access ( uint  chanNr) const
inlineprivatevirtual

◆ init()

template<class CON >
void init ( )
inlineprotected

Definition at line 194 of file output-slot-connection.hpp.

References OutputSlotImplBase::ConnectionManager< CON >::buildConnection(), OutputSlotImplBase::ConnectionManager< CON >::connections_, and ScopedCollection< I, siz >::populate_by().

Referenced by DiagnosticOutputSlot::SimulatedOutputSequences::SimulatedOutputSequences().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ buildConnection()

template<class CON >
virtual void buildConnection ( ConnectionStorage  )
protectedpure virtual

factory function to build the actual connection handling objects per channel

Implemented in DiagnosticOutputSlot::SimulatedOutputSequences.

Referenced by OutputSlotImplBase::ConnectionManager< CON >::init().

+ Here is the caller graph for this function:

◆ connectOutputSink()

template<class CON >
static DataSink connectOutputSink ( CON &  connection)
inlinestaticprivate

Definition at line 221 of file output-slot-connection.hpp.

References Handle< IMP >::activate(), and OutputSlotImplBase::ConnectionManager< CON >::shutdownConnection().

Referenced by OutputSlotImplBase::ConnectionManager< CON >::getOpenedSinks().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ shutdownConnection()

template<class CON >
static void shutdownConnection ( OutputSlot::Connection toClose)
inlinestaticprivate

Definition at line 231 of file output-slot-connection.hpp.

References OutputSlot::Connection::shutDown().

Referenced by OutputSlotImplBase::ConnectionManager< CON >::connectOutputSink().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ connections_

+ Inheritance diagram for OutputSlotImplBase::ConnectionManager< CON >:
+ Collaboration diagram for OutputSlotImplBase::ConnectionManager< CON >:

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