Flecs v4.0
A fast entity component system (ECS) for C & C++
Loading...
Searching...
No Matches
flecs::opaque< T, ElemType > Struct Template Reference

Type safe interface for opaque types. More...

#include <opaque.hpp>

Public Member Functions

 opaque (flecs::world_t *w=nullptr)
 
opaqueas_type (flecs::id_t func)
 Type that describes the type kind/structure of the opaque type.
 
opaqueserialize (flecs::serialize< T > func)
 Serialize function.
 
opaqueassign_bool (void(*func)(T *dst, bool value))
 Assign bool value.
 
opaqueassign_char (void(*func)(T *dst, char value))
 Assign char value.
 
opaqueassign_int (void(*func)(T *dst, int64_t value))
 Assign int value.
 
opaqueassign_uint (void(*func)(T *dst, uint64_t value))
 Assign unsigned int value.
 
opaqueassign_float (void(*func)(T *dst, double value))
 Assign float value.
 
opaqueassign_string (void(*func)(T *dst, const char *value))
 Assign string value.
 
opaqueassign_entity (void(*func)(T *dst, ecs_world_t *world, ecs_entity_t entity))
 Assign entity value.
 
opaqueassign_id (void(*func)(T *dst, ecs_world_t *world, ecs_id_t id))
 Assign (component) id value.
 
opaqueassign_null (void(*func)(T *dst))
 Assign null value.
 
opaqueclear (void(*func)(T *dst))
 Clear collection elements.
 
opaqueensure_element (ElemType *(*func)(T *dst, size_t elem))
 Ensure & get collection element.
 
opaqueensure_member (void *(*func)(T *dst, const char *member))
 Ensure & get element.
 
opaquecount (size_t(*func)(const T *dst))
 Return number of elements.
 
opaqueresize (void(*func)(T *dst, size_t count))
 Resize to number of elements.
 

Public Attributes

flecs::world_t * world = nullptr
 Opaque type descriptor.
 
ecs_opaque_desc_t desc = {}
 

Detailed Description

template<typename T, typename ElemType = void>
struct flecs::opaque< T, ElemType >

Type safe interface for opaque types.

Definition at line 32 of file opaque.hpp.

Constructor & Destructor Documentation

◆ opaque()

template<typename T , typename ElemType = void>
flecs::opaque< T, ElemType >::opaque ( flecs::world_t * w = nullptr)
inline

Definition at line 33 of file opaque.hpp.

◆ ~opaque()

template<typename T , typename ElemType = void>
flecs::opaque< T, ElemType >::~opaque ( )
inline

Definition at line 169 of file opaque.hpp.

Member Function Documentation

◆ as_type()

template<typename T , typename ElemType = void>
opaque & flecs::opaque< T, ElemType >::as_type ( flecs::id_t func)
inline

Type that describes the type kind/structure of the opaque type.

Definition at line 40 of file opaque.hpp.

◆ assign_bool()

template<typename T , typename ElemType = void>
opaque & flecs::opaque< T, ElemType >::assign_bool ( void(*)(T *dst, bool value) func)
inline

Assign bool value.

Definition at line 54 of file opaque.hpp.

◆ assign_char()

template<typename T , typename ElemType = void>
opaque & flecs::opaque< T, ElemType >::assign_char ( void(*)(T *dst, char value) func)
inline

Assign char value.

Definition at line 62 of file opaque.hpp.

◆ assign_entity()

template<typename T , typename ElemType = void>
opaque & flecs::opaque< T, ElemType >::assign_entity ( void(*)(T *dst, ecs_world_t *world, ecs_entity_t entity) func)
inline

Assign entity value.

Definition at line 102 of file opaque.hpp.

◆ assign_float()

template<typename T , typename ElemType = void>
opaque & flecs::opaque< T, ElemType >::assign_float ( void(*)(T *dst, double value) func)
inline

Assign float value.

Definition at line 86 of file opaque.hpp.

◆ assign_id()

template<typename T , typename ElemType = void>
opaque & flecs::opaque< T, ElemType >::assign_id ( void(*)(T *dst, ecs_world_t *world, ecs_id_t id) func)
inline

Assign (component) id value.

Definition at line 112 of file opaque.hpp.

◆ assign_int()

template<typename T , typename ElemType = void>
opaque & flecs::opaque< T, ElemType >::assign_int ( void(*)(T *dst, int64_t value) func)
inline

Assign int value.

Definition at line 70 of file opaque.hpp.

◆ assign_null()

template<typename T , typename ElemType = void>
opaque & flecs::opaque< T, ElemType >::assign_null ( void(*)(T *dst) func)
inline

Assign null value.

Definition at line 122 of file opaque.hpp.

◆ assign_string()

template<typename T , typename ElemType = void>
opaque & flecs::opaque< T, ElemType >::assign_string ( void(*)(T *dst, const char *value) func)
inline

Assign string value.

Definition at line 94 of file opaque.hpp.

◆ assign_uint()

template<typename T , typename ElemType = void>
opaque & flecs::opaque< T, ElemType >::assign_uint ( void(*)(T *dst, uint64_t value) func)
inline

Assign unsigned int value.

Definition at line 78 of file opaque.hpp.

◆ clear()

template<typename T , typename ElemType = void>
opaque & flecs::opaque< T, ElemType >::clear ( void(*)(T *dst) func)
inline

Clear collection elements.

Definition at line 130 of file opaque.hpp.

◆ count()

template<typename T , typename ElemType = void>
opaque & flecs::opaque< T, ElemType >::count ( size_t(*)(const T *dst) func)
inline

Return number of elements.

Definition at line 154 of file opaque.hpp.

◆ ensure_element()

template<typename T , typename ElemType = void>
opaque & flecs::opaque< T, ElemType >::ensure_element ( ElemType *(*)(T *dst, size_t elem) func)
inline

Ensure & get collection element.

Definition at line 138 of file opaque.hpp.

◆ ensure_member()

template<typename T , typename ElemType = void>
opaque & flecs::opaque< T, ElemType >::ensure_member ( void *(*)(T *dst, const char *member) func)
inline

Ensure & get element.

Definition at line 146 of file opaque.hpp.

◆ resize()

template<typename T , typename ElemType = void>
opaque & flecs::opaque< T, ElemType >::resize ( void(*)(T *dst, size_t count) func)
inline

Resize to number of elements.

Definition at line 162 of file opaque.hpp.

◆ serialize()

template<typename T , typename ElemType = void>
opaque & flecs::opaque< T, ElemType >::serialize ( flecs::serialize< T > func)
inline

Serialize function.

Definition at line 46 of file opaque.hpp.

Member Data Documentation

◆ desc

template<typename T , typename ElemType = void>
ecs_opaque_desc_t flecs::opaque< T, ElemType >::desc = {}

Definition at line 177 of file opaque.hpp.

◆ world

template<typename T , typename ElemType = void>
flecs::world_t* flecs::opaque< T, ElemType >::world = nullptr

Opaque type descriptor.

Definition at line 176 of file opaque.hpp.


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