Flecs v3.2
A fast entity component system (ECS) for C & C++
Loading...
Searching...
No Matches
flecs::untyped_column Struct Reference

Unsafe wrapper class around a column. More...

#include <iter.hpp>

Public Member Functions

 untyped_column (void *array, size_t size, size_t count, bool is_shared=false)
 
void * operator[] (size_t index) const
 Return element in component array.
 

Protected Attributes

void * m_array
 
size_t m_size
 
size_t m_count
 
bool m_is_shared
 

Detailed Description

Unsafe wrapper class around a column.

This class can be used when a system does not know the type of a column at compile time.

Definition at line 25 of file iter.hpp.

Constructor & Destructor Documentation

◆ untyped_column()

flecs::untyped_column::untyped_column ( void * array,
size_t size,
size_t count,
bool is_shared = false )
inline

Definition at line 26 of file iter.hpp.

Member Function Documentation

◆ operator[]()

void * flecs::untyped_column::operator[] ( size_t index) const
inline

Return element in component array.

This operator may only be used if the column is not shared.

Parameters
indexIndex of element.
Returns
Reference to element.

Definition at line 38 of file iter.hpp.

Member Data Documentation

◆ m_array

void* flecs::untyped_column::m_array
protected

Definition at line 45 of file iter.hpp.

◆ m_count

size_t flecs::untyped_column::m_count
protected

Definition at line 47 of file iter.hpp.

◆ m_is_shared

bool flecs::untyped_column::m_is_shared
protected

Definition at line 48 of file iter.hpp.

◆ m_size

size_t flecs::untyped_column::m_size
protected

Definition at line 46 of file iter.hpp.


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