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 39 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 55 of file ThreadSafe.h.

56  {
57  return TurnToPointer(object)->ObjectsLock;
58  }

◆ AcessLock() [2/2]

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

Definition at line 61 of file ThreadSafe.h.

62  {
63  return TurnToPointer(object)->ObjectsLock;
64  }

◆ Object() [1/4]

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

Definition at line 67 of file ThreadSafe.h.

68  {
69  return Unique(TurnToPointer(object)->ObjectsLock);
70  }
static auto Unique(LockType &lockref)
Definition: ThreadSafe.h:91

◆ Object() [2/4]

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

Definition at line 73 of file ThreadSafe.h.

74  {
75  return Unique(TurnToPointer(object)->ObjectsLock);
76  }
static auto Unique(LockType &lockref)
Definition: ThreadSafe.h:91

◆ Object() [3/4]

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

Definition at line 79 of file ThreadSafe.h.

80  {
81  return Unique(object->ObjectsLock);
82  }
static auto Unique(LockType &lockref)
Definition: ThreadSafe.h:91

◆ Object() [4/4]

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

Definition at line 85 of file ThreadSafe.h.

86  {
87  return Unique(object->ObjectsLock);
88  }
static auto Unique(LockType &lockref)
Definition: ThreadSafe.h:91

◆ Unique()

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

Definition at line 91 of file ThreadSafe.h.

92  {
93  return typename LockTypeResolver<LockType>::LType(lockref);
94  }

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