C3D Toolkit  Kernel - 117982, Vision -

Ordered one-dimensional array. More...

#include <templ_csp_array.h>

Inherits SPArray< Type >.

Public Types

typedef bool(* LessFuncPtr) (const Type &, const Type &)
 The type of pointer to selection function of the item to remove from the two identical.

Public Member Functions

 CSPArray (size_t maxCnt=0, uint16 delt=1, bool shouldDelete=true, bool _keepEq=false, LessFuncPtr func=nullptr)
void SetLessFunc (LessFuncPtr func)
 Set the selection method of the item to remove from the two identical.
bool AddArray (const RPArray< Type > &arr)
 Add array without sorting.
void AddNoSort (Type *ent)
 Add element without sorting.
Type * Add (Type *)
 Add element with sorting.
Type * Add (Type *, size_t &indexEnt)
 Add element with sorting, returns index of the element.
size_t Find (const Type *)
 Find an element in ordered array.
void Sort ()
 Sort array if it is not sorted.
Type * RemoveObj (Type *delObject, DelType del)
 Delete element.

Detailed Description

template<class Type>
class CSPArray< Type >

Ordered one-dimensional array.

Ordered one-dimensional array of pointers.
Elements of the array should have operators "==" and "<". The unsorted data can be added by the function 'AddNoSort', but the sorting starts after the first call of functions Add and Find. The similar objects are not added.

The documentation for this class was generated from the following file: