1 /** 2 * The base class for a node. 3 * 4 * A node is a set of different components that are required by a system. 5 * 6 * A system can request a collection of nodes from the engine. 7 * Subsequently the Engine object creates a node for every entity that has _all_ of the components 8 * in the node class and adds these nodes to the list obtained by the system. 9 * 10 * The engine keeps the list up to date as entities are added 11 * to and removed from the engine and as the components on entities change.</p> 12 */ 13 14 module ashd.core.node; 15 16 import ashd.core.entity : Entity; 17 18 19 abstract class Node 20 { 21 protected 22 { 23 /** 24 * The entity whose components are included in the node. 25 */ 26 Entity mEntity; 27 28 /** 29 * Used by the NodeList class. The previous node in a node list. 30 */ 31 Node mPrevious; 32 33 /** 34 * Used by the NodeList class. The next node in a node list. 35 */ 36 Node mNext; 37 38 } 39 40 @property 41 { 42 Entity entity() { return mEntity; } 43 void entity( Entity entity_a ) { mEntity = entity_a; } 44 } 45 46 @property 47 { 48 Node next() { return mNext; } 49 void next( Node node_a ) { mNext = node_a; } 50 } 51 52 @property 53 { 54 Node previous() { return mPrevious; } 55 void previous( Node node_a ) { mPrevious = node_a; } 56 } 57 58 } 59