mn::pointer::basic_lock_ptr< T, TLOCK > Class Template Reference
auto lock pointer. More...
#include <mn_lock_ptr.hpp>
Public Types | |
using | value_type = T |
using | element_type = T |
using | const_value_type = const T |
using | lock_type = TLOCK |
using | pointer = T * |
using | const_pointer = T * |
using | reference = T & |
using | const_reference = const T & |
using | self_type = basic_lock_ptr< T, TLOCK > |
Public Member Functions | |
basic_lock_ptr (volatile reference v, lock_type &m) | |
constructor make the pointer and auto lock More... | |
basic_lock_ptr (volatile pointer v, lock_type &m) | |
constructor make the pointer and auto lock More... | |
~basic_lock_ptr () | |
decunstructor and auto unlock the pointer More... | |
const_pointer | get () const |
Get the pointer value. More... | |
pointer | get () |
Get the pointer value. More... | |
const_reference | operator* () const |
Get the reference of the pointer. More... | |
reference | operator* () |
Get the reference of the pointer. More... | |
const_pointer | operator-> () const |
Helper to use this pointer as "native" pointer. More... | |
pointer | operator-> () |
Helper to use this pointer as "native" pointer. More... | |
pointer | release () |
void | reset (pointer p=NULL) |
lock_type & | get_lock () |
basic_lock_ptr (const basic_lock_ptr &)=delete | |
basic_lock_ptr & | operator= (const basic_lock_ptr &)=delete |
Private Attributes | |
volatile pointer | m_ptr |
lock_type & | m_lock |
Detailed Description
template<typename T, class TLOCK = LockType_t>
class mn::pointer::basic_lock_ptr< T, TLOCK >
auto lock pointer.
- Template Parameters
-
T pointer type of this lock pointer TLOCK lock class
- See also
- defalt_lock
Member Typedef Documentation
◆ const_pointer
template<typename T , class TLOCK = LockType_t>
using mn::pointer::basic_lock_ptr< T, TLOCK >::const_pointer = T* |
◆ const_reference
template<typename T , class TLOCK = LockType_t>
using mn::pointer::basic_lock_ptr< T, TLOCK >::const_reference = const T& |
◆ const_value_type
template<typename T , class TLOCK = LockType_t>
using mn::pointer::basic_lock_ptr< T, TLOCK >::const_value_type = const T |
◆ element_type
template<typename T , class TLOCK = LockType_t>
using mn::pointer::basic_lock_ptr< T, TLOCK >::element_type = T |
◆ lock_type
template<typename T , class TLOCK = LockType_t>
using mn::pointer::basic_lock_ptr< T, TLOCK >::lock_type = TLOCK |
◆ pointer
template<typename T , class TLOCK = LockType_t>
using mn::pointer::basic_lock_ptr< T, TLOCK >::pointer = T* |
◆ reference
template<typename T , class TLOCK = LockType_t>
using mn::pointer::basic_lock_ptr< T, TLOCK >::reference = T& |
◆ self_type
template<typename T , class TLOCK = LockType_t>
using mn::pointer::basic_lock_ptr< T, TLOCK >::self_type = basic_lock_ptr<T, TLOCK> |
◆ value_type
template<typename T , class TLOCK = LockType_t>
using mn::pointer::basic_lock_ptr< T, TLOCK >::value_type = T |
Constructor & Destructor Documentation
◆ basic_lock_ptr() [1/3]
template<typename T , class TLOCK = LockType_t>
|
inline |
constructor make the pointer and auto lock
- Parameters
-
v Reference to locked area/object m The reference of the lock object
◆ basic_lock_ptr() [2/3]
template<typename T , class TLOCK = LockType_t>
|
inline |
constructor make the pointer and auto lock
- Parameters
-
v Pointer to locked area/object m The reference of the lock object
◆ ~basic_lock_ptr()
template<typename T , class TLOCK = LockType_t>
|
inline |
decunstructor and auto unlock the pointer
◆ basic_lock_ptr() [3/3]
template<typename T , class TLOCK = LockType_t>
|
delete |
Member Function Documentation
◆ get() [1/2]
template<typename T , class TLOCK = LockType_t>
|
inline |
Get the pointer value.
- Returns
- The pointer value
◆ get() [2/2]
template<typename T , class TLOCK = LockType_t>
|
inline |
Get the pointer value.
- Returns
- The pointer value
◆ get_lock()
template<typename T , class TLOCK = LockType_t>
|
inline |
◆ operator*() [1/2]
template<typename T , class TLOCK = LockType_t>
|
inline |
Get the reference of the pointer.
- Returns
- The reference of the pointer
◆ operator*() [2/2]
template<typename T , class TLOCK = LockType_t>
|
inline |
Get the reference of the pointer.
- Returns
- The reference of the pointer
◆ operator->() [1/2]
template<typename T , class TLOCK = LockType_t>
|
inline |
Helper to use this pointer as "native" pointer.
◆ operator->() [2/2]
template<typename T , class TLOCK = LockType_t>
|
inline |
Helper to use this pointer as "native" pointer.
◆ operator=()
template<typename T , class TLOCK = LockType_t>
|
delete |
◆ release()
template<typename T , class TLOCK = LockType_t>
|
inline |
◆ reset()
template<typename T , class TLOCK = LockType_t>
|
inline |
Member Data Documentation
◆ m_lock
template<typename T , class TLOCK = LockType_t>
|
private |
◆ m_ptr
template<typename T , class TLOCK = LockType_t>
|
private |
The documentation for this class was generated from the following file: