Flecs v4.0
A fast entity component system (ECS) for C & C++
Loading...
Searching...
No Matches
Rest

REST API for querying and mutating entities. More...

Collaboration diagram for Rest:

Classes

struct  EcsRest
 Component that creates a REST API server when instantiated. More...
 

Macros

#define FLECS_REST_H
 
#define ECS_REST_DEFAULT_PORT   (27750)
 

Functions

FLECS_API const ecs_entity_t ecs_id (EcsRest)
 Component that instantiates the REST API.
 
FLECS_API ecs_http_server_tecs_rest_server_init (ecs_world_t *world, const ecs_http_server_desc_t *desc)
 Create HTTP server for REST API.
 
FLECS_API void ecs_rest_server_fini (ecs_http_server_t *srv)
 Cleanup REST HTTP server.
 
FLECS_API void FlecsRestImport (ecs_world_t *world)
 Rest module import function.
 

Detailed Description

REST API for querying and mutating entities.

Macro Definition Documentation

◆ ECS_REST_DEFAULT_PORT

#define ECS_REST_DEFAULT_PORT   (27750)

Definition at line 43 of file rest.h.

◆ FLECS_REST_H

#define FLECS_REST_H

Definition at line 37 of file rest.h.

Function Documentation

◆ ecs_rest_server_fini()

FLECS_API void ecs_rest_server_fini ( ecs_http_server_t * srv)

Cleanup REST HTTP server.

The server must have been created with ecs_rest_server_init().

◆ ecs_rest_server_init()

FLECS_API ecs_http_server_t * ecs_rest_server_init ( ecs_world_t * world,
const ecs_http_server_desc_t * desc )

Create HTTP server for REST API.

This allows for the creation of a REST server that can be managed by the application without using Flecs systems.

Parameters
worldThe world.
descThe HTTP server descriptor.
Returns
The HTTP server, or NULL if failed.

◆ FlecsRestImport()

FLECS_API void FlecsRestImport ( ecs_world_t * world)

Rest module import function.

Usage:

ECS_IMPORT(world, FlecsRest)
#define ECS_IMPORT(world, id)
Wrapper around ecs_import().
Definition module.h:119
Parameters
worldThe world.