Skip to content

Struct FDictSpace

Struct FDictSpace

  • Defined in File DictSpace.h

Inheritance Relationships

Base Type

struct FDictSpace : public FSpace

Source: 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

SymbolDetails
FDictSpaceConstructs an empty DictSpace.
NumGets the number of sub-spaces in this dictionary.
GetNumDimensionsGets the number of dimensions in this dictionary space.
IsEmptyChecks if this space is empty.
GetFlattenedSizeGets the total flattened size of all sub-spaces.
ValidateValidates that a point conforms to this space.
AcceptAccepts a mutable visitor for the visitor pattern.
AcceptAccepts 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 override

Gets 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 override

Checks 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 override

Gets 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 ESpaceValidationResult
Validate(const TInstancedStruct<FPoint> &InPoint) const override

Validates 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.

#DirectionNameTypeDescription
1InPointconst 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.

#DirectionNameTypeDescription
1InVisitorSpaceVisitor &The visitor to accept.

Attributes: inline, virtual

Source: Source/Schola/Public/Common/Spaces/DictSpace.h

Accept

inline virtual void Accept(ConstSpaceVisitor &InVisitor) const

Accepts a const visitor for the visitor pattern.

Parameters

InVisitor – [inout] The const visitor to accept.

#DirectionNameTypeDescription
1InVisitorSpaceVisitor &The visitor to accept.

Attributes: inline, virtual

Source: Source/Schola/Public/Common/Spaces/DictSpace.h


Public Members

SymbolDetails
SpacesThe map of named sub-spaces in this dictionary.

Spaces

TMap<FString, TInstancedStruct<FSpace>> Spaces

The 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.