Flecs: flecs::script_builder Struct Reference
Description: A fast entity component system (ECS) for C & C++

| Flecs v4.1 A fast entity component system (ECS) for C & C++

Loading...
Searching...
No Matches
flecs::script_builder Struct Reference
C++ API » Addons » Script

Script builder interface. More...

`#include <builder.hpp>`

## Public Member Functions
| script_builder (flecs::world_t *world, const char *name=nullptr)
| Construct a script builder.
script_builder & | code (const char *str)
| Set the script code.
script_builder & | filename (const char *str)
| Set the script filename.
flecs::entity | run () const
| Run the script and return the script entity.

## Protected Attributes
flecs::world_t * | world_
ecs_script_desc_t | desc_

## Detailed Description

Script builder interface.

Definition at line 16 of file builder.hpp.

## Constructor & Destructor Documentation

## ◆ script_builder()

flecs::script_builder::script_builder | ( | flecs::world_t * | world,
|  | const char * | name = nullptr )
| inline

Construct a script builder.

Parameters

  world | The world.
  name | Optional name for the script entity.

Definition at line 21 of file builder.hpp.

## Member Function Documentation

## ◆ code()

script_builder & flecs::script_builder::code | ( | const char * | str | ) |
| inline

Set the script code.

Definition at line 35 of file builder.hpp.

## ◆ filename()

script_builder & flecs::script_builder::filename | ( | const char * | str | ) |
| inline

Set the script filename.

Definition at line 41 of file builder.hpp.

## ◆ run()

flecs::entity flecs::script_builder::run | ( |  | ) | const
| inline

Run the script and return the script entity.

Definition at line 13 of file impl.hpp.

## Member Data Documentation

## ◆ desc_

ecs_script_desc_t flecs::script_builder::desc_
| protected

Definition at line 51 of file builder.hpp.

## ◆ world_

flecs::world_t* flecs::script_builder::world_
| protected

Definition at line 50 of file builder.hpp.

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

- include/flecs/addons/cpp/mixins/script/builder.hpp
- include/flecs/addons/cpp/mixins/script/impl.hpp