Embedding
Bia's primary focus is to be easily embeddable into a C++11 application. For this purpose Bia exposes a simple wrapper class bia::engine
(include <bia/bia.hpp>
).
Variables
1 2 3 |
|
Functions
Simple Functions
Functions can be added with function
, like:
1 2 3 4 5 6 7 8 9 10 |
|
Warning
This part has not been implemented yet.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
|
Variable Parameters
1 2 3 4 5 6 7 8 9 10 11 |
|
Type Unions
1 2 3 4 5 6 7 8 9 10 11 |
|
Objects
Object can be populated like the global namespace with variable()
, function()
and object()
:
1 2 3 4 |
|
Modules
Runtime Modules
Runtime modules are just like objects with the only exception that they are not available in the global namespace without any explicit import
statement. Just like the example in the objects section:
1 2 3 4 |
|
Note
Note the difference in the first line between engine.object()
and engine.module()
.
Usage in Bia:
1 2 |
|