EyE.Sys.Collections Namespace Reference

Classes

class  CircularArray
 This class contains an internal array, and an indexer override to access the array elements. All index values passed in go through the internal "wrap" function to ensure it remains in bounds as a valid index into the array. Also, some public index adjusting functions are provided: one to increment it, one to decrement it, and one to add a specified offset amount. Lastly, it provides and Enumerator, which allows one to "foreach" through all the elements in the internal array.
 
class  CircularBuffer
 a Variant of Circular array, with 2 internal indexes: a start and end index. The collection acts like a "Queue" with two public functions are provided, Push and Pop. These functions will set and get the values at those internal indexes, and then increment the internal indexes appropriately. So, you can Push items into the buffer, and Pop items off the buffer
 
class  CollectionExtensions
 This static functional class provides two simple convenience functions. These functions check to determine if a collection actually exists, and if so if it has any entries.
 
class  OptionNames
 This class has no intrinsic functionality, it simply stores two arrays of names.
It is up to user of this class to serialize/deserialize the string lists as desired. Usage by its CustomPropertyDrawer class uses the following protocol: FullList contains all the names available for selection, while SelectedOptionNames contains a subset of fullList, specifying which of those options are enabled/selected. The custom property drawer allows the user access to these options as a generic looking "mask field" control. The advantage to using string lists like this over integer masks for attributes is that; the attributes used may change (existence and order) as the programmer works on the system. This can wreak havoc when deserializing saved objects that use bit-fields. The second advantage is that the "fullList" can be changed at runtime, unlike enums.
 
class  SerializableTreeBase
 Base class for SerializedTrees. Stored data in both serializable lists, and non-serializable linked-nodes for runtime use. Class does not require unity to be used, but does require manually calling the serialization/deserialization functions.
(Use the SerilizedTree descendant of this class for automatic serialization in Unity.)
 
class  SerializableTreeNode
 SerializableTreeNode class is used for serialization of SerializableTreeBase. It stores the details about how each node of the tree is related to their nodes, by integer index. All members are serializable base-type, and none are references.
Most of these values are used to index into array in the main tree class, which is serialized separately, as a simple array.
 
class  STreeBase
 This version of the class is generally easier for storing objects, because it does not need to be overridden to provide DefaultNodeData. However, this requires that the type T, being stored, can be instantiated with a parameterless constructor. Class does not require unity to be used, but does require manually calling the serialization/deserialization functions. (Use the STree class (descended from unity based SerilizedTree class) for automatic serialization in Unity.)
 

Enumerations

enum  TreeNodeEnumerationMethod {
  Children, NodeAndChildren, AllDecendantsByLevel, NodeAndAllDecendantsByLevel,
  AllDecendants, NodeAndAllDecendants, LeavesOnly
}
 Defines how the tree should be enumerated, when using for-each loops.