dxd - dynax driver framework 3.0.0d222
cross platform open source driver development framework
Loading...
Searching...
No Matches
dx::apartment< object_t, model > Class Template Reference

the COM apartment of one object - a device or a whole driver: its thread creates the object, runs its steps and releases it More...

#include <dx_apartment.h>

Public Member Functions

template<typename... args_t>
 apartment (args_t &&... args)
 the constructor returns once the thread holds the apartment and the object, built from the arguments, stands
 dx_catchall (return false;) void sleep()
 operator object_t & () const noexcept
template<typename args_t>
void operator<< (args_t &args)
 a parser's face, where the object has one: only the args cross to the thread
void quiet () noexcept try
bool try_conclude () noexcept try
bool try_launch ()
void wake ()
 ~apartment ()
 the object concludes and goes on the thread that created it; a destructor running on that thread itself lets it run out detached

Detailed Description

template<typename object_t, ::COINIT model = COINIT_APARTMENTTHREADED>
class dx::apartment< object_t, model >

the COM apartment of one object - a device or a whole driver: its thread creates the object, runs its steps and releases it

An apartment threaded in-proc server whose interface carries no marshaller is bound to the thread that created it, so an object built on such a server exists only for as long as that thread holds the apartment; and the multithreaded apartment lives for as long as some thread holds it. The apartment is held wherever the object would be: a driver's map holds a device's apartment and hands out the device aliased to it, a harness holds a driver's apartment and parses through it. Only data crosses the thread boundary - the constructor's arguments, a parser's args - never a call-in gateway.

The rendezvous of every step belongs to whoever hands it over, so the thread touches nothing of this object once a step returned - a step may have released the last reference to it.

Exceptions
Whatevercreating the object or a step throws, rethrown on the thread that asked for it.

Constructor & Destructor Documentation

◆ apartment()

template<typename object_t, ::COINIT model = COINIT_APARTMENTTHREADED>
template<typename... args_t>
dx::apartment< object_t, model >::apartment ( args_t &&... args)
inline

the constructor returns once the thread holds the apartment and the object, built from the arguments, stands

◆ ~apartment()

template<typename object_t, ::COINIT model = COINIT_APARTMENTTHREADED>
dx::apartment< object_t, model >::~apartment ( )
inline

the object concludes and goes on the thread that created it; a destructor running on that thread itself lets it run out detached

Member Function Documentation

◆ dx_catchall()

template<typename object_t, ::COINIT model = COINIT_APARTMENTTHREADED>
dx::apartment< object_t, model >::dx_catchall ( return false; )
inline

◆ operator object_t &()

template<typename object_t, ::COINIT model = COINIT_APARTMENTTHREADED>
dx::apartment< object_t, model >::operator object_t & ( ) const
inlinenoexcept

◆ operator<<()

template<typename object_t, ::COINIT model = COINIT_APARTMENTTHREADED>
template<typename args_t>
void dx::apartment< object_t, model >::operator<< ( args_t & args)
inline

a parser's face, where the object has one: only the args cross to the thread

◆ quiet()

template<typename object_t, ::COINIT model = COINIT_APARTMENTTHREADED>
void dx::apartment< object_t, model >::quiet ( )
inlinenoexcept

◆ try_conclude()

template<typename object_t, ::COINIT model = COINIT_APARTMENTTHREADED>
bool dx::apartment< object_t, model >::try_conclude ( )
inlinenoexcept

◆ try_launch()

template<typename object_t, ::COINIT model = COINIT_APARTMENTTHREADED>
bool dx::apartment< object_t, model >::try_launch ( )
inline

◆ wake()

template<typename object_t, ::COINIT model = COINIT_APARTMENTTHREADED>
void dx::apartment< object_t, model >::wake ( )
inline

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.