PStack  2.0
Stack trace printer for MSVC and GCC binaries
psystem::internal::managed_handle_proxy< T, C > Class Template Reference

Allows safe modification of a managed handle container when accessed by the handle's address. More...

#include <managed_handle_proxy.hpp>

Inheritance diagram for psystem::internal::managed_handle_proxy< T, C >:
Collaboration diagram for psystem::internal::managed_handle_proxy< T, C >:

Construction / Destruction

 managed_handle_proxy (C &container) noexcept
 Construct an instance for handle management. More...
 
 ~managed_handle_proxy () noexcept
 Synchronize changes back to the container on destruction.
 

Operator Overloads

 operator T * () noexcept
 Access a pointer to the managed handle. More...
 

Member Data

m_handle
 A temporary handle for tracking changes while accessed as a pointer-to-handle type.
 
C & m_container
 The container tracking the handle.
 

Additional Inherited Members

- Static Public Member Functions inherited from psystem::stack_allocated
static void operator delete (void *)=delete
 Individual object deletion.
 
static void operator delete[] (void *)=delete
 Array of type object deletion.
 
static void * operator new (size_t)=delete
 Individual object allocation.
 
static void * operator new[] (size_t)=delete
 Array of type allocation.
 
- Protected Member Functions inherited from psystem::not_assignable
not_assignableoperator= (not_assignable const &) const =delete
 Delete the basic assignment operator.
 
constexpr not_assignable () noexcept
 A simple CTOR suitable for noexcept and constexpr uses.
 
 ~not_assignable () noexcept
 A simple CTOR suitable for noexcept uses.
 

Detailed Description

template<typename T, typename C>
class psystem::internal::managed_handle_proxy< T, C >

Allows safe modification of a managed handle container when accessed by the handle's address.

This class template works essentially by creating a temporary container for the handle type. Only when the instance is destroyed, is the change synchronized back to the container instance.

Template Parameters
TThe handle type that can be stored in the handle container.
CThe continer type. It should follow the interface of unique_handle, etc.
Author
Matt Bisson
Date
20 March, 2015
Since
PSystem 2.0
Version
PSystem 2.0

Constructor & Destructor Documentation

template<typename T , typename C >
psystem::internal::managed_handle_proxy< T, C >::managed_handle_proxy ( C &  container)
inlineexplicitnoexcept

Construct an instance for handle management.

Parameters
[in]containerThe container managing a handle.

Member Function Documentation

template<typename T , typename C >
psystem::internal::managed_handle_proxy< T, C >::operator T * ( )
inlinenoexcept

Access a pointer to the managed handle.

Returns
The (non-const) address to the managed handle.

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