Ark Server API (ASA) - Wiki
Loading...
Searching...
No Matches
TEnumAsByte< TEnum > Class Template Reference

#include <EnumAsByte.h>

Public Types

typedef TEnum EnumType
 

Public Member Functions

 TEnumAsByte ()=default
 
 TEnumAsByte (const TEnumAsByte &)=default
 
TEnumAsByteoperator= (const TEnumAsByte &)=default
 
FORCEINLINE TEnumAsByte (TEnum InValue)
 
FORCEINLINE TEnumAsByte (int32 InValue)
 
FORCEINLINE TEnumAsByte (uint8 InValue)
 
bool operator== (TEnum InValue) const
 
bool operator== (TEnumAsByte InValue) const
 
 operator TEnum () const
 
TEnum GetValue () const
 
uint8 GetIntValue () const
 

Private Types

typedef TEnumAsByte_EnumClass< TIsEnumClass< TEnum >::ValueCheck
 

Private Attributes

uint8 Value
 

Detailed Description

template<class TEnum>
class TEnumAsByte< TEnum >

Template to store enumeration values as bytes in a type-safe way.

Definition at line 18 of file EnumAsByte.h.

Member Typedef Documentation

◆ Check

Definition at line 20 of file EnumAsByte.h.

◆ EnumType

template<class TEnum >
typedef TEnum TEnumAsByte< TEnum >::EnumType

Definition at line 23 of file EnumAsByte.h.

Constructor & Destructor Documentation

◆ TEnumAsByte() [1/5]

template<class TEnum >
TEnumAsByte< TEnum >::TEnumAsByte ( )
default

◆ TEnumAsByte() [2/5]

◆ TEnumAsByte() [3/5]

template<class TEnum >
FORCEINLINE TEnumAsByte< TEnum >::TEnumAsByte ( TEnum InValue)
inline

Constructor, initialize to the enum value.

Parameters
InValuevalue to construct with.

Definition at line 34 of file EnumAsByte.h.

◆ TEnumAsByte() [4/5]

template<class TEnum >
FORCEINLINE TEnumAsByte< TEnum >::TEnumAsByte ( int32 InValue)
inlineexplicit

Constructor, initialize to the int32 value.

Parameters
InValuevalue to construct with.

Definition at line 43 of file EnumAsByte.h.

◆ TEnumAsByte() [5/5]

template<class TEnum >
FORCEINLINE TEnumAsByte< TEnum >::TEnumAsByte ( uint8 InValue)
inlineexplicit

Constructor, initialize to the int32 value.

Parameters
InValuevalue to construct with.

Definition at line 52 of file EnumAsByte.h.

Member Function Documentation

◆ GetIntValue()

template<class TEnum >
uint8 TEnumAsByte< TEnum >::GetIntValue ( ) const
inline

Gets the integer enumeration value.

Returns
The enumeration value.

Definition at line 102 of file EnumAsByte.h.

◆ GetValue()

template<class TEnum >
TEnum TEnumAsByte< TEnum >::GetValue ( ) const
inline

Gets the enumeration value.

Returns
The enumeration value.

Definition at line 92 of file EnumAsByte.h.

◆ operator TEnum()

template<class TEnum >
TEnumAsByte< TEnum >::operator TEnum ( ) const
inline

Implicit conversion to TEnum.

Definition at line 80 of file EnumAsByte.h.

◆ operator=()

◆ operator==() [1/2]

template<class TEnum >
bool TEnumAsByte< TEnum >::operator== ( TEnum InValue) const
inline

Compares two enumeration values for equality.

Parameters
InValueThe value to compare with.
Returns
true if the two values are equal, false otherwise.

Definition at line 63 of file EnumAsByte.h.

◆ operator==() [2/2]

template<class TEnum >
bool TEnumAsByte< TEnum >::operator== ( TEnumAsByte< TEnum > InValue) const
inline

Compares two enumeration values for equality.

Parameters
InValueThe value to compare with.
Returns
true if the two values are equal, false otherwise.

Definition at line 74 of file EnumAsByte.h.

Member Data Documentation

◆ Value

template<class TEnum >
uint8 TEnumAsByte< TEnum >::Value
private

Holds the value as a byte.

Definition at line 110 of file EnumAsByte.h.


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