PointAllocator
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.
class PointAllocator : public ConstSpaceVisitorMethods
PointAllocator
inline explicit PointAllocator(TInstancedStruct<FPoint> &InOutPoint)Constructs a PointAllocator for a specific point instance.
Parameters
InOutPoint(TInstancedStruct<FPoint>)
operator()
inline virtual void operator()(const FMultiBinarySpace &InSpace) overrideAllocates a MultiBinaryPoint for a MultiBinarySpace.
Parameters
InSpace(const FMultiBinarySpace)
operator()
inline virtual void operator()(const FDiscreteSpace &InSpace) overrideAllocates a DiscretePoint for a DiscreteSpace.
Parameters
InSpace(const FDiscreteSpace)
operator()
inline virtual void operator()(const FMultiDiscreteSpace &InSpace) overrideAllocates a MultiDiscretePoint for a MultiDiscreteSpace.
Parameters
InSpace(const FMultiDiscreteSpace)
operator()
inline virtual void operator()(const FBoxSpace &InSpace) overrideAllocates a BoxPoint for a BoxSpace.
Parameters
InSpace(const FBoxSpace)
operator()
inline virtual void operator()(const FDictSpace &InSpace) overrideAllocates a DictPoint for a DictSpace.
Parameters
InSpace(const FDictSpace)
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(const TInstancedStruct<FSpace>) -
PointToAllocate(TInstancedStruct<FPoint>)