Skip to content

Commit

Permalink
deploy: 8fb2a94
Browse files Browse the repository at this point in the history
  • Loading branch information
RiscadoA committed Jan 30, 2024
1 parent 86fd198 commit ea33f2b
Show file tree
Hide file tree
Showing 6 changed files with 120 additions and 21 deletions.
2 changes: 1 addition & 1 deletion docs/annotated.html
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ <h1>Classes</h1>
<li>struct <a href="structcubos_1_1core_1_1ecs_1_1ArchetypeId.html" class="m-doc">ArchetypeId</a> <span class="m-doc">Identifies an archetype.</span></li>
<li>struct <a href="structcubos_1_1core_1_1ecs_1_1ArchetypeIdHash.html" class="m-doc">ArchetypeIdHash</a> <span class="m-doc">Hash functor for <a href="structcubos_1_1core_1_1ecs_1_1ArchetypeId.html" class="m-doc">ArchetypeId</a>.</span></li>
<li>struct <a href="structcubos_1_1core_1_1ecs_1_1Arguments.html" class="m-doc">Arguments</a> <span class="m-doc">Resource which stores the command-line arguments.</span></li>
<li>class <a href="classcubos_1_1core_1_1ecs_1_1Blueprint.html" class="m-doc">Blueprint</a> <span class="m-label m-flat m-warning">final</span> <span class="m-doc">Collection of entities and their respective components.</span></li>
<li>class <a href="classcubos_1_1core_1_1ecs_1_1Blueprint.html" class="m-doc">Blueprint</a> <span class="m-label m-flat m-warning">final</span> <span class="m-doc">Collection of entities and their respective components and relations.</span></li>
<li>struct <a href="structcubos_1_1core_1_1ecs_1_1ColumnId.html" class="m-doc">ColumnId</a> <span class="m-doc">Identifies a data column type.</span></li>
<li>class <a href="classcubos_1_1core_1_1ecs_1_1CommandBuffer.html" class="m-doc">CommandBuffer</a> <span class="m-label m-flat m-warning">final</span> <span class="m-doc">Stores commands to execute them later.</span></li>
<li>class <a href="classcubos_1_1core_1_1ecs_1_1Commands.html" class="m-doc">Commands</a> <span class="m-label m-flat m-warning">final</span> <span class="m-doc">System argument used to write ECS commands and execute them at a later time.</span></li>
Expand Down
2 changes: 1 addition & 1 deletion docs/blueprint_8hpp.html
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ <h2><a href="#nested-classes">Classes</a></h2>
<dt>
class <a href="classcubos_1_1core_1_1ecs_1_1Blueprint.html" class="m-doc">cubos::core::ecs::Blueprint</a>
</dt>
<dd>Collection of entities and their respective components.</dd>
<dd>Collection of entities and their respective components and relations.</dd>
</dl>
</section>
</div>
Expand Down
131 changes: 115 additions & 16 deletions docs/classcubos_1_1core_1_1ecs_1_1Blueprint.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ <h1>
<span class="m-breadcrumb"><a href="namespacecubos.html">cubos</a>::<wbr/></span><span class="m-breadcrumb"><a href="namespacecubos_1_1core.html">core</a>::<wbr/></span><span class="m-breadcrumb"><a href="namespacecubos_1_1core_1_1ecs.html">ecs</a>::<wbr/></span>Blueprint <span class="m-thin">class</span> <span class="m-label m-flat m-warning">final</span>
<div class="m-doc-include m-code m-inverted m-text-right"><span class="cp">#include</span> <a class="cpf" href="blueprint_8hpp.html">&lt;core/ecs/blueprint.hpp&gt;</a></div>
</h1>
<p>Collection of entities and their respective components.</p>
<p>Collection of entities and their respective components and relations.</p>
<nav class="m-block m-default">
<h3>Contents</h3>
<ul>
Expand All @@ -64,18 +64,22 @@ <h3>Contents</h3>
</li>
</ul>
</nav>
<p>Blueprints are in a way the &#x27;Prefab&#x27; of <strong>CUBOS</strong>. They act as a tiny <a href="classcubos_1_1core_1_1ecs_1_1World.html" class="m-doc">World</a> which can then be spawned into an actual <a href="classcubos_1_1core_1_1ecs_1_1World.html" class="m-doc">World</a>, as many times as needed.</p><p>When a blueprint is spawned, all of its components are scanned using the <a href="group__core-reflection.html" class="m-doc">Reflection</a> system for any references to other entities in the blueprint. These references are then replaced with the actual spawned entities. This has the side effect that if you do not expose an <a href="structcubos_1_1core_1_1ecs_1_1Entity.html" class="m-doc">Entity</a> field to the <a href="group__core-reflection.html" class="m-doc">Reflection</a> system, it will not be replaced and thus continue referencing the original entity in the blueprint.</p>
<p>Blueprints are in a way the &#x27;Prefab&#x27; of <strong>CUBOS</strong>. They act as a tiny <a href="classcubos_1_1core_1_1ecs_1_1World.html" class="m-doc">World</a> which can then be spawned into an actual <a href="classcubos_1_1core_1_1ecs_1_1World.html" class="m-doc">World</a>, as many times as needed.</p><p>When a blueprint is spawned, all of its components and relations are scanned using the <a href="group__core-reflection.html" class="m-doc">Reflection</a> system for any references to other entities in the blueprint. These references are then replaced with the actual spawned entities. This has the side effect that if you do not expose an <a href="structcubos_1_1core_1_1ecs_1_1Entity.html" class="m-doc">Entity</a> field to the <a href="group__core-reflection.html" class="m-doc">Reflection</a> system, it will not be replaced and thus continue referencing the original entity in the blueprint.</p>
<section id="pub-types">
<h2><a href="#pub-types">Public types</a></h2>
<dl class="m-doc">
<dt id="ad100889252360195106e54fed87f2d54">
using <a href="#ad100889252360195106e54fed87f2d54" class="m-doc-self">Create</a> = <a href="structcubos_1_1core_1_1ecs_1_1Entity.html" class="m-doc">Entity</a>(*)(void*userData, std::string name)
</dt>
<dd>Function used by <a href="classcubos_1_1core_1_1ecs_1_1Blueprint.html#a28b8566539ca7a5e9bad12ecc2d19c0a" class="m-doc">instantiate</a> to create entities.</dd>
<dd>Function used by <a href="classcubos_1_1core_1_1ecs_1_1Blueprint.html#a9ac7013f69b00ac8a60414c1061c44d6" class="m-doc">instantiate</a> to create entities.</dd>
<dt id="a7bfe09653c7ea84456cb20bc5a9eff41">
using <a href="#a7bfe09653c7ea84456cb20bc5a9eff41" class="m-doc-self">Add</a> = void(*)(void*userData, <a href="structcubos_1_1core_1_1ecs_1_1Entity.html" class="m-doc">Entity</a> entity, <a href="classcubos_1_1core_1_1memory_1_1AnyValue.html" class="m-doc">memory::<wbr />AnyValue</a> component)
</dt>
<dd>Function used by <a href="classcubos_1_1core_1_1ecs_1_1Blueprint.html#a28b8566539ca7a5e9bad12ecc2d19c0a" class="m-doc">instantiate</a> to add components to entities.</dd>
<dd>Function used by <a href="classcubos_1_1core_1_1ecs_1_1Blueprint.html#a9ac7013f69b00ac8a60414c1061c44d6" class="m-doc">instantiate</a> to add components to entities.</dd>
<dt id="af489f8de9153de1bdb1e80b4f3bc15fa">
using <a href="#af489f8de9153de1bdb1e80b4f3bc15fa" class="m-doc-self">Relate</a> = void(*)(void*userData, <a href="structcubos_1_1core_1_1ecs_1_1Entity.html" class="m-doc">Entity</a> fromEntity, <a href="structcubos_1_1core_1_1ecs_1_1Entity.html" class="m-doc">Entity</a> toEntity, <a href="classcubos_1_1core_1_1memory_1_1AnyValue.html" class="m-doc">memory::<wbr />AnyValue</a> relation)
</dt>
<dd>Function used by <a href="classcubos_1_1core_1_1ecs_1_1Blueprint.html#a9ac7013f69b00ac8a60414c1061c44d6" class="m-doc">instantiate</a> to add relations to entities.</dd>
</dl>
</section>
<section id="pub-static-methods">
Expand Down Expand Up @@ -118,6 +122,19 @@ <h2><a href="#pub-methods">Public functions</a></h2>
Ts... components)</span>
</dt>
<dd>Adds components to an entity. Overwrites the existing components, if there&#x27;s any.</dd>
<dt>
<span class="m-doc-wrap-bumper">void <a href="#a4750289b91520a8c241d4efde921545e" class="m-doc">relate</a>(</span><span class="m-doc-wrap"><a href="structcubos_1_1core_1_1ecs_1_1Entity.html" class="m-doc">Entity</a> fromEntity,
<a href="structcubos_1_1core_1_1ecs_1_1Entity.html" class="m-doc">Entity</a> toEntity,
<a href="classcubos_1_1core_1_1memory_1_1AnyValue.html" class="m-doc">memory::<wbr />AnyValue</a> relation)</span>
</dt>
<dd>Adds a relation between two entities. Overwrites the existing relation, if there&#x27;s any.</dd>
<dt>
<div class="m-doc-template">template&lt;<a href="namespacecubos_1_1core_1_1reflection.html#a579d9ef56949d96a84a1a2c647d16b32" class="m-doc">reflection::<wbr />Reflectable</a> T&gt;</div>
<span class="m-doc-wrap-bumper">void <a href="#a7a1744325f9d0fa0c25da2e24ba843df" class="m-doc">relate</a>(</span><span class="m-doc-wrap"><a href="structcubos_1_1core_1_1ecs_1_1Entity.html" class="m-doc">Entity</a> fromEntity,
<a href="structcubos_1_1core_1_1ecs_1_1Entity.html" class="m-doc">Entity</a> toEntity,
T relation)</span>
</dt>
<dd>Adds a relation between two entities. Overwrites the existing relation, if there&#x27;s any.</dd>
<dt>
<span class="m-doc-wrap-bumper">void <a href="#ae30d4f27b1469007d621cc339e379c2b" class="m-doc">merge</a>(</span><span class="m-doc-wrap">const std::string&amp; prefix,
const <a href="classcubos_1_1core_1_1ecs_1_1Blueprint.html" class="m-doc">Blueprint</a>&amp; other)</span>
Expand All @@ -132,15 +149,17 @@ <h2><a href="#pub-methods">Public functions</a></h2>
</dt>
<dd>Returns a bimap which maps entities to their names.</dd>
<dt>
<span class="m-doc-wrap-bumper">void <a href="#a28b8566539ca7a5e9bad12ecc2d19c0a" class="m-doc">instantiate</a>(</span><span class="m-doc-wrap">void* userData,
<span class="m-doc-wrap-bumper">void <a href="#a9ac7013f69b00ac8a60414c1061c44d6" class="m-doc">instantiate</a>(</span><span class="m-doc-wrap">void* userData,
<a href="classcubos_1_1core_1_1ecs_1_1Blueprint.html#ad100889252360195106e54fed87f2d54" class="m-doc">Create</a> create,
<a href="classcubos_1_1core_1_1ecs_1_1Blueprint.html#a7bfe09653c7ea84456cb20bc5a9eff41" class="m-doc">Add</a> add) const</span>
<a href="classcubos_1_1core_1_1ecs_1_1Blueprint.html#a7bfe09653c7ea84456cb20bc5a9eff41" class="m-doc">Add</a> add,
<a href="classcubos_1_1core_1_1ecs_1_1Blueprint.html#af489f8de9153de1bdb1e80b4f3bc15fa" class="m-doc">Relate</a> relate) const</span>
</dt>
<dd>Instantiates the blueprint by calling the given functions.</dd>
<dt>
<div class="m-doc-template">template&lt;typename C, typename A&gt;</div>
<span class="m-doc-wrap-bumper">void <a href="#aaa77cf38a76cc5fd68192c701ddf1654" class="m-doc">instantiate</a>(</span><span class="m-doc-wrap">C create,
A add) const</span>
<div class="m-doc-template">template&lt;typename C, typename A, typename R&gt;</div>
<span class="m-doc-wrap-bumper">void <a href="#a1b382dfc2eb8c5e30f4d7d99637e7259" class="m-doc">instantiate</a>(</span><span class="m-doc-wrap">C create,
A add,
R relate) const</span>
</dt>
<dd>Instantiates the blueprint by calling the given functors.</dd>
</dl>
Expand Down Expand Up @@ -259,6 +278,72 @@ <h3>
</tbody>
</table>
</div></section>
<section class="m-doc-details" id="a4750289b91520a8c241d4efde921545e"><div>
<h3>
<span class="m-doc-wrap-bumper">void cubos::<wbr />core::<wbr />ecs::<wbr />Blueprint::<wbr /></span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a href="#a4750289b91520a8c241d4efde921545e" class="m-doc-self">relate</a>(</span><span class="m-doc-wrap"><a href="structcubos_1_1core_1_1ecs_1_1Entity.html" class="m-doc">Entity</a> fromEntity,
<a href="structcubos_1_1core_1_1ecs_1_1Entity.html" class="m-doc">Entity</a> toEntity,
<a href="classcubos_1_1core_1_1memory_1_1AnyValue.html" class="m-doc">memory::<wbr />AnyValue</a> relation)</span></span>
</h3>
<p>Adds a relation between two entities. Overwrites the existing relation, if there&#x27;s any.</p>
<table class="m-table m-fullwidth m-flat">
<thead>
<tr><th colspan="2">Parameters</th></tr>
</thead>
<tbody>
<tr>
<td style="width: 1%">fromEntity</td>
<td>From entity.</td>
</tr>
<tr>
<td>toEntity</td>
<td>To entity.</td>
</tr>
<tr>
<td>relation</td>
<td>Relation to move.</td>
</tr>
</tbody>
</table>
</div></section>
<section class="m-doc-details" id="a7a1744325f9d0fa0c25da2e24ba843df"><div>
<h3>
<div class="m-doc-template">
template&lt;<a href="namespacecubos_1_1core_1_1reflection.html#a579d9ef56949d96a84a1a2c647d16b32" class="m-doc">reflection::<wbr />Reflectable</a> T&gt;
</div>
<span class="m-doc-wrap-bumper">void cubos::<wbr />core::<wbr />ecs::<wbr />Blueprint::<wbr /></span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a href="#a7a1744325f9d0fa0c25da2e24ba843df" class="m-doc-self">relate</a>(</span><span class="m-doc-wrap"><a href="structcubos_1_1core_1_1ecs_1_1Entity.html" class="m-doc">Entity</a> fromEntity,
<a href="structcubos_1_1core_1_1ecs_1_1Entity.html" class="m-doc">Entity</a> toEntity,
T relation)</span></span>
</h3>
<p>Adds a relation between two entities. Overwrites the existing relation, if there&#x27;s any.</p>
<table class="m-table m-fullwidth m-flat">
<thead>
<tr><th colspan="2">Template parameters</th></tr>
</thead>
<tbody>
<tr>
<td style="width: 1%">T</td>
<td>Relation type.</td>
</tr>
</tbody>
<thead>
<tr><th colspan="2">Parameters</th></tr>
</thead>
<tbody>
<tr>
<td>fromEntity</td>
<td>From entity.</td>
</tr>
<tr>
<td>toEntity</td>
<td>To entity.</td>
</tr>
<tr>
<td>relation</td>
<td>Relation to move.</td>
</tr>
</tbody>
</table>
</div></section>
<section class="m-doc-details" id="ae30d4f27b1469007d621cc339e379c2b"><div>
<h3>
<span class="m-doc-wrap-bumper">void cubos::<wbr />core::<wbr />ecs::<wbr />Blueprint::<wbr /></span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a href="#ae30d4f27b1469007d621cc339e379c2b" class="m-doc-self">merge</a>(</span><span class="m-doc-wrap">const std::string&amp; prefix,
Expand Down Expand Up @@ -296,11 +381,12 @@ <h3>
</tfoot>
</table>
</div></section>
<section class="m-doc-details" id="a28b8566539ca7a5e9bad12ecc2d19c0a"><div>
<section class="m-doc-details" id="a9ac7013f69b00ac8a60414c1061c44d6"><div>
<h3>
<span class="m-doc-wrap-bumper">void cubos::<wbr />core::<wbr />ecs::<wbr />Blueprint::<wbr /></span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a href="#a28b8566539ca7a5e9bad12ecc2d19c0a" class="m-doc-self">instantiate</a>(</span><span class="m-doc-wrap">void* userData,
<span class="m-doc-wrap-bumper">void cubos::<wbr />core::<wbr />ecs::<wbr />Blueprint::<wbr /></span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a href="#a9ac7013f69b00ac8a60414c1061c44d6" class="m-doc-self">instantiate</a>(</span><span class="m-doc-wrap">void* userData,
<a href="classcubos_1_1core_1_1ecs_1_1Blueprint.html#ad100889252360195106e54fed87f2d54" class="m-doc">Create</a> create,
<a href="classcubos_1_1core_1_1ecs_1_1Blueprint.html#a7bfe09653c7ea84456cb20bc5a9eff41" class="m-doc">Add</a> add) const</span></span>
<a href="classcubos_1_1core_1_1ecs_1_1Blueprint.html#a7bfe09653c7ea84456cb20bc5a9eff41" class="m-doc">Add</a> add,
<a href="classcubos_1_1core_1_1ecs_1_1Blueprint.html#af489f8de9153de1bdb1e80b4f3bc15fa" class="m-doc">Relate</a> relate) const</span></span>
</h3>
<p>Instantiates the blueprint by calling the given functions.</p>
<table class="m-table m-fullwidth m-flat">
Expand All @@ -320,16 +406,21 @@ <h3>
<td>add</td>
<td>Function used to add components to entities.</td>
</tr>
<tr>
<td>relate</td>
<td>Function used to add relations to entities.</td>
</tr>
</tbody>
</table>
</div></section>
<section class="m-doc-details" id="aaa77cf38a76cc5fd68192c701ddf1654"><div>
<section class="m-doc-details" id="a1b382dfc2eb8c5e30f4d7d99637e7259"><div>
<h3>
<div class="m-doc-template">
template&lt;typename C, typename A&gt;
template&lt;typename C, typename A, typename R&gt;
</div>
<span class="m-doc-wrap-bumper">void cubos::<wbr />core::<wbr />ecs::<wbr />Blueprint::<wbr /></span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a href="#aaa77cf38a76cc5fd68192c701ddf1654" class="m-doc-self">instantiate</a>(</span><span class="m-doc-wrap">C create,
A add) const</span></span>
<span class="m-doc-wrap-bumper">void cubos::<wbr />core::<wbr />ecs::<wbr />Blueprint::<wbr /></span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a href="#a1b382dfc2eb8c5e30f4d7d99637e7259" class="m-doc-self">instantiate</a>(</span><span class="m-doc-wrap">C create,
A add,
R relate) const</span></span>
</h3>
<p>Instantiates the blueprint by calling the given functors.</p>
<table class="m-table m-fullwidth m-flat">
Expand All @@ -345,6 +436,10 @@ <h3>
<td>A</td>
<td>Add functor type.</td>
</tr>
<tr>
<td>R</td>
<td>Relate functor type.</td>
</tr>
</tbody>
<thead>
<tr><th colspan="2">Parameters</th></tr>
Expand All @@ -358,6 +453,10 @@ <h3>
<td>add</td>
<td>Functor used to add components to entities.</td>
</tr>
<tr>
<td>relate</td>
<td>Functor used to add relations to entities.</td>
</tr>
</tbody>
</table>
</div></section>
Expand Down
2 changes: 1 addition & 1 deletion docs/group__core-ecs.html
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ <h2><a href="#nested-classes">Classes</a></h2>
<dt>
class <a href="classcubos_1_1core_1_1ecs_1_1Blueprint.html" class="m-doc">cubos::core::ecs::Blueprint</a>
</dt>
<dd>Collection of entities and their respective components.</dd>
<dd>Collection of entities and their respective components and relations.</dd>
<dt>
class <a href="classcubos_1_1core_1_1ecs_1_1CommandBuffer.html" class="m-doc">cubos::core::ecs::CommandBuffer</a>
</dt>
Expand Down
2 changes: 1 addition & 1 deletion docs/namespacecubos_1_1core_1_1ecs.html
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ <h2><a href="#nested-classes">Classes</a></h2>
<dt>
class <a href="classcubos_1_1core_1_1ecs_1_1Blueprint.html" class="m-doc">Blueprint</a>
</dt>
<dd>Collection of entities and their respective components.</dd>
<dd>Collection of entities and their respective components and relations.</dd>
<dt>
class <a href="classcubos_1_1core_1_1ecs_1_1CommandBuffer.html" class="m-doc">CommandBuffer</a>
</dt>
Expand Down
2 changes: 1 addition & 1 deletion docs/searchdata-v2.js

Large diffs are not rendered by default.

0 comments on commit ea33f2b

Please sign in to comment.