Ark Server API (ASA) - Wiki
Loading...
Searching...
No Matches
DontCopy.h
Go to the documentation of this file.
1
// Copyright Epic Games, Inc. All Rights Reserved.
2
3
#
pragma
once
4
5
#
include
"CoreTypes.h"
6
7
// Can be used as a wrapper over non-copyable objects (i.e. FCriticalSection) if you still want the class containing your
8
// object to keep its copyable property without compromising integrity of the object that doesn't support being copied.
9
// It makes each TDontCopy member of a class an exclusive entity of that class.
10
11
template
<
typename
T>
12
struct
TDontCopy
13
{
14
TDontCopy
() =
default
;
15
~
TDontCopy
() =
default
;
16
TDontCopy
(
TDontCopy
&&) {}
17
TDontCopy
(
const
TDontCopy
&) {}
18
TDontCopy
&
operator
=(
TDontCopy
&&) {
return
*
this
; }
19
TDontCopy
&
operator
=(
const
TDontCopy
&) {
return
*
this
; }
20
21
T&
Get
() {
return
Value
; }
22
const
T&
Get
()
const
{
return
Value
; }
23
24
T*
operator
->() {
return
&
Value
; }
25
const
T*
operator
->()
const
{
return
&
Value
; }
26
27
T&
operator
*() {
return
Value
; }
28
const
T&
operator
*()
const
{
return
Value
; }
29
30
private
:
31
T
Value
;
32
};
TDontCopy
Definition
DontCopy.h:13
TDontCopy::operator*
T & operator*()
Definition
DontCopy.h:27
TDontCopy::Get
T & Get()
Definition
DontCopy.h:21
TDontCopy::Get
const T & Get() const
Definition
DontCopy.h:22
TDontCopy::operator->
T * operator->()
Definition
DontCopy.h:24
TDontCopy::TDontCopy
TDontCopy(TDontCopy &&)
Definition
DontCopy.h:16
TDontCopy::operator*
const T & operator*() const
Definition
DontCopy.h:28
TDontCopy::TDontCopy
TDontCopy(const TDontCopy &)
Definition
DontCopy.h:17
TDontCopy::~TDontCopy
~TDontCopy()=default
TDontCopy::operator=
TDontCopy & operator=(TDontCopy &&)
Definition
DontCopy.h:18
TDontCopy::operator->
const T * operator->() const
Definition
DontCopy.h:25
TDontCopy::operator=
TDontCopy & operator=(const TDontCopy &)
Definition
DontCopy.h:19
TDontCopy::TDontCopy
TDontCopy()=default
TDontCopy::Value
T Value
Definition
DontCopy.h:31
Downloads
ArkServerAPI_NEW
ASA
AsaApi
AsaApi
Core
Public
API
UE
Templates
DontCopy.h
Generated by
1.10.0