brainrat-private  5.1.2
carto::Array< T > Class Template Reference

#include <brainrat/object/array.h>

Inheritance diagram for carto::Array< T >:
Collaboration diagram for carto::Array< T >:

Classes

class  interfaced_iterator
 

Public Member Functions

 Array ()
 
virtual ~Array ()
 
interfaced_iterator getIterator () const
 
virtual Object objectIterator () const
 returns an object implementing the IteratorIntrerface More...
 
virtual size_t size () const
 
virtual bool isContiguous () const
 
virtual bool hasItem (int index) const
 
virtual Object getArrayItem (int index) const
 
virtual void setArrayItem (int index, Object o)
 
virtual void reserveArray (size_t s)
 like the STL std::vector::reserve(), memory is reserved but no element is stored More...
 
virtual void resizeArray (size_t s)
 resize the array. More...
 
virtual void removeArrayItem (int i)
 removes an element from the array. More...
 
virtual void insertArrayItem (int i, Object o)
 inserts an element into the array. More...
 

Detailed Description

template<typename T>
class carto::Array< T >

Definition at line 22 of file array.h.

Constructor & Destructor Documentation

◆ Array()

template<typename T >
carto::Array< T >::Array ( )
inline

Definition at line 30 of file array.h.

◆ ~Array()

template<typename T >
virtual carto::Array< T >::~Array ( )
inlinevirtual

Definition at line 32 of file array.h.

Member Function Documentation

◆ getArrayItem()

template<typename T >
virtual Object carto::Array< T >::getArrayItem ( int  index) const
inlinevirtual

Definition at line 60 of file array.h.

◆ getIterator()

template<typename T >
interfaced_iterator carto::Array< T >::getIterator ( ) const
inline

Definition at line 44 of file array.h.

Referenced by carto::Array< T >::objectIterator().

◆ hasItem()

template<typename T >
virtual bool carto::Array< T >::hasItem ( int  index) const
inlinevirtual

Definition at line 58 of file array.h.

References carto::Array< T >::size().

◆ insertArrayItem()

template<typename T >
virtual void carto::Array< T >::insertArrayItem ( int  i,
Object  o 
)
inlinevirtual

inserts an element into the array.

All elements after this one may be moved, so iterators pointing after it may become invalid

Definition at line 75 of file array.h.

◆ isContiguous()

template<typename T >
virtual bool carto::Array< T >::isContiguous ( ) const
inlinevirtual

Definition at line 57 of file array.h.

◆ objectIterator()

template<typename T >
virtual Object carto::Array< T >::objectIterator ( ) const
inlinevirtual

returns an object implementing the IteratorIntrerface

Definition at line 50 of file array.h.

References carto::Array< T >::getIterator().

◆ removeArrayItem()

template<typename T >
virtual void carto::Array< T >::removeArrayItem ( int  i)
inlinevirtual

removes an element from the array.

All elements after the one removed may be moved, so iterators pointing after it may become invalid

Definition at line 72 of file array.h.

◆ reserveArray()

template<typename T >
virtual void carto::Array< T >::reserveArray ( size_t  s)
inlinevirtual

like the STL std::vector::reserve(), memory is reserved but no element is stored

Definition at line 65 of file array.h.

◆ resizeArray()

template<typename T >
virtual void carto::Array< T >::resizeArray ( size_t  s)
inlinevirtual

resize the array.

This may need to copy all existing elements, so all iterators may become invalid after this operation

Definition at line 69 of file array.h.

◆ setArrayItem()

template<typename T >
virtual void carto::Array< T >::setArrayItem ( int  index,
Object  o 
)
inlinevirtual

Definition at line 61 of file array.h.

◆ size()

template<typename T >
virtual size_t carto::Array< T >::size ( void  ) const
inlinevirtual

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