Potato Engine
Hobby Game Engine Project
Classes | Public Types | Static Public Member Functions | Public Attributes | List of all members
up::ComponentMeta Struct Reference

Stores metadata about a Component type. More...

#include <component.h>

Classes

struct  holder
 

Public Types

using Copy = void(*)(void *dest, void const *source) noexcept
 
using Relocate = void(*)(void *dest, void *source) noexcept
 
using Destroy = void(*)(void *mem) noexcept
 

Static Public Member Functions

template<typename Component >
static constexpr ComponentMeta construct (string_view name) noexcept
 Creates a ComponentMeta; should only be used by the UP_COMPONENT macro.
 
template<typename Component >
static constexpr ComponentMeta const * get () noexcept
 Retrieves the ComponentMeta for a given type.
 

Public Attributes

ComponentId id = ComponentId::Unknown
 
Copy copy = nullptr
 
Relocate relocate = nullptr
 
Destroy destroy = nullptr
 
uint32 size = 0
 
uint32 alignment = 0
 
string_view name
 

Detailed Description

Stores metadata about a Component type.

This includes its size and alignment, functions for copying and destroying objects of the Component type, and so on.

Todo: replace with a ubiquitous reflection system of some kind


The documentation for this struct was generated from the following file: