Module |
|
Header |
/Engine/Source/Runtime/Core/Public/Containers/Union.h |
Include |
#include "Containers/Union.h" |
template<typename TypeA, typename TypeB, typename TypeC, typename TypeD, typename TypeE, typename TypeF>
class TUnion
Represents a type which is the union of several other types; i.e. it can have a value whose type is of any the union's subtypes. This differs from C union types by being type-safe, and supporting non-trivial data types as subtypes. Since a value for the union must be of a single subtype, the union stores potential values of different subtypes in overlapped memory, and keeps track of which one is currently valid.
Name | Description | |
---|---|---|
|
TUnion() |
Default constructor. |
|
TUnion ( |
Copy constructor. |
|
TUnion ( |
Initialization constructor. |
|
TUnion ( |
Initialization constructor. |
|
TUnion ( |
Initialization constructor. |
|
TUnion ( |
Initialization constructor. |
|
TUnion ( |
Initialization constructor. |
|
TUnion ( |
Initialization constructor. |
Name | Description | |
---|---|---|
|
~TUnion() |
Destructor. |
Name | Description | ||
---|---|---|---|
|
GetCurrentSubtypeIndex() |
||
|
Subtype & |
GetSubtype() |
|
|
const Subtyp... |
GetSubtype() |
|
|
HasSubtype() |
||
|
Reset() |
Sets the union's value to NULL. |
|
|
ResetSubtype() |
If the union's current value is of the given subtype, sets the union's value to a NULL value. |
|
|
Subtype *... |
SetSubtype ( |
Replaces the value of the union with a value of the given subtype. |