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