Skip to content

Class PointAllocator

Class PointAllocator

  • Defined in File PointAllocator.h

Inheritance Relationships

Base Type

class PointAllocator : public ConstSpaceVisitor

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

Dependencies: FBoxSpace, FDictSpace, FDiscreteSpace, FMultiBinarySpace, FMultiDiscreteSpace, FPoint, FSpace

Visitor class for allocating points that conform to a given space.

This class implements the visitor pattern to traverse space definitions and allocate corresponding point instances with the correct structure and default values. It’s used to create points that match a space’s requirements.


Public Functions

SymbolDetails
PointAllocatorConstructs a PointAllocator for a specific point instance.
operator()Allocates a MultiBinaryPoint for a MultiBinarySpace.
operator()Allocates a DiscretePoint for a DiscreteSpace.
operator()Allocates a MultiDiscretePoint for a MultiDiscreteSpace.
operator()Allocates a BoxPoint for a BoxSpace.
operator()Allocates a DictPoint for a DictSpace.

PointAllocator

inline explicit PointAllocator(TInstancedStruct<FPoint> &InOutPoint)

Constructs a PointAllocator for a specific point instance.

Parameters

InOutPoint – [inout] Reference to the point instance to allocate.

#DirectionNameTypeDescription
1InOutPointTInstancedStruct< FPoint > &Reference to the point instance to allocate.

Attributes: inline, explicit

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


operator()

inline virtual void operator()(const FMultiBinarySpace &InSpace) override

Allocates a MultiBinaryPoint for a MultiBinarySpace.

Parameters

InSpace – [in] The MultiBinarySpace to allocate for.

#DirectionNameTypeDescription
1InSpaceconst FMultiBinarySpace &The MultiBinarySpace to allocate for.

Attributes: inline, virtual

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


operator()

inline virtual void operator()(const FDiscreteSpace &InSpace) override

Allocates a DiscretePoint for a DiscreteSpace.

Parameters

InSpace – [in] The DiscreteSpace to allocate for.

#DirectionNameTypeDescription
1InSpaceconst FMultiBinarySpace &The MultiBinarySpace to allocate for.

Attributes: inline, virtual

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


operator()

inline virtual void operator()(const FMultiDiscreteSpace &InSpace) override

Allocates a MultiDiscretePoint for a MultiDiscreteSpace.

Parameters

InSpace – [in] The MultiDiscreteSpace to allocate for.

#DirectionNameTypeDescription
1InSpaceconst FMultiBinarySpace &The MultiBinarySpace to allocate for.

Attributes: inline, virtual

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


operator()

inline virtual void operator()(const FBoxSpace &InSpace) override

Allocates a BoxPoint for a BoxSpace.

Parameters

InSpace – [in] The BoxSpace to allocate for.

#DirectionNameTypeDescription
1InSpaceconst FMultiBinarySpace &The MultiBinarySpace to allocate for.

Attributes: inline, virtual

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


operator()

inline virtual void operator()(const FDictSpace &InSpace) override

Allocates a DictPoint for a DictSpace.

Recursively allocates sub-points for each entry in the dictionary space.

Parameters

InSpace – [in] The DictSpace to allocate for.

#DirectionNameTypeDescription
1InSpaceconst FMultiBinarySpace &The MultiBinarySpace to allocate for.

Attributes: inline, virtual

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


Public Static Functions

SymbolDetails
AllocatePointStatic utility function to allocate a point for a given space.

AllocatePoint

static inline void AllocatePoint(const TInstancedStruct<FSpace> &InSpace,
TInstancedStruct<FPoint> &PointToAllocate)

Static utility function to allocate a point for a given space.

Parameters

  • InSpace – [in] The space to allocate a point for.

  • PointToAllocate – [out] Output parameter that receives the allocated point.

#DirectionNameTypeDescription
1InSpaceconst TInstancedStruct< FSpace > &The space to allocate a point for.
2PointToAllocateTInstancedStruct< FPoint > &Output parameter that receives the allocated point.

Attributes: inline, static

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