Leviathan  0.8.0.0
Leviathan game engine
Leviathan::Locker Class Reference

#include <ThreadSafe.h>

Static Public Member Functions

template<typename ObjectClass >
static auto & AcessLock (const ObjectClass *object)
 
template<typename ObjectClass >
static auto & AcessLock (const ObjectClass &object)
 
template<typename ObjectClass >
static auto Object (const ObjectClass *object)
 
template<typename ObjectClass >
static auto Object (const ObjectClass &object)
 
template<typename ObjectClass >
static auto Object (std::shared_ptr< ObjectClass > &object)
 
template<typename ObjectClass >
static auto Object (std::unique_ptr< ObjectClass > &object)
 
template<class LockType >
static auto Unique (LockType &lockref)
 

Detailed Description

Definition at line 41 of file ThreadSafe.h.

Member Function Documentation

◆ AcessLock() [1/2]

template<typename ObjectClass >
static auto& Leviathan::Locker::AcessLock ( const ObjectClass *  object)
inlinestatic

Definition at line 69 of file ThreadSafe.h.

70  {
71  return TurnToPointer(object)->ObjectsLock;
72  }

◆ AcessLock() [2/2]

template<typename ObjectClass >
static auto& Leviathan::Locker::AcessLock ( const ObjectClass &  object)
inlinestatic

Definition at line 75 of file ThreadSafe.h.

76  {
77  return TurnToPointer(object)->ObjectsLock;
78  }

◆ Object() [1/4]

template<typename ObjectClass >
static auto Leviathan::Locker::Object ( const ObjectClass *  object)
inlinestatic

Definition at line 81 of file ThreadSafe.h.

82  {
83  return Unique(TurnToPointer(object)->ObjectsLock);
84  }
static auto Unique(LockType &lockref)
Definition: ThreadSafe.h:105

◆ Object() [2/4]

template<typename ObjectClass >
static auto Leviathan::Locker::Object ( const ObjectClass &  object)
inlinestatic

Definition at line 87 of file ThreadSafe.h.

88  {
89  return Unique(TurnToPointer(object)->ObjectsLock);
90  }
static auto Unique(LockType &lockref)
Definition: ThreadSafe.h:105

◆ Object() [3/4]

template<typename ObjectClass >
static auto Leviathan::Locker::Object ( std::shared_ptr< ObjectClass > &  object)
inlinestatic

Definition at line 93 of file ThreadSafe.h.

94  {
95  return Unique(object->ObjectsLock);
96  }
static auto Unique(LockType &lockref)
Definition: ThreadSafe.h:105

◆ Object() [4/4]

template<typename ObjectClass >
static auto Leviathan::Locker::Object ( std::unique_ptr< ObjectClass > &  object)
inlinestatic

Definition at line 99 of file ThreadSafe.h.

100  {
101  return Unique(object->ObjectsLock);
102  }
static auto Unique(LockType &lockref)
Definition: ThreadSafe.h:105

◆ Unique()

template<class LockType >
static auto Leviathan::Locker::Unique ( LockType &  lockref)
inlinestatic

Definition at line 105 of file ThreadSafe.h.

106  {
107  return typename LockTypeResolver<LockType>::LType(lockref);
108  }

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