Navigation
API > API/Runtime > API/Runtime/uLangCore
When we have an optional value IsSet() returns true, and GetValue() is meaningful. Otherwise GetValue() is not meaningful.
| Name | TOptional |
| Type | struct |
| Header File | /Engine/Source/Runtime/Solaris/uLangCore/Public/uLang/Common/Misc/Optional.h |
| Include Path | #include "uLang/Common/Misc/Optional.h" |
Syntax
template<typename OptionalType>
struct TOptional
Inheritance Hierarchy
- TOptionalBase → TOptional
- TOptional
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
TOptional
(
const OptionalType& Value |
Construct an OptionaType with a valid value. | uLang/Common/Misc/Optional.h | |
TOptional
(
OptionalType&& Value |
uLang/Common/Misc/Optional.h | ||
| Construct an OptionalType with no value; i.e. unset | uLang/Common/Misc/Optional.h | ||
| Copy/Move construction | uLang/Common/Misc/Optional.h | ||
| uLang/Common/Misc/Optional.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
~TOptional() |
uLang/Common/Misc/Optional.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| _Result | EResult | uLang/Common/Misc/Optional.h | ||
| _Value | TTypeCompatibleBytes< OptionalType > | uLang/Common/Misc/Optional.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void Emplace
(
ArgsType&&... Args |
uLang/Common/Misc/Optional.h | ||
const OptionalType & Get
(
const OptionalType& DefaultValue |
uLang/Common/Misc/Optional.h | ||
ULANG_FORCEINLINEEResult GetResult() |
uLang/Common/Misc/Optional.h | ||
const OptionalType & GetValue () |
uLang/Common/Misc/Optional.h | ||
OptionalType & GetValue () |
uLang/Common/Misc/Optional.h | ||
ULANG_FORCEINLINE bool IsSet() |
uLang/Common/Misc/Optional.h | ||
void Reset() |
uLang/Common/Misc/Optional.h |
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
ULANG_FORCEINLINE operator bool() |
uLang/Common/Misc/Optional.h | ||
ULANG_FORCEINLINE operator const OptionalType *() |
uLang/Common/Misc/Optional.h | ||
ULANG_FORCEINLINE operator OptionalType *() |
uLang/Common/Misc/Optional.h | ||
OptionalType & operator* () |
uLang/Common/Misc/Optional.h | ||
const OptionalType & operator* () |
uLang/Common/Misc/Optional.h | ||
| uLang/Common/Misc/Optional.h | |||
| uLang/Common/Misc/Optional.h | |||
| uLang/Common/Misc/Optional.h | |||
| uLang/Common/Misc/Optional.h | |||
const OptionalType * operator-> () |
uLang/Common/Misc/Optional.h | ||
OptionalType * operator-> () |
uLang/Common/Misc/Optional.h |