MCRO
C++23 utilities for Unreal Engine.
Toggle main menu visibility
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
w
x
z
Functions
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
w
x
z
Variables
a
i
k
p
s
t
Typedefs
f
i
t
Enumerations
Concepts
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
Data Fields
All
a
b
c
d
e
f
g
h
i
m
n
o
p
r
s
t
v
w
~
Functions
a
b
c
d
e
f
g
h
i
m
n
o
p
r
s
t
w
~
Variables
a
b
c
d
e
f
h
i
m
n
o
p
r
s
t
v
w
Typedefs
a
b
c
d
e
f
i
m
p
r
s
t
v
w
Enumerations
Enumerator
Related Symbols
g
o
Files
File List
Globals
All
_
a
b
d
e
f
g
i
l
m
n
o
p
s
t
u
w
Functions
b
d
e
g
o
s
Typedefs
Macros
_
a
e
f
i
l
m
n
p
s
t
u
w
▼
MCRO
Who is this library for?
►
What MCRO can do?
Legal
►
Attribution
►
Bitter Recompense
Todo List
►
Namespaces
►
Concepts
►
Data Structures
▼
Files
▼
File List
►
Docs
►
Private
▼
Public
▼
Mcro
►
Delegates
►
Error
►
LibraryIncludes
►
Range
►
Rendering
►
Text
►
UObjects
►
Any.h
►
ArrayViews.h
►
AssertMacros.h
►
AutoModularFeature.h
►
Badge.h
Common.h
CommonCore.h
►
Composition.h
►
Concepts.h
►
ConstexprXXH3.h
►
Construct.h
►
Dll.h
►
Enums.h
►
Error.Fwd.h
►
Error.h
►
Finally.h
►
FmtMacros.h
►
FunctionTraits.h
►
InitializeOnCopy.h
►
Macros.h
►
Modules.h
►
Observable.Fwd.h
►
Observable.h
►
Once.h
►
Platform.h
►
Range.h
►
SharedObjects.h
►
Slate.h
►
Subsystems.h
►
Templates.h
►
Text.h
►
TextMacros.h
►
Threading.h
►
TimespanLiterals.h
►
Tuples.h
►
TypeName.h
►
Types.h
►
Void.h
►
Yaml.h
►
Zero.h
►
Globals
•
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
Concepts
Loading...
Searching...
No Matches
Badge.h
Go to the documentation of this file.
1
/** @noop License Comment
2
* @file
3
* @copyright
4
* This Source Code is subject to the terms of the Mozilla Public License, v2.0.
5
* If a copy of the MPL was not distributed with this file You can obtain one at
6
* https://mozilla.org/MPL/2.0/
7
*
8
* @author David Mórász
9
* @date 2025
10
*/
11
12
#pragma once
13
14
namespace
Mcro::Badge
15
{
16
/**
17
* @brief
18
* Use this template to give exclusive access to functions to specific classes.
19
*
20
* Like so:
21
* @code
22
* class A;
23
* class B;
24
* class C;
25
*
26
* class A
27
* {
28
* static void CallFromB(TBadge<B> badge) {...}
29
* };
30
*
31
* class B
32
* {
33
* void Foobar()
34
* {
35
* // OK
36
* A::CallFromB({});
37
* }
38
* };
39
*
40
* class C
41
* {
42
* void Foobar()
43
* {
44
* // compile error:
45
* // badge template instance declared in A::CallFromB is only friends with class B,
46
* // therefore the private default constructor is inaccessible from class C
47
* A::CallFromB({});
48
* }
49
* };
50
* @endcode
51
*/
52
template
<
class
T>
53
class
TBadge
54
{
55
friend
T;
56
private
:
TBadge
() {}
57
};
53
class
TBadge
{
…
};
58
}
14
namespace
Mcro::Badge
{
…
}
Mcro::Badge::TBadge
Use this template to give exclusive access to functions to specific classes.
Definition
Badge.h:54
Mcro::Badge
Definition
Badge.h:15
Public
Mcro
Badge.h
Generated by
1.12.0