ChimeraTK-DeviceAccess  03.18.00
ChimeraTK::async::VariableDistributor< SourceType > Class Template Reference

#include <VariableDistributor.h>

+ Inheritance diagram for ChimeraTK::async::VariableDistributor< SourceType >:
+ Collaboration diagram for ChimeraTK::async::VariableDistributor< SourceType >:

Public Member Functions

 VariableDistributor (boost::shared_ptr< DeviceBackend > backend, boost::shared_ptr< SubDomain< SourceType >> parent, boost::shared_ptr< Domain > asyncDomain)
 
template<typename UserType >
std::unique_ptr< AsyncVariablecreateAsyncVariable (AccessorInstanceDescriptor const &descriptor)
 
std::unique_ptr< AsyncVariablecreateAsyncVariable (AccessorInstanceDescriptor const &)
 
- Public Member Functions inherited from ChimeraTK::async::SourceTypedAsyncAccessorManager< SourceType >
void distribute (SourceType, VersionNumber version)
 
virtual bool prepareIntermediateBuffers ()
 Implement this function in case there is a step between setting the source buffer and filling the user buffers. More...
 
 AsyncAccessorManager (boost::shared_ptr< DeviceBackend > backend, boost::shared_ptr< Domain > asyncDomain)
 
- Public Member Functions inherited from ChimeraTK::async::AsyncAccessorManager
 AsyncAccessorManager (boost::shared_ptr< DeviceBackend > backend, boost::shared_ptr< Domain > asyncDomain)
 
virtual ~AsyncAccessorManager ()=default
 
template<typename UserType >
boost::shared_ptr< AsyncNDRegisterAccessor< UserType > > subscribe (RegisterPath name, size_t numberOfWords, size_t wordOffsetInRegister, AccessModeFlags flags)
 Request a new subscription. More...
 
void unsubscribe (TransferElementID id)
 This function must only be called from the destructor of the AsyncNDRegisterAccessor which is created in the subscribe function! More...
 
void sendException (const std::exception_ptr &e)
 Send an exception to all accessors. More...
 

Public Attributes

boost::shared_ptr< SubDomain< SourceType > > _parent
 

Additional Inherited Members

- Protected Member Functions inherited from ChimeraTK::async::AsyncAccessorManager
 DEFINE_VIRTUAL_FUNCTION_TEMPLATE_VTABLE (createAsyncVariable, std::unique_ptr< AsyncVariable >(AccessorInstanceDescriptor const &))
 
virtual void asyncVariableMapChanged (TransferElementID)
 This virtual function lets derived classes react on subscribe / unsubscribe. More...
 
void unsubscribeImpl (TransferElementID id)
 Internal helper function to avoid code duplication. More...
 
- Protected Attributes inherited from ChimeraTK::async::SourceTypedAsyncAccessorManager< SourceType >
SourceType _sourceBuffer
 
VersionNumber _version {nullptr}
 
- Protected Attributes inherited from ChimeraTK::async::AsyncAccessorManager
std::map< TransferElementID, std::unique_ptr< AsyncVariable > > _asyncVariables
 
boost::shared_ptr< DeviceBackend_backend
 
boost::shared_ptr< Domain_asyncDomain
 
std::list< TransferElementID_delayedUnsubscriptions
 If an unsubscription request is coming in while iterating the _asyncVariables container, we have to remember it and do it afterwards. More...
 
- Static Protected Attributes inherited from ChimeraTK::async::AsyncAccessorManager
static thread_local AsyncAccessorManager_isHoldingDomainLock {nullptr}
 We have to remember that we are holding the domain lock before we lock a weak pointer to an AsyncNDRegisterAccessor inside the AsyncVariable to resolve a race conditon: If all other owners go out of scope while we are distributing data or exceptions, releasing the weak pointer will call unsubscribe(). More...
 

Detailed Description

template<typename SourceType>
class ChimeraTK::async::VariableDistributor< SourceType >

Definition at line 13 of file VariableDistributor.h.

Constructor & Destructor Documentation

◆ VariableDistributor()

template<typename SourceType >
ChimeraTK::async::VariableDistributor< SourceType >::VariableDistributor ( boost::shared_ptr< DeviceBackend backend,
boost::shared_ptr< SubDomain< SourceType >>  parent,
boost::shared_ptr< Domain asyncDomain 
)

Definition at line 61 of file VariableDistributor.h.

+ Here is the call graph for this function:

Member Function Documentation

◆ createAsyncVariable() [1/2]

std::unique_ptr< AsyncVariable > ChimeraTK::async::VariableDistributor< std::nullptr_t >::createAsyncVariable ( AccessorInstanceDescriptor const &  )

Definition at line 72 of file VariableDistributor.h.

◆ createAsyncVariable() [2/2]

template<typename SourceType >
template<typename UserType >
std::unique_ptr<AsyncVariable> ChimeraTK::async::VariableDistributor< SourceType >::createAsyncVariable ( AccessorInstanceDescriptor const &  descriptor)
+ Here is the caller graph for this function:

Member Data Documentation

◆ _parent

template<typename SourceType >
boost::shared_ptr<SubDomain<SourceType> > ChimeraTK::async::VariableDistributor< SourceType >::_parent

Definition at line 21 of file VariableDistributor.h.


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