MIRA
Classes | Public Member Functions | List of all members
SharedAuthority Class Reference

A wrapper providing locked/shared access to an AbstractAuthority pointer (used by AuthorityManager::getAuthority()) The lifetime of the AbstractAuthority object the pointer points to is ensured as long as one wrapper instance exists that wraps the same AbstractAuthority pointer. More...

#include <fw/AuthorityManager.h>

Public Member Functions

 SharedAuthority (AbstractAuthority *iAuthority, boost::shared_mutex &mutex)
 There is no need to call this constructor manually. More...
 
 operator AbstractAuthority * ()
 cast to AbstractAuthority pointer More...
 
AbstractAuthorityauthority ()
 access the wrapped AbstractAuthority pointer More...
 

Detailed Description

A wrapper providing locked/shared access to an AbstractAuthority pointer (used by AuthorityManager::getAuthority()) The lifetime of the AbstractAuthority object the pointer points to is ensured as long as one wrapper instance exists that wraps the same AbstractAuthority pointer.

The lock is released automatically when all wrapper instances are destroyed.

Constructor & Destructor Documentation

◆ SharedAuthority()

SharedAuthority ( AbstractAuthority iAuthority,
boost::shared_mutex &  mutex 
)
inline

There is no need to call this constructor manually.

Member Function Documentation

◆ operator AbstractAuthority *()

operator AbstractAuthority * ( )
inline

cast to AbstractAuthority pointer

◆ authority()

AbstractAuthority* authority ( )
inline

access the wrapped AbstractAuthority pointer


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