Leviathan  0.8.0.0
Leviathan game engine
Leviathan::Locker Class Reference

#include <ThreadSafe.h>

Static Public Member Functions

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

Member Function Documentation

◆ Object() [1/4]

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

Definition at line 50 of file ThreadSafe.h.

50  {
51 
52  return Unique(TurnToPointer(object)->ObjectsLock);
53  }
static auto Unique(LockType &lockref)
Definition: ThreadSafe.h:74

◆ Object() [2/4]

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

Definition at line 56 of file ThreadSafe.h.

56  {
57 
58  return Unique(TurnToPointer(object)->ObjectsLock);
59  }
static auto Unique(LockType &lockref)
Definition: ThreadSafe.h:74

◆ Object() [3/4]

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

Definition at line 62 of file ThreadSafe.h.

62  {
63 
64  return Unique(object->ObjectsLock);
65  }
static auto Unique(LockType &lockref)
Definition: ThreadSafe.h:74

◆ Object() [4/4]

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

Definition at line 68 of file ThreadSafe.h.

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

◆ Unique()

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

Definition at line 74 of file ThreadSafe.h.

74  {
75 
76  return typename LockTypeResolver<LockType>::LType(lockref);
77  }

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