Helper macros to work with C++.
More...
|
#define | RETURN_SHARD_MANAGER |
| Returns the DataShardSubsystem.
|
|
#define | RETURN_SHARD_DATA(Type, Key) |
| Return a pointer to the data inside the shard.
|
|
#define | RETURN_SHARD_DATA_CHECKED(Type, Key) |
| Return a pointer to the data inside the shard.
|
|
#define | RETURN_SHARD_DATA_COPY(Type, Key) |
| Return a shard pointer to a copy of the current shard data.
|
|
#define | RETURN_SHARD_DATA_COPY_CHECKED(Type, Key) |
| Return a shard pointer to a copy of the current shard data.
|
|
#define | GET_SHARD_DATA(Type, VarName, Key) |
| Create a variable with the current shard data.
|
|
#define | GET_SHARD_DATA_CHECKED(Type, VarName, Key) |
| Create a variable with the current shard data.
|
|
#define | GET_SHARD_DATA_PTR(Type, VarName, Key) |
| Create a pointer variable pointing to the shard data.
|
|
#define | GET_SHARD_DATA_PTR_CHECK(Type, VarName, Key) |
| Create a pointer variable pointing to the shard data.
|
|
#define | GET_SHARD_DATA_COPY(Type, VarName, Key) |
| Create a shared pointer variable pointing to a copy of the current shard data.
|
|
#define | GET_SHARD_DATA_COPY_CHECKED(Type, VarName, Key) |
| Create a shared pointer variable pointing to a copy of the current shard data.
|
|
Helper macros to work with C++.
◆ GET_SHARD_DATA
#define GET_SHARD_DATA |
( |
| Type, |
|
|
| VarName, |
|
|
| Key ) |
Value:
#define RETURN_SHARD_MANAGER
Returns the DataShardSubsystem.
Definition DataShardMacros.h:19
Create a variable with the current shard data.
- Parameters
-
Type | Type of the data |
VarName | Name of the created variable |
Key | Key to the shard |
- Note
- Data will not update with the shard
◆ GET_SHARD_DATA_CHECKED
#define GET_SHARD_DATA_CHECKED |
( |
| Type, |
|
|
| VarName, |
|
|
| Key ) |
Value: const Type VarName = *[&]() { \
checkf(Value != nullptr, TEXT("Failed to find Shard for Key: %s"), *Key.ToString()); \
return Value; \
}();
Create a variable with the current shard data.
- Parameters
-
Type | Type of the data |
VarName | Name of the created variable |
Key | Key to the shard |
- Note
- Holds execution if data is nullptr
◆ GET_SHARD_DATA_COPY
#define GET_SHARD_DATA_COPY |
( |
| Type, |
|
|
| VarName, |
|
|
| Key ) |
Value:
#define RETURN_SHARD_DATA_COPY(Type, Key)
Return a shard pointer to a copy of the current shard data.
Definition DataShardMacros.h:62
Create a shared pointer variable pointing to a copy of the current shard data.
- Parameters
-
Type | Type of the data |
VarName | Name of the created shard pointer |
Key | Key to the shard |
- Note
- Data will not update with the shard
◆ GET_SHARD_DATA_COPY_CHECKED
#define GET_SHARD_DATA_COPY_CHECKED |
( |
| Type, |
|
|
| VarName, |
|
|
| Key ) |
Value: const TSharedPtr<const Type> VarName = [&]() { \
checkf(Value != nullptr, TEXT("Failed to find Shard for Key: %s"), *Key.ToString()); \
}();
Create a shared pointer variable pointing to a copy of the current shard data.
- Parameters
-
Type | Type of the data |
VarName | Name of the created shard pointer |
Key | Key to the shard |
- Note
- Data will not update with the shard
-
Holds execution if data is nullptr
◆ GET_SHARD_DATA_PTR
#define GET_SHARD_DATA_PTR |
( |
| Type, |
|
|
| VarName, |
|
|
| Key ) |
Value:
Create a pointer variable pointing to the shard data.
- Parameters
-
Type | Type of the data |
VarName | Name of the created pointer |
Key | Key to the shard |
◆ GET_SHARD_DATA_PTR_CHECK
#define GET_SHARD_DATA_PTR_CHECK |
( |
| Type, |
|
|
| VarName, |
|
|
| Key ) |
Value: const Type* VarName = [&]() { \
checkf(Value != nullptr, TEXT("Failed to find Shard for Key: %s"), *Key.ToString()); \
return Value; \
}();
Create a pointer variable pointing to the shard data.
- Parameters
-
Type | Type of the data |
VarName | Name of the created pointer |
Key | Key to the shard |
- Note
- Holds execution if data is nullptr
◆ RETURN_SHARD_DATA
#define RETURN_SHARD_DATA |
( |
| Type, |
|
|
| Key ) |
Value:
Return a pointer to the data inside the shard.
- Parameters
-
Type | Type of the data |
Key | Key to the shard |
◆ RETURN_SHARD_DATA_CHECKED
#define RETURN_SHARD_DATA_CHECKED |
( |
| Type, |
|
|
| Key ) |
Value: [&]() { \
checkf(Value != nullptr, TEXT("Failed to find Shard for Key: %s"), *Key.ToString()); \
return Value; \
}();
Return a pointer to the data inside the shard.
- Parameters
-
Type | Type of the data |
Key | Key to the shard |
- Note
- Holds execution if data is nullptr
◆ RETURN_SHARD_DATA_COPY
#define RETURN_SHARD_DATA_COPY |
( |
| Type, |
|
|
| Key ) |
Value:
Return a shard pointer to a copy of the current shard data.
- Parameters
-
Type | The of the data |
Key | Key to the shard |
- Note
- Data will not update with the shard
◆ RETURN_SHARD_DATA_COPY_CHECKED
#define RETURN_SHARD_DATA_COPY_CHECKED |
( |
| Type, |
|
|
| Key ) |
Value: [&]() { \
checkf(Value != nullptr, TEXT("Failed to find Shard for Key: %s"), *Key.ToString()); \
}();
Return a shard pointer to a copy of the current shard data.
- Parameters
-
Type | Type of the data |
Key | Key to the shard |
- Note
- Data will not update with the shard
-
Holds execution if data is nullptr
◆ RETURN_SHARD_MANAGER
#define RETURN_SHARD_MANAGER |
Value: [&]() { \
if(GEngine) \
if(GEngine->GameViewport) \
if(GEngine->GameViewport->GetGameInstance())\
{ \
const UDataShardSubsystem* Sub = GEngine->GameViewport->GetGameInstance()->GetSubsystem<UDataShardSubsystem>(); \
check(Sub) \
return Sub; \
} \
return static_cast<const UDataShardSubsystem*>(nullptr); \
} ()
Returns the DataShardSubsystem.