Games Task Scheduler (GTS)
A multi-processor scheduling framework for games engines
gts::internal::GuardBase< T, TAccessorSharedMutex, TGrowSharedMutex > Class Template Reference

The base class for all Guards. More...

#include <Guards.h>

Inherited by gts::ReadGuard< T, TAccessorSharedMutex, TGrowSharedMutex >, and gts::WriteGuard< T, TAccessorSharedMutex, TGrowSharedMutex >.

Public Member Functions

 GuardBase (GuardBase const &)=delete
 
GuardBaseoperator= (GuardBase const &)=delete
 
 GuardBase (GuardBase &&other)
 
GuardBaseoperator= (GuardBase &&other)
 
 GuardBase (T *pItem, TAccessorSharedMutex *pAccessorMutex, TGrowSharedMutex *pGrowMutex)
 
T const & get () const
 Gets the contained value. More...
 
bool isValid () const
 Checks if the contained value is valid. More...
 

Protected Attributes

T * m_pItem
 
TAccessorSharedMutex * m_pAccessorMutex
 
TGrowSharedMutex * m_pGrowMutex
 

Detailed Description

template<typename T, typename TAccessorSharedMutex, typename TGrowSharedMutex>
class gts::internal::GuardBase< T, TAccessorSharedMutex, TGrowSharedMutex >

The base class for all Guards.

Member Function Documentation

◆ get()

template<typename T , typename TAccessorSharedMutex , typename TGrowSharedMutex >
T const & internal::GuardBase::get ( ) const

Gets the contained value.

Returns
The contained value.

◆ isValid()

template<typename T , typename TAccessorSharedMutex , typename TGrowSharedMutex >
bool internal::GuardBase::isValid ( ) const

Checks if the contained value is valid.

Returns
True if valid.