Utility

Lowest layer of the engine containing various utility and helper classes.

Subcategories

Classes

  • Bitwise — Class for manipulating bit patterns.
  • PersistentCache — Cache that will persist between application runs.

Structs

  • Float754 — Floating point number broken down into components for easier access.
  • Float10 — 10-bit floating point number broken down into components for easier access.
  • Float11 — 11-bit floating point number broken down into components for easier access.
  • RTTIFieldInfo — Provides various optional information regarding a RTTI field.
  • RTTIPlainType — Template that you may specialize with a class if you want to provide simple serialization for it.
  • RTTIPlainTypeHelper — Helper that allows you to construct a RTTIPlainType <T > specialization more easily.

Enums

Free functions

B3DRTTISize

BitLength B3DRTTISize(const ElemType &data, bool compress = false)

Helper method when serializing known data types that have valid RTTIPlainType specialization.

Returns the size of the element when serialized.

B3DRTTIWrite

BitLength B3DRTTIWrite(const ElemType &data, Bitstream &stream, bool compress = false)

Helper method when serializing known data types that have valid RTTIPlainType specialization.

The data will be written to the provided stream and its write cursor advanced.

B3DRTTIRead

BitLength B3DRTTIRead(ElemType &data, Bitstream &stream, bool compress = false)

Helper method when serializing known data types that have valid RTTIPlainType specialization.

The data will be read from the provided stream and its read cursor advanced.

B3DRTTIWriteWithSizeHeader

BitLength B3DRTTIWriteWithSizeHeader(Bitstream &stream, const T &data, bool compress, P p)

Writes a set of data to the stream through the user provided function and then writes the size of that data as a header.

The size header is written as a 32-bit integer right before the data written by . The size value will include the size of the data from as well as the size of the header itself (32-bits). The size of the data is determined by the return value from . Returns the size written.

B3DRTTIReadSizeHeader

BitLength B3DRTTIReadSizeHeader(T &stream, bool compress, BitLength &size)

Reads the size header that was encoded with B3DRTTIWriteWithSizeHeader. contain the size value read from the stream, while the return value represents the number of bits read from the header itself (e.g. 4 bytes for uncompressed size).

B3DRTTIAddHeaderSize

inline void B3DRTTIAddHeaderSize(BitLength &size, bool compress)

Increments the provided size with the required size of the header.

Internal

Symbols intended for engine-internal use. Not part of the public API.

Classes

  • PersistentCacheObject Resource used for storing data within a PersistentCache.
  • PersistentCacheMetaData — Meta-data associated with each cache entry.
  • MemStackInternal — Describes a memory stack of a certain block capacity.
  • MemStackInternal::MemBlock — A single block of memory of BlockCapacity size.
  • MemStack — One of the fastest, but also very limiting type of allocator.
  • StackAllocatorTag — Allows use of a stack allocator by using normal new/delete/free/dealloc operators.
  • FreeAlloc Free allocator with no limitations, using traditional malloc/free under the hood.
  • StaticAlloc Static allocator that attempts to perform zero heap (dynamic) allocations by always keeping an active preallocated buffer.
  • StaticAlloc::MemBlock — A single block of memory within a static allocator.
  • StdStaticAlloc — Allocator for the standard library that internally uses a static allocator.
  • StdStaticAlloc::rebind
  • ProfilerAllocatorTag — Specialized allocator for profiler so we can avoid tracking internal profiler memory allocations which would skew profiler results.
  • DefaultContainerAllocator — Default allocator that will be used by containers such as arrays.
  • DefaultContainerAllocator::ForElementType
  • InlineContainerAllocator — Allocator that will allocate
  • InlineContainerAllocator::ForElementType
  • StringFormat — Helper class used for string formatting operations.
  • TEvent — Events allows you to register method callbacks that get notified when the event is triggered.
  • CrashHandler — Saves crash data and notifies the user when a crash occurs.
  • GroupAllocator — Provides an easy way to group multiple allocations under a single (actual) allocation.
  • IRTTIIterator — Interface for a RTTI iterator.
  • TRTTIIterator — Wraps a container that can be used for sequentially reading container contents, inserting new elements in the container, and retrieving container element count.
  • IDeltaHandler — Represents an interface RTTI objects need to implement if they want to provide custom delta generation and applying.
  • BinaryDeltaHandler — Generates and applies delta (differences) between two objects.
  • RTTIType — Provides an interface for accessing fields of a certain class.
  • ThreadNoPolicy — Policy used for thread start & end used by the ThreadPool.
  • TThreadPool — Class that maintains a pool of threads we can easily retrieve and use for any task.

Structs

Enums

Free functions

GetCrashHandler

CrashHandler &GetCrashHandler()

Easier way of accessing the CrashHandler.

IsReflectable

constexpr bool IsReflectable()

Checks is the provided type a value type deriving from IReflectable.

IsReflectableShared

constexpr bool IsReflectableShared()

Checks is the provided type a shared pointer referencing a type deriving from IReflectable.

IsPlain

constexpr bool IsPlain()

Checks is the provided type a plain type (implements the RTTIPlainType <T > specialization).

CreateFieldTypeSchema

RTTIFieldDataTypeSchema CreateFieldTypeSchema(const RTTIFieldInfo &fieldInfo)

Creates a schema for a type stored in a field.

ReadPlainType

void ReadPlainType(T &value, Bitstream &stream, const RTTIFieldInfo &info, bool useCompression)

Reads the provided plain object from the stream.

WritePlainType

void WritePlainType(const T &value, Bitstream &stream, const RTTIFieldInfo &info, bool useCompression)

Writes the provided plain object to the stream.

GetPlainTypeSize

BitLength GetPlainTypeSize(const T &value, const RTTIFieldInfo &info, bool useCompression)

Returns the size of the provided plain object.

SetReflectableValue

void SetReflectableValue(T &value, const IReflectable &reflectable)

Assigns the reflectable value to the provided field value.

GetReflectableValue

const IReflectable &GetReflectableValue(const T &value)

Reads the reflectable value from the provided field value.

SetReflectablePointerValue

void SetReflectablePointerValue(T &value, const SPtr<IReflectable> &reflectable)

Assigns the reflectable pointer to the provided field value.

GetReflectablePointerValue

SPtr<IReflectable> GetReflectablePointerValue(const T &value)

Reads the reflectable pointer from the provided field value.