Skip to content
sam.gerene edited this page Dec 8, 2017 · 5 revisions

Introduction

Several properties of classes of the CDP4 Data Model have properties that do not explicitly exist as a Type in C#. These specific Types have been added to the CDP4-SDK for convenience.

ContainerList

Containment, or composite aggregation, is an important aspect of the CDP4 Data Model. These containment structures are implemented in C# by subclassing the List<T> class. The plain List<T> is used for properties that have a multiplicity larger than 1 and that are not a composite aggregation.

The ContainerList<T> is subclasses the List<T> class where T is constrained to Thing. The ContainerList<T> is initialized using the container Thing. Each time contained Things are added to this list, the container property of the Things is set to the Container property of the ContainerList<T>.

OrderedItemList

Several properties of the CDP4 Data Model represent and ordered list. These properties are implemented using the OrderedItemList<T> class. The OrderedItemList<T> class can be used for both composite aggregations or plain references. The OrderedItemList<T> maintains the keys that are used to maintain the order of the items in the list. Annex C specifies the protocol used to update these ordered lists. This protocol supports multiple add, delete and move operations from concurrent sessions.

The OrderedItemList<T> makes use of the OrderedItem class to maintain order. The OrderedItem class has the following properties:

  • K: the key (index) as a long.
  • V: the object that is stored in the slot specified by K.
  • M: the index to which an object should be moved

Note: the M property of the OrderedItem is read-only and is used for serialization purposes. In order to move an item to a new index, use the MoveItem method.

The MoveItem method should be moved to re-order items in the OrderedItemList<T>

ValueArray

More information coming soon

Clone this wiki locally