1 #ifndef CORE_ArrayList_H 2 #define CORE_ArrayList_H 35 mCapacityFactor=c.getCapacityfactor();
76 p=boost::dynamic_pointer_cast<
const CORE_ArrayList<T> >(r);
82 inline boost::shared_ptr<CORE_ArrayList<T> >
getThis() {
83 boost::shared_ptr<CORE_ArrayList<T> > p;
90 inline boost::shared_ptr<const CORE_ArrayList<T> >
getThis()
const {
91 boost::shared_ptr<const CORE_ArrayList<T> > p;
103 static inline boost::shared_ptr<CORE_ArrayList<T> >
New() {
104 boost::shared_ptr<CORE_ArrayList<T> > p(
new CORE_ArrayList<T>(),
112 static inline boost::shared_ptr<CORE_ArrayList<T> >
New(
const tUIndex& n) {
113 boost::shared_ptr<CORE_ArrayList<T> > p(
new CORE_ArrayList<T>(n),
248 void append(
const CORE_ArrayList<T>& array);
272 static void sort(T* items,
void reverse()
reverse the array
Definition: CORE_ArrayList.hpp:248
CORE_ArrayList< tReal > CORE_RealArrayList
Definition: CORE_ArrayList.h:313
const tUIndex & getSize() const
return the size of the array for reading
Definition: CORE_Array.h:1018
virtual void clear()
clear the array : desallocate the array
Definition: CORE_Array.h:300
static boost::shared_ptr< CORE_ArrayList< T > > New()
return a CORE_Array shared pointer
Definition: CORE_ArrayList.h:103
tFlag mOrder
Definition: CORE_ArrayList.h:21
CORE_ArrayList< tChar > CORE_CharArrayList
Definition: CORE_ArrayList.h:310
tBoolean exists(const T &obj) const
return rtur if the value obj exists
Definition: CORE_ArrayList.h:228
void getSharedPointer(boost::shared_ptr< const CORE_ArrayList< T > > &p) const
return the shared pointer corresponding to the class whith casting
Definition: CORE_ArrayList.h:73
TYPEDEF_SPTR(CORE_DoubleArrayList)
tBoolean search(const T &value, tUIndex &index)
search the value in values vector ordered in order
Definition: CORE_ArrayList.h:294
CORE_ArrayList< tFlag > CORE_FlagArrayList
Definition: CORE_ArrayList.h:316
this class describes a list interface
Definition: CORE_List.h:12
void contractToLastElements(const tUIndex &n)
keep only the last n elements of the array and set its capacity also to n
Definition: CORE_ArrayList.hpp:94
const tFlag & getOrder() const
get the oder
Definition: CORE_ArrayList.h:175
CORE_ArrayList< tUIndex > CORE_UIndexArrayList
Definition: CORE_ArrayList.h:323
void setCapacityFactor(const tFlag &n)
set the capacity factor
Definition: CORE_ArrayList.h:161
CORE_ArrayList< tBoolean > CORE_BooleanArrayList
Definition: CORE_ArrayList.h:312
#define tBoolean
Definition: types.h:139
static tBoolean search(const T *values, const tUIndex &n, const tFlag &order, const T &value, tUIndex &index)
search the value in values array ordered in order
Definition: CORE_ArrayList.hpp:273
CORE_ArrayList()
build an array of T*
Definition: CORE_ArrayList.h:27
boost::shared_ptr< CORE_ArrayList< T > > getThis()
return the shared pointer this
Definition: CORE_ArrayList.h:82
void insertAtIndex(const tUIndex &i, const T &v)
insert the object at index i
Definition: CORE_ArrayList.hpp:122
virtual ~CORE_ArrayList()
destroy an array of T*
Definition: CORE_ArrayList.h:52
#define null
Definition: types.h:144
CORE_ArrayList< tLInt > CORE_LongArrayList
Definition: CORE_ArrayList.h:322
void push_back(const Q &v)
Definition: CORE_ArrayList.hpp:11
CORE_ArrayList< tDComplex > CORE_DoubleComplexArrayList
Definition: CORE_ArrayList.h:315
CORE_ArrayList< T > & operator=(const Q &f)
operator =
Definition: CORE_ArrayList.h:134
void copy(const CORE_Array< Q > &f)
copy the array list f
Definition: CORE_ArrayList.h:143
void append(const CORE_ArrayList< T > &array)
add the arry list at the end
Definition: CORE_ArrayList.hpp:328
void removeAtIndex(const tUIndex &i)
remove the element at index
Definition: CORE_ArrayList.hpp:66
CORE_ArrayList< tComplex > CORE_ComplexArrayList
Definition: CORE_ArrayList.h:314
CORE_ArrayList(const CORE_Array< T > &c)
build an array by a copy of c
Definition: CORE_ArrayList.h:34
this class describes an array
Definition: CORE_Array.h:19
void setOrder(const tFlag &order)
set the oder
Definition: CORE_ArrayList.h:170
const T * getValues() const
get the values of the array for reading
Definition: CORE_Array.h:930
void getSharedPointer(boost::shared_ptr< CORE_ArrayList< T > > &p)
return the shared pointer corresponding to the class with casting
Definition: CORE_ArrayList.h:65
void getSharedPointer(SP::CORE_Object &p)
get the shared pointer of this class into p
Definition: CORE_Object.h:97
CORE_ArrayList< tUSInt > CORE_USIntArrayList
Definition: CORE_ArrayList.h:319
#define tUIndex
Definition: types.h:126
void sort()
sort the array in an increasing order obj[i-1] is obj[i] with respect to getOrder ...
Definition: CORE_ArrayList.h:264
static boost::shared_ptr< CORE_ArrayList< T > > New(const tUIndex &n)
return a CORE_Array shared pointer
Definition: CORE_ArrayList.h:112
CORE_ArrayList< tInt > CORE_IntArrayList
Definition: CORE_ArrayList.h:311
CORE_ArrayList(const tUIndex &n)
build an array of size n
Definition: CORE_ArrayList.h:41
CORE_ArrayList< tSInt > CORE_SIntArrayList
Definition: CORE_ArrayList.h:318
tUIndex insert(const T &v)
insert the element in the array with respect to the order of the list
Definition: CORE_ArrayList.hpp:166
CORE_ArrayList< double > CORE_DoubleArrayList
Definition: CORE_ArrayList.h:309
Definition: CORE_ArrayList.h:12
CORE_ArrayList< tSInt > CORE_ShortArrayList
Definition: CORE_ArrayList.h:317
CORE_ArrayList< tIndex > CORE_IndexArrayList
Definition: CORE_ArrayList.h:324
TYPEDEF_SVPTR(CORE_BooleanArrayList)
CORE_ArrayList< tInteger > CORE_IntegerArrayList
Definition: CORE_ArrayList.h:320
virtual void clear()
clear the array
Definition: CORE_ArrayList.h:182
static const tFlag LT
=
Definition: CORE_List.h:23
CORE_ArrayList< T > & operator=(const CORE_ArrayList< Q > &f)
operator =
Definition: CORE_ArrayList.h:126
tFlag mCapacityFactor
Definition: CORE_ArrayList.h:20
CORE_ArrayList< tUInteger > CORE_UIntegerArrayList
Definition: CORE_ArrayList.h:321
void sort(const tFlag &order)
sort the array in an increasing order obj[i-1] is obj[i] with respect to order
Definition: CORE_ArrayList.h:258
boost::shared_ptr< const CORE_ArrayList< T > > getThis() const
return the shared pointer const this
Definition: CORE_ArrayList.h:90
static const tFlag NO_ORDER
Definition: CORE_List.h:20
void initArray(const Q &f)
init the array to uniform value
Definition: CORE_Array.h:316
void copy(const CORE_Array< Q > &f)
copy the array
Definition: CORE_Array.hpp:16
class Free introduced for deleting a smart pointer
Definition: CORE_Object.h:141
#define tFlag
Definition: types.h:74
const tFlag & getCapacityFactor() const
get the capacity factor
Definition: CORE_ArrayList.h:166