|
| | KarmaVector () |
| | Constructor.
|
| | ~KarmaVector () |
| | Destructor.
|
| uint32_t | Remove (BuildingBlock aBlock) |
| | Removes an element from the vector.
|
| void | Add (BuildingBlock aBlock) |
| | Add an element to the vector.
|
| void | RangeCheck (uint32_t Index) const |
| | Sanity check for the index.
|
| FORCEINLINE int32_t | AddUnique (const BuildingBlock &Item) |
| int32_t | Find (const BuildingBlock &Item) const |
| bool | Contains (BuildingBlock aBlock) const |
| | Sees if the vector contains the specified element.
|
| void | RemoveAtSwap (int32_t Index) |
| | Removes an element at given location, swapping the last element into its place, and shrinking the array.
|
| uint32_t | RemoveSingleSwap (const BuildingBlock &Item) |
| | Removes a first appearence of single element from the array, swapping the last element into its place, and shrinking the array.
|
| uint32_t | Num () const |
| | Returns the total number of elements in a vector.
|
| void | Reset () |
| | We just reset the vector. UE has the following implementation.
|
|
void | Resize (uint32_t NewSize) |
| void | SmartReset () |
| | Just clear the elements.
|
| void | SetVectorElementByIndex (int32_t Index, BuildingBlock Value) |
| | Set the element of a vector using the vector index.
|
| void | Clear () |
| | Clears the vector from all the elements.
|
| const std::vector< BuildingBlock > & | GetElements () const |
| | Getter for the elements of vector.
|
| std::vector< BuildingBlock > & | ModifyElements () |
| | Getter for elements of vector for modification in appropriate way.
|
| std::vector< BuildingBlock >::iterator | begin () |
| | Getter for first vector element.
|
| std::vector< BuildingBlock >::iterator | end () |
| | Getter for the last vector element.
|
|
std::vector< BuildingBlock >::const_iterator | begin () const |
|
std::vector< BuildingBlock >::const_iterator | end () const |
| FORCEINLINE BuildingBlock & | IndexToObject (int32_t Index) |
| FORCEINLINE bool | IsValidIndex (int32_t Index) const |
| FORCEINLINE BuildingBlock const * | GetData () const |
| | Helper function to return typed pointer to the first entry of array.
|
|
BuildingBlock & | operator[] (int32_t Index) |
|
const BuildingBlock & | operator[] (int32_t Index) const |
template<typename BuildingBlock>
class KarmaVector< BuildingBlock >
Karma's std::vector wrapper with additional functionalities.
- Since
- Karma 1.0.0
template<typename BuildingBlock>
We just reset the vector. UE has the following implementation.
Same as empty, but doesn't change memory allocations, unless the new size is larger than the current array. It calls the destructors on held items if needed and then zeros the ArrayNum.
- Parameters
-
| NewSize | The expected usage size after calling this function. |
- Warning
- Included deletion of possible UObjects. Hence needs rewriting once ShivaActor is functional
- Since
- Karma 1.0.0