Mir
Public Member Functions | Friends | List of all members
mir::Synchronised< T >::LockedImpl< U > Class Template Reference

Smart-pointer-esque accessor for the protected data. More...

#include <synchronised.h>

Public Member Functions

 LockedImpl (LockedImpl &&from) noexcept
 
 ~LockedImpl ()=default
 
auto operator* () const -> U &
 
auto operator-> () const -> U *
 
void drop ()
 Relinquish access to the data. More...
 

Friends

class Synchronised
 

Detailed Description

template<typename T>
template<typename U>
class mir::Synchronised< T >::LockedImpl< U >

Smart-pointer-esque accessor for the protected data.

Ensures exclusive access to the referenced data.

Note
Instances of Locked must not outlive the Synchronised they are derived from.

Constructor & Destructor Documentation

◆ LockedImpl()

template<typename T >
template<typename U >
mir::Synchronised< T >::LockedImpl< U >::LockedImpl ( LockedImpl< U > &&  from)
inlinenoexcept

◆ ~LockedImpl()

template<typename T >
template<typename U >
mir::Synchronised< T >::LockedImpl< U >::~LockedImpl ( )
default

Member Function Documentation

◆ drop()

template<typename T >
template<typename U >
void mir::Synchronised< T >::LockedImpl< U >::drop ( )
inline

Relinquish access to the data.

This prevents further access to the contained data through this handle, and allows other code to acquire access.

◆ operator*()

template<typename T >
template<typename U >
auto mir::Synchronised< T >::LockedImpl< U >::operator* ( ) const -> U&
inline

◆ operator->()

template<typename T >
template<typename U >
auto mir::Synchronised< T >::LockedImpl< U >::operator-> ( ) const -> U*
inline

Friends And Related Function Documentation

◆ Synchronised

template<typename T >
template<typename U >
friend class Synchronised
friend

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

Copyright © 2012-2022 Canonical Ltd.
Generated on Tue Sep 13 03:20:30 UTC 2022
This documentation is licensed under the GPL version 2 or 3.