cPy.cArray module#

class cArray_int[source]#

Bases: object

begin() any[source]#
end() any[source]#
Size() int[source]#
Returns the total size in bytes of the used elements.
SizeCapacity() int[source]#
Returns the total size in bytes of the allocated memory.
Copy(Src: int, Count: int)[source]#
Copies contents from a raw array.
Move(from_idx: int, to_idx: int) bool[source]#
Moves an element within the list from one index to another.
GetAt(Index: int) int[source]#
GetFirst() int[source]#
GetLast() int[source]#
GetAndRemoveLast() int[source]#
SetAt(Index: int, Value: int)[source]#
ToPtr() int[source]#
Returns a mutable pointer to the raw array.
uGet(Index: int, defvalue: int) int[source]#
Unlimited get - get value at index Index, if beyoud range - return defvalue
uSet(Index: int, value: int, defvalue: int)[source]#
Unlimited set - set value at index Index, if beyoud range - add correcsponding count of defvalue-s
Count() int[source]#
Gets the number of elements actually contained in the list.
SetCount(Count: int, Value: int)[source]#
Sets the count and initializes new elements with a value.
Capacity() int[source]#
Gets the current allocated capacity.
SetCapacity(Capacity: int)[source]#
Pre-allocates memory for a specific capacity.
IsEmpty() bool[source]#
Checks if the list has no elements.
Clear()[source]#
Sets count to 0 (does not free memory).
Fill(Value: int)[source]#
Fills the entire list with a specific value.
Add(Value: int, Count: int = 1) int[source]#
Adds “Count” elements to the end of the list.
Returns:

The index of the first added element.

Return type:

int

AddValues(Values: int, N: int)[source]#
odo fine Copied from class DynArray<>. Remove or rename it.
AddRange(Src: int, Count: int)[source]#
Insert(Index: int, Value: int, Count: int = 1)[source]#
Inserts element(s) at a specified position.
InsertRange(Index: int, Src: int, Count: int)[source]#
Inserts an array at a specified position.
ExpandTo(Index: int, _1: int) int[source]#
Ensures list is large enough for Index, then sets the value.
InsertFirstOrRemove(_0: int) bool[source]#
Toggles presence: inserts at 0 if missing, removes if present.
RemoveAt(Index: int, Count: int = 1)[source]#
Removes a range of elements starting at Index.
RemoveLast()[source]#
Removes the last element.
find(Value: int) int[source]#
Linear search using memcmp (warning: raw memory comparison).
pop_front() int[source]#
pop_back() int[source]#
Reverse(Index: int, Count: int)[source]#
Reverses the order of the elements in the specified range.
EnsureCapacity(size: int)[source]#
Reserves memory for a specific size.
class cArray_float[source]#

Bases: object

Array class. See cArray_int for full documentation.

class cArray_double[source]#

Bases: object

Array class. See cArray_int for full documentation.

class cArray_DWORD[source]#

Bases: object

Array class. See cArray_int for full documentation.

class cArray_char[source]#

Bases: object

Array class. See cArray_int for full documentation.

class cArray_cVec2[source]#

Bases: object

Array class. See cArray_int for full documentation.

class cArray_cVec3[source]#

Bases: object

Array class. See cArray_int for full documentation.

class cArray_cVec4[source]#

Bases: object

Array class. See cArray_int for full documentation.

class cArray_cMat3[source]#

Bases: object

Array class. See cArray_int for full documentation.

class cArray_cMat4[source]#

Bases: object

Array class. See cArray_int for full documentation.

class cArray_tri_DWORD[source]#

Bases: object

Array class. See cArray_int for full documentation.

class cArray_cStr[source]#

Bases: object

Array class. See cArray_int for full documentation.