ldas-tools-al 2.6.4
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
ObjectRegistryResourceLock< T, R, ExceptionDesc, ExceptionType > Class Template Reference

Resource lock management. More...

#include <objectregistry.hh>

Inheritance diagram for ObjectRegistryResourceLock< T, R, ExceptionDesc, ExceptionType >:
Inheritance graph
[legend]
Collaboration diagram for ObjectRegistryResourceLock< T, R, ExceptionDesc, ExceptionType >:
Collaboration graph
[legend]

Public Member Functions

 ObjectRegistryResourceLock (T *Resource)
 Constructor.
 
 ObjectRegistryResourceLock (T *Resource)
 Constructor.
 

Private Attributes

T * m_resource
 Resource object.
 
ObjectRegistry< T > & m_registry
 Registry object.
 

Detailed Description

template<typename T, ObjectRegistry< T > & R, ORRLExceptionDesc & ExceptionDesc, typename ExceptionType>
class ObjectRegistryResourceLock< T, R, ExceptionDesc, ExceptionType >

Resource lock management.

This is the public class to be used when defining objects for locking resources.

Template Parameters
TThe type of the resource to be locked/unlocked
RThe registry which should contain the resouce to be locked/unlocked.
ExceptionDescThe parameter to be passed to the ExceptionType when a range_error happens.
ExceptionTypeThe type of exception to throw on range_errors

Constructor & Destructor Documentation

◆ ObjectRegistryResourceLock() [1/2]

template<typename T , ObjectRegistry< T > & R, ORRLExceptionDesc & ExceptionDesc, typename ExceptionType >
ObjectRegistryResourceLock< T, R, ExceptionDesc, ExceptionType >::ObjectRegistryResourceLock ( T * Resource)
inline

Constructor.

Initialize by locking the object.

Exceptions
ExceptionTypeIf a range error occurs which indicates that the Resource is not being managed by R, then throw as ExceptionType instead.

◆ ObjectRegistryResourceLock() [2/2]

template<typename T , ObjectRegistry< T > & R, ORRLExceptionDesc & ExceptionDesc, typename ExceptionType >
ObjectRegistryResourceLock< T, R, ExceptionDesc, ExceptionType >::ObjectRegistryResourceLock ( T * Resource)
inline

Constructor.

Initialize by locking the object.

Exceptions
ExceptionTypeIf a range error occurs which indicates that the Resource is not being managed by R, then throw as ExceptionType instead.

Member Data Documentation

◆ m_registry

template<class T >
ObjectRegistry< T > & ObjectRegistry< T >::AutoLock::m_registry
privateinherited

Registry object.

This is the registry that should contain the resouce.

◆ m_resource

template<class T >
T * ObjectRegistry< T >::AutoLock::m_resource
privateinherited

Resource object.

This is the resource that is being locked.


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