en:toolworks:docs:apparatus:enchaining

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
en:toolworks:docs:apparatus:enchaining [2021/06/17 18:59] vladiusen:toolworks:docs:apparatus:enchaining [2022/07/18 18:12] (current) – Fix trouble. jispar
Line 1: Line 1:
 ====== Enchaining ====== ====== Enchaining ======
  
-Enchaining is the process of selecting a subset of Chunks (or Belts) based on a certain Filter criteria. Once enchained Belts and Chunks become locked, the structural changes become minimized for the sake of consistent iterating.+Enchaining is process of selecting a subset of Chunks (or Belts) based on a certain [[en:toolworks:docs:apparatus:filter|Filter]] criteria. Once they are Enchained the corresponding Belts and Chunks are becoming locked, i.e. any structural changes become minimized for the sake of consistent [[en:toolworks:docs:apparatus:iterating|Iterating]].
  
 ===== C++ Workflow ===== ===== C++ Workflow =====
  
-That's pretty basic, really. You don't create (instantiate) Chains manually but those are actually managed by the [[appi>class_u_machine.html|Machine class]]. Assuming you've already assembled the needed [[en:toolworks:docs:apparatus:filter|Filter]] all you have to do is call a global (static) Machine method named [[appi>class_u_machine.html#aa7eade82d0047499c688abcde2a01f2b|Enchain]] passing it filter and a reference for a unique Chain identifier to be filled.+That's pretty basic, really. You don't create (instantiate) Chains manually but those are actually managed by the [[appi>class_u_machine.html|Machine class]]. Assuming you've already assembled the needed [[en:toolworks:docs:apparatus:filter|Filter]] all you have to do is to call a global Mechanism method named [[appi>class_u_mechanism.html#ab9c5280bbf348bee04751204ce0687c1|Enchain]] passing it the applied filter.
  
 <code cpp> <code cpp>
-int32 ChainId; +FChain& Chain = Mechanism->Enchain(Filter).Get();
-UMachine::Enchain(Filter, ChainId);+
 </code> </code>
  
-You are now ready to iterate the chain designated by this unique identifier.+You're now ready to [[en:toolworks:docs:apparatus:iterating|iterate]] or [[en:toolworks:docs:apparatus:operating|operate]] the resulting Chain, but there is more.
  
 +==== Solid Chains ====
 +
 +You can also enchain to a special type of Chains called //solid//.
 +Solid chains provide some additional features like getting direct references to Traits and Concurrency but they also
 +limit the operations possible on the Subjects to only non-structural ones. That is, you can't add or remove any
 +traits to/from the Subjects during some active solid enchainings. Enchaining to a solid chain is as easy as:
 +
 +<code cpp>
 +FSolidChain& Chain = Mechanism->EnchainSolid(Filter).Get();
 +</code>
 +
 +==== Chunks Proxies ====
 +
 +If you want to Iterate the Chunks directly, you would have to Enchain them into a list of Chunks Proxies.
 +
 +In order to do that, a special overloaded [[appi>class_a_mechanism.html#ae72188d973bed3d8484dc5ab87e5e1e1|method]] is present within the API.
 +It accepts an [[ue>API/Runtime/Core/Containers/TArray|array]] of Chunks Proxies as its argument second argument. The first one is of course, a Filter.
  • en/toolworks/docs/apparatus/enchaining.1623945552.txt.gz
  • Last modified: 2021/06/17 18:59
  • by vladius