|
static const u32 | SIZE = (1u<<B) - 3 |
|
Allocate SLOTS u64's of element-specific data associated with element E.
Returns false if:
- E is an unregistered element
- E is a registered element but has already had a different number of element-specific data slots allocated for it
- E is a registered element with no priori element-specific data allocation, but less than SLOTS of room for element-specific data remain in this ElementTable.
Returns true otherwise, specifically, if:
- E is a registered element that already has precisely SLOTS of element-specific data allocated for it, or
- E is a registered element that previously had no element-specific data but now has SLOTS of element-specific data allocated for it, as a result of this call.
In the case of a true return, note that the resulting slots have no particular values.
Executes the behavior method of the Element in the center of a specified EventWindow. This method finds the central Element by the type of the Atom located there, then executes its behavior.
- Parameters
-
Access the SLOTS u64's of element-specific data associated with element E, if it exists. Returns a pointer to the first (0th) slot, or 0.
Returns 0 if:
- E is an unregistered element,
- E is a registered element that has no element-specific data associated with it, or
- E is a registered element that has more or less than SLOTS of element-specific data associated with it.
Return -1 if elementType is not stored in this table, otherwise return a number from 0.. GetSize()-1 representing the location of this elementType in this table. Gets the index of this ElementTable where a particular Element (described by a specified type) resides.
- Parameters
-
elementType | The type of the Element of which to look up an index for. |
- Returns
- The index of this ElementTable where the Element of type
elementType
resides, or -1 if elementType
is not found in the table.
Gets the capacity of this ElementTable, in Elements that may be registered.
Registers an Element into this ElementTable, allowing Elements of a specified type to exist and act inside a Tile .
- Parameters
-
Gets a pointer to an immutable Element which is stored in this ElementTable by providing a type.
- Parameters
-
elementType | the type of the Element which will be found in this Table. |
- Returns
- A pointer to an immutable Element which is stored in this table. If an Element with this type is not found in this ElementTable, will return NULL .
The documentation for this class was generated from the following files: