Skip to content

SpaceTransmuter

A visitor class that can serialize space definitions to a buffer.

This template class implements the visitor pattern to traverse and serialize different types of spaces into a buffer of type T. It can be used to convert space definitions into various serialized formats for storage or transmission.

template <typename T> class SpaceTransmuter : public ConstSpaceVisitor

Methods

operator()

virtual void operator()(const FMultiBinarySpace &Space) override

Processes a multi-binary space for serialization.

Parameters

  • Space (const FMultiBinarySpace)

operator()

virtual void operator()(const FDiscreteSpace &Space) override

Processes a discrete space for serialization.

Parameters

  • Space (const FDiscreteSpace)

operator()

virtual void operator()(const FMultiDiscreteSpace &Space) override

Processes a multi-discrete space for serialization.

Parameters

  • Space (const FMultiDiscreteSpace)

operator()

virtual void operator()(const FBoxSpace &Space) override

Processes a box space for serialization.

Parameters

  • Space (const FBoxSpace)

operator()

virtual void operator()(const FDictSpace &Space) override

Processes a dictionary space for serialization.

Parameters

  • Space (const FDictSpace)

Build

T *Build()

Builds and returns a new buffer containing the serialized space.


Build

void Build(T &EmptyBuffer)

Builds the serialized space into an existing empty buffer.

Parameters

  • EmptyBuffer (T)

Source: Source/Schola/Public/Common/SpaceTransmuter.h