Fork me on GitHub
Library for MQL5 (MetaTrader) with support for Spark
CArrayListClass< Type > Class Template Reference

Detailed Description

template<typename Type>
class CArrayListClass< Type >

ArrayList from Java for Class only.


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

Public Member Functions

 CArrayListClass (bool _useDelete=true, int _reserve=0)
 
 ~CArrayListClass ()
 
int getReserve ()
 
void setReserve (int _reserve)
 
bool getUseDelete ()
 Use delete() when cleaning? More...
 
void setUseDelete (bool _useDelete)
 Use delete() when cleaning? More...
 
bool add (Type *element)
 Appends the specified element to the end of this list. More...
 
bool add (int index, Type *element)
 Inserts the specified element at the specified position in this list. More...
 
bool addAll (const Type *&list[])
 Appends all of the elements in the specified collection to the end of this list. More...
 
bool addAll (const CArrayListClass< Type > &list)
 Appends all of the elements in the specified collection to the end of this list. More...
 
bool addAll (int index, const Type *const &list[])
 Inserts all of the elements in the specified collection into this list, starting at the specified position. More...
 
bool addAll (int index, const CArrayListClass< Type > &list)
 Inserts all of the elements in the specified collection into this list, starting at the specified position. More...
 
void clear ()
 Removes all of the elements from this list. More...
 
Type * get (int index)
 Returns the element at the specified position in this list. More...
 
Type * operator[] (int index)
 Returns the element at the specified position in this list. More...
 
void set (int index, Type *element)
 Replaces the element at the specified position in this list with the specified element. More...
 
bool isEmpty ()
 Returns true if this list contains no elements. More...
 
void remove (int index)
 Removes the element at the specified position in this list. More...
 
int size ()
 Returns the number of elements in this list. More...
 
int subList (Type *&dst_array[], int dst_start=0, int src_start=0, int count=WHOLE_ARRAY)
 
void toArray (Type *&dst_array[])
 Returns an array containing all of the elements in this list in proper sequence (from first to last element). More...
 

Protected Attributes

Type * elements []
 
int reserve
 
bool useDelete
 Use delete() when cleaning? More...
 

Constructor & Destructor Documentation

◆ CArrayListClass()

template<typename Type>
CArrayListClass< Type >::CArrayListClass ( bool  _useDelete = true,
int  _reserve = 0 
)

◆ ~CArrayListClass()

template<typename Type>
CArrayListClass< Type >::~CArrayListClass ( )

Member Function Documentation

◆ add() [1/2]

template<typename Type>
bool CArrayListClass< Type >::add ( Type *  element)

Appends the specified element to the end of this list.

◆ add() [2/2]

template<typename Type>
bool CArrayListClass< Type >::add ( int  index,
Type *  element 
)

Inserts the specified element at the specified position in this list.

◆ addAll() [1/4]

template<typename Type>
bool CArrayListClass< Type >::addAll ( const Type *&  list[])

Appends all of the elements in the specified collection to the end of this list.

◆ addAll() [2/4]

template<typename Type>
bool CArrayListClass< Type >::addAll ( const CArrayListClass< Type > &  list)

Appends all of the elements in the specified collection to the end of this list.

◆ addAll() [3/4]

template<typename Type>
bool CArrayListClass< Type >::addAll ( int  index,
const Type *const &  list[] 
)

Inserts all of the elements in the specified collection into this list, starting at the specified position.

◆ addAll() [4/4]

template<typename Type>
bool CArrayListClass< Type >::addAll ( int  index,
const CArrayListClass< Type > &  list 
)

Inserts all of the elements in the specified collection into this list, starting at the specified position.

◆ clear()

template<typename Type>
void CArrayListClass< Type >::clear ( )

Removes all of the elements from this list.

◆ get()

template<typename Type>
Type* CArrayListClass< Type >::get ( int  index)

Returns the element at the specified position in this list.

◆ getReserve()

template<typename Type>
int CArrayListClass< Type >::getReserve ( )

◆ getUseDelete()

template<typename Type>
bool CArrayListClass< Type >::getUseDelete ( )

Use delete() when cleaning?

◆ isEmpty()

template<typename Type>
bool CArrayListClass< Type >::isEmpty ( )

Returns true if this list contains no elements.

◆ operator[]()

template<typename Type>
Type* CArrayListClass< Type >::operator[] ( int  index)

Returns the element at the specified position in this list.

◆ remove()

template<typename Type>
void CArrayListClass< Type >::remove ( int  index)

Removes the element at the specified position in this list.

◆ set()

template<typename Type>
void CArrayListClass< Type >::set ( int  index,
Type *  element 
)

Replaces the element at the specified position in this list with the specified element.

◆ setReserve()

template<typename Type>
void CArrayListClass< Type >::setReserve ( int  _reserve)

◆ setUseDelete()

template<typename Type>
void CArrayListClass< Type >::setUseDelete ( bool  _useDelete)

Use delete() when cleaning?

◆ size()

template<typename Type>
int CArrayListClass< Type >::size ( )

Returns the number of elements in this list.

◆ subList()

template<typename Type>
int CArrayListClass< Type >::subList ( Type *&  dst_array[],
int  dst_start = 0,
int  src_start = 0,
int  count = WHOLE_ARRAY 
)

◆ toArray()

template<typename Type>
void CArrayListClass< Type >::toArray ( Type *&  dst_array[])

Returns an array containing all of the elements in this list in proper sequence (from first to last element).

Member Data Documentation

◆ elements

template<typename Type>
Type* CArrayListClass< Type >::elements[]
protected

◆ reserve

template<typename Type>
int CArrayListClass< Type >::reserve
protected

◆ useDelete

template<typename Type>
bool CArrayListClass< Type >::useDelete
protected

Use delete() when cleaning?