Struct FDictSpace
Struct FDictSpace
- Defined in File DictSpace.h
Inheritance Relationships
Base Type
public FSpace(Struct FSpace)
struct FDictSpace : public FSpaceSource: Source/Schola/Public/Common/Spaces/DictSpace.h
Dependencies: ConstSpaceVisitor, FPoint, FSpace, SpaceVisitor
A struct representing a dictionary of named sub-spaces.
A dictionary space contains multiple named sub-spaces, allowing for complex hierarchical structures. This is useful when observations or actions have multiple distinct components that need to be organized by name, such as “camera”, “velocity”, “position”, etc.
Public Functions
| Symbol | Details |
|---|---|
FDictSpace | Constructs an empty DictSpace. |
Num | Gets the number of sub-spaces in this dictionary. |
GetNumDimensions | Gets the number of dimensions in this dictionary space. |
IsEmpty | Checks if this space is empty. |
GetFlattenedSize | Gets the total flattened size of all sub-spaces. |
Validate | Validates that a point conforms to this space. |
Accept | Accepts a mutable visitor for the visitor pattern. |
Accept | Accepts a const visitor for the visitor pattern. |
FDictSpace
FDictSpace()Constructs an empty DictSpace.
Source: Source/Schola/Public/Common/Spaces/DictSpace.h
Implementation: Source/Schola/Private/Common/Spaces/DictSpace.cpp
Num
int Num()Gets the number of sub-spaces in this dictionary.
Returns:
The number of entries in the Spaces map.
Source: Source/Schola/Public/Common/Spaces/DictSpace.h
Implementation: Source/Schola/Private/Common/Spaces/DictSpace.cpp
GetNumDimensions
virtual int GetNumDimensions() const overrideGets the number of dimensions in this dictionary space.
Returns:
The sum of dimensions of all sub-spaces.
Attributes: const, virtual
Source: Source/Schola/Public/Common/Spaces/DictSpace.h
Implementation: Source/Schola/Private/Common/Spaces/DictSpace.cpp
IsEmpty
virtual bool IsEmpty() const overrideChecks if this space is empty.
Returns:
True if there are no sub-spaces, false otherwise.
Attributes: const, virtual
Source: Source/Schola/Public/Common/Spaces/DictSpace.h
Implementation: Source/Schola/Private/Common/Spaces/DictSpace.cpp
GetFlattenedSize
virtual int GetFlattenedSize() const overrideGets the total flattened size of all sub-spaces.
Returns:
The sum of flattened sizes of all sub-spaces.
Attributes: const, virtual
Source: Source/Schola/Public/Common/Spaces/DictSpace.h
Implementation: Source/Schola/Private/Common/Spaces/DictSpace.cpp
Validate
virtual ESpaceValidationResultValidate(const TInstancedStruct<FPoint> &InPoint) const overrideValidates that a point conforms to this space.
Validates that the point is a DictPoint and that all its sub-points conform to the corresponding sub-spaces.
Parameters
InPoint – [in] The point to validate.
Returns:
Validation result indicating success or failure reason.
| # | Direction | Name | Type | Description |
|---|---|---|---|---|
| 1 | — | InPoint | const TInstancedStruct< FPoint > & | The point to validate. |
Attributes: const, virtual
Source: Source/Schola/Public/Common/Spaces/DictSpace.h
Implementation: Source/Schola/Private/Common/Spaces/DictSpace.cpp
Accept
inline virtual void Accept(SpaceVisitor &InVisitor)Accepts a mutable visitor for the visitor pattern.
Parameters
InVisitor – [inout] The visitor to accept.
| # | Direction | Name | Type | Description |
|---|---|---|---|---|
| 1 | — | InVisitor | SpaceVisitor & | The visitor to accept. |
Attributes: inline, virtual
Source: Source/Schola/Public/Common/Spaces/DictSpace.h
Accept
inline virtual void Accept(ConstSpaceVisitor &InVisitor) constAccepts a const visitor for the visitor pattern.
Parameters
InVisitor – [inout] The const visitor to accept.
| # | Direction | Name | Type | Description |
|---|---|---|---|---|
| 1 | — | InVisitor | SpaceVisitor & | The visitor to accept. |
Attributes: inline, virtual
Source: Source/Schola/Public/Common/Spaces/DictSpace.h
Public Members
| Symbol | Details |
|---|---|
Spaces | The map of named sub-spaces in this dictionary. |
Spaces
TMap<FString, TInstancedStruct<FSpace>> SpacesThe map of named sub-spaces in this dictionary.
Each entry is a string key paired with a space value, allowing hierarchical organization of space definitions.