Flecs v4.0
A fast entity component system (ECS) for C & C++
|
Class for reading/writing dynamic values. More...
#include <cursor.hpp>
Public Member Functions | |
cursor (flecs::world_t *world, flecs::entity_t type_id, void *ptr) | |
int | push () |
Push value scope (such as a nested struct) | |
int | pop () |
Pop value scope. | |
int | next () |
Move to next member/element. | |
int | member (const char *name) |
Move to member by name. | |
int | elem (int32_t elem) |
Move to element by index. | |
bool | is_collection () |
Test if current scope is a collection type. | |
flecs::string_view | get_member () const |
Get member name. | |
flecs::entity | get_type () const |
Get type of value. | |
flecs::entity | get_unit () const |
Get unit of value. | |
void * | get_ptr () |
Get untyped pointer to value. | |
int | set_bool (bool value) |
Set boolean value. | |
int | set_char (char value) |
Set char value. | |
int | set_int (int64_t value) |
Set signed int value. | |
int | set_uint (uint64_t value) |
Set unsigned int value. | |
int | set_float (double value) |
Set float value. | |
int | set_string (const char *value) |
Set string value. | |
int | set_string_literal (const char *value) |
Set string literal value. | |
int | set_entity (flecs::entity_t value) |
Set entity value. | |
int | set_id (flecs::id_t value) |
Set (component) id value. | |
int | set_null () |
Set null value. | |
bool | get_bool () const |
Get boolean value. | |
char | get_char () const |
Get char value. | |
int64_t | get_int () const |
Get signed int value. | |
uint64_t | get_uint () const |
Get unsigned int value. | |
double | get_float () const |
Get float value. | |
const char * | get_string () const |
Get string value. | |
flecs::entity | get_entity () const |
Get entity value. | |
Public Attributes | |
ecs_meta_cursor_t | cursor_ |
Cursor object. | |
Class for reading/writing dynamic values.
Definition at line 22 of file cursor.hpp.
|
inline |
Definition at line 23 of file cursor.hpp.
|
inline |
Move to element by index.
Definition at line 48 of file cursor.hpp.
|
inline |
Get boolean value.
Definition at line 124 of file cursor.hpp.
|
inline |
Get char value.
Definition at line 129 of file cursor.hpp.
|
inline |
Get float value.
Definition at line 144 of file cursor.hpp.
|
inline |
Get signed int value.
Definition at line 134 of file cursor.hpp.
|
inline |
Get member name.
Definition at line 58 of file cursor.hpp.
|
inline |
Get untyped pointer to value.
Definition at line 69 of file cursor.hpp.
|
inline |
Get string value.
Definition at line 149 of file cursor.hpp.
|
inline |
Get unsigned int value.
Definition at line 139 of file cursor.hpp.
|
inline |
Test if current scope is a collection type.
Definition at line 53 of file cursor.hpp.
|
inline |
Move to member by name.
Definition at line 43 of file cursor.hpp.
|
inline |
Move to next member/element.
Definition at line 38 of file cursor.hpp.
|
inline |
Pop value scope.
Definition at line 33 of file cursor.hpp.
|
inline |
Push value scope (such as a nested struct)
Definition at line 28 of file cursor.hpp.
|
inline |
Set boolean value.
Definition at line 74 of file cursor.hpp.
|
inline |
Set char value.
Definition at line 79 of file cursor.hpp.
|
inline |
Set entity value.
Definition at line 109 of file cursor.hpp.
|
inline |
Set float value.
Definition at line 94 of file cursor.hpp.
|
inline |
Set (component) id value.
Definition at line 114 of file cursor.hpp.
|
inline |
Set signed int value.
Definition at line 84 of file cursor.hpp.
|
inline |
Set null value.
Definition at line 119 of file cursor.hpp.
|
inline |
Set string value.
Definition at line 99 of file cursor.hpp.
|
inline |
Set string literal value.
Definition at line 104 of file cursor.hpp.
|
inline |
Set unsigned int value.
Definition at line 89 of file cursor.hpp.
ecs_meta_cursor_t flecs::cursor::cursor_ |
Cursor object.
Definition at line 157 of file cursor.hpp.