Provides script language access to C++ objects of this type.
Class Hierarchy | No registered superclass. |
Function members are as follows:
Return Type | Function Name | Documentation |
---|---|---|
int32 | AcquireObj | Transfers ownership of an object from the source <TypeBuffer> to this <TypeBuffer>. The owning pointer in the source <TypeBuffer> is replaced with a nullptr, and the overall memory layout of the source <TypeBuffer> does not change. (No deallocation occurs inside the source <TypeBuffer> when the owning pointer is transferred.) |
int32 | AcquireObjs | Transfers ownership of all <Type> objects from the source <TypeBuffer> to this <TypeBuffer>, provided this <TypeBuffer> contains non-owning pointers to the <Type> objects. The owning pointers in the source <TypeBuffer> are replaced with null pointers, and the non-owning pointers in hte destination are replaced with owning pointers. The overall memory layout of the source <TypeBuffer> does not change. (No deallocation occurs inside the source <TypeBuffer> when the owning pointers are transferred.) |
int32 | Add | Adds to this <TypeBuffer> an owning pointer to the object, provided this <TypeBuffer> does not already store an owning pointer to the object. Owned objects are destroyed when this <TypeBuffer> is destroyed. |
int32 | AddRef | Adds to this <TypeBuffer> a non-owning pointer to the object. |
int32 | AddRefUnique | Adds a pointer to the collection if it is not already contained inside. |
int32 | AddUnique | Adds a pointer to the collection if it is not already contained inside. |
int32 | Clear | Destroys any objects owned by this <TypeBuffer> and deallocates the underlying TypePtrArray> and <Int32Array> objects used to implement the <TypeBuffer>. Does not destroy this <TypeBuffer> object. |
int32 | Compact | A <TypeBuffer> can contain a mix of owning pointers, non-owning pointers, and null pointers. Removes any collection indices that refer to null pointers. At least one allocation is required, and the size of this allocation is of the order of the count of the source <TypeBuffer>. |
int32 | ContainsNullPointer | Returns true if this <TypeBuffer> contains any null pointers. |
int32 | CountIsMultipleOf | Returns true if the count is a multiple of the specified value. |
int32 | Del | If the <TypeBuffer> owns the object at the specified index, this function destroys the object. In either case, complementary deallocations occur in the underlying TypePtrArray> and <Int32Array> objects that implement <TypeBuffer>. |
int32 | DelFirst | Deletes the first entry in the <TypeBuffer>. |
int32 | DelLast | Deletes the last entry in the <TypeBuffer>. |
int32 | Find | Returns the index of an object in the <TypeBuffer> or -1 if the object cannot be found. |
<Type> | Get | Returns a pointer to the object at the specified index or nullptr if the specified index is invalid. |
int32 | GetCount | Returns the count of the underlying TypePtrArray> object. |
<Type> | GetFirst | Returns a pointer to the first object in the <TypeBuffer>, or nullptr if the <TypeBuffer> is empty. |
<Type> | GetLast | Returns a pointer to the last object in the <TypeBuffer>, or nullptr if the <TypeBuffer> is empty. |
<Type> | GetObjectByType | Returns a pointer to the first object of the specified type. |
int32 | GetObjectIndexByType | Returns the index of the first object of the specified type. |
<TypeBufferView> | GetView | Returns a pointer to a <TypeBufferView> object that contains iterators to the start and end of the collection. |
int32 | IfOwnsIndex | Returns true if the <TypeBuffer> owns the object at the specified index. |
int32 | IfOwnsObj | Returns true if the <TypeBuffer> owns the specified object. |
int32 | In | Returns true if the <TypeBuffer> has a pointer to the object. |
int32 | Insert | Inserts an object into the collection and sets an owning or non-owning relationship. This function can require a full allocation and deallocation cycle. Note that the collection does not support multiple ownership, so this function fails if you try to create an additional owning relationship to an object the collection already owns. |
int32 | IsEmpty | Returns true if the collection is empty. |
int32 | IsHeterogenous | Returns true if the collection contains more than one type of object, with an option to allow subclasses to constitute a match. |
int32 | IsHomogenous | Returns true if the collection contains one type of object, with an option to allow subclasses to constitute a match. |
<Type> | MakeNonOwning | Changes the pointer at the specified index from owning to non-owning and returns a pointer to the object. |
int32 | Move | Moves the collection's memory from this <TypeBuffer> to the destination <TypeBuffer>. This operation uses move semantics to avoid a copy. |
int32 | Owns | Adds to the collection an owning pointer to specified object. This can require up to a full allocation and deallocation cycle. |
int32 | Refers | Adds to the collection a non-owning pointer to specified object. This can require up to a full allocation and deallocation cycle. |
int32 | Relocate | Relocates a chunk of the array to a new index. |
<Type> | RemoveAt | Removes the object at the specified index from the collection, replaces its index with a nullptr, changes ownership status to non-owning, and returns a pointer to the object. |
<Type> | RemoveFirst | Removes the first object from the collection, replaces its index with a nullptr, changes ownership status to non-owning, and returns a pointer to the object. |
<Type> | RemoveLast | Removes the last object from the collection, replaces its index with a nullptr, changes ownership status to non-owning, and returns a pointer to the object. |
<Type> | RemoveObj | Removes the specified object from the collection, replaces its index with a nullptr, changes ownership status to non-owning, and returns a pointer to the object. |
int32 | Reverse | Reverses the order of the pointers in the <TypeBuffer> from last to first. |
int32 | Set | Sets the pointer at the specified index to have an owning or non-owning relationship with the specified object. Note that multiple ownership is not supported and this call fails if the collection already stores an owning pointer to the object. Care is required because this <TypeBuffer> does not know if another <TypeBuffer> already has an owning pointer to this object. |
int32 | ShallowCopy | Populates this <TypeBuffer> with non-owning pointers to all the objects in the source <TypeBuffer>. |
int32 | Shrink | Shrinks the array to a sub-range. |
Object members are as follows:
Type Name | Accessor Name | Documentation |
---|---|---|
int32 | Count | Sets the number of items in the collection. Requires at least one memory allocation, but may require a full allocation and deallocation cycle. |
int32 | Reserve | Sets the reserve memory, which does not refer to the number of items in the collection, but refers to the size of the underlying buffer. |