dxd - dynax driver framework 3.0.1d223
cross platform open source driver development framework
Loading...
Searching...
No Matches
dx::stream::control< object_t > Class Template Reference

promoted-counter refcount: start counts, started derives (start!= 0); run_hook fires on the 0->nonzero edge, halt_hook on the nonzero->0 edge, flush_hook before every effective decrement (including one that doesn't reach zero). One central mechanism, reused by inheritance wherever a level still needs its own share-count (pin's per-client attribution; stream, which also owns the ring reset in its own run_hook; group, whose hooks are its own dx::clock run()/halt()) - hooks are set by the derived class's own constructor body, exactly how dx::stream::group already wired its hand-rolled start/streaming pair. More...

#include <dx_stream_control.h>

Inheritance diagram for dx::stream::control< object_t >:
Collaboration diagram for dx::stream::control< object_t >:

Classes

class  pause
 a session held open across a change that needs it stopped: the counted shares are taken out for the scope and handed back at its end, so clients starting or stopping meanwhile keep their own More...

Public Member Functions

void conclude () noexcept
template<typename... args_t>
 control (args_t &&... args)
 ~control ()

Public Attributes

promoted< uint32_t > start {0}
promoted< bool > started {false}

Protected Attributes

std::function< void()> flush_hook = []{}
std::function< void()> halt_hook = []{}
std::function< void()> run_hook = []{}

Friends

class pause

Detailed Description

template<typename object_t>
class dx::stream::control< object_t >

promoted-counter refcount: start counts, started derives (start!= 0); run_hook fires on the 0->nonzero edge, halt_hook on the nonzero->0 edge, flush_hook before every effective decrement (including one that doesn't reach zero). One central mechanism, reused by inheritance wherever a level still needs its own share-count (pin's per-client attribution; stream, which also owns the ring reset in its own run_hook; group, whose hooks are its own dx::clock run()/halt()) - hooks are set by the derived class's own constructor body, exactly how dx::stream::group already wired its hand-rolled start/streaming pair.

Constructor & Destructor Documentation

◆ control()

template<typename object_t>
template<typename... args_t>
dx::stream::control< object_t >::control ( args_t &&... args)
inline

◆ ~control()

template<typename object_t>
dx::stream::control< object_t >::~control ( )
inline

Member Function Documentation

◆ conclude()

◆ pause

template<typename object_t>
friend class pause
friend

Member Data Documentation

◆ flush_hook

template<typename object_t>
std::function<void()> dx::stream::control< object_t >::flush_hook = []{}
protected

◆ halt_hook

template<typename object_t>
std::function<void()> dx::stream::control< object_t >::halt_hook = []{}
protected

◆ run_hook

template<typename object_t>
std::function<void()> dx::stream::control< object_t >::run_hook = []{}
protected

◆ start

template<typename object_t>
promoted<uint32_t> dx::stream::control< object_t >::start {0}

◆ started

template<typename object_t>
promoted<bool> dx::stream::control< object_t >::started {false}

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

(c) copyright 2009 dynamic acoustics e.U. generated on

a closed source license may be obtained by requesting a written permission from dynamic acoustics e.U.
however - governmental use generally and military use especially is strictly prohibited though.