Skip to content

CArrayChar

CArrayChar

CArrayChar is a class of dynamic array of char or uchar variables.

Description

CArrayChar class provides the ability to work with a dynamic array of char or uchar variables. The class allows adding/inserting/deleting array elements, performing an array sorting, and searching in a sorted array. In addition, methods of working with files have been implemented.

Declaration

class CArrayChar : public CArray

Title

#include <Arrays\ArrayChar.mqh>

Inheritance hierarchy

CObject

CArray

CArrayChar

Class Methods

Memory control
ReserveAllocates memory to increase the size of the array
ResizeSets a new (smaller) size of the array
ShutdownClears the array with a full memory release
Add methods
AddAdds an element to the end of the array
AddArrayAdds elements of one array to the end of another
AddArrayAdds elements of one array to the end of another
InsertInserts an element to the specified position in the array
InsertArrayInserts to an array elements from another array from the specified position
InsertArrayInserts to an array elements from another array from the specified position
AssignArrayCopies the elements of one array to another
AssignArrayCopies the elements of one array to another
Modify methods
UpdateChanges the element at the specified array position
ShiftMoves an element from a given position in the array to the specified offset
Delete methods
DeleteRemoves the element from the specified array position
DeleteRangeDeletes a group of elements from the specified array position
Access methods
AtGets the element from the specified array position
Compare methods
CompareArrayCompares the array with another one
CompareArrayCompares the array with another one
Sorted array methods
InsertSortInserts an element in a sorted array
SearchSearches for an element equal to the sample in the sorted array
SearchGreatSearches for an element with a value exceeding the value of the sample in the sorted array
SearchLessSearches for an element with a value less than the value of the sample in the sorted array
SearchGreatOrEqualSearches for an element with a value greater than or equal to the value of the sample in the sorted array
SearchLessOrEqualSearches for an element with a value less than or equal to the value of the sample in the sorted array
SearchFirstSearches for the first element equal to the sample in the sorted array
SearchLastSearches for the last element equal to the sample in the sorted array
SearchLinearSearches for the element equal to the sample in the array
Input/output
virtual SaveSaves data array in the file
virtual LoadLoads data array from the file
virtual TypeGets the array type identifier

Methods inherited from class CArray

: Step, Step, Total, Available, Max, IsSorted, SortMode, Clear, Sort

Last updated on