16#ifndef RTabInt_included
17#define RTabInt_included
20#include <TRUSTArray.h>
30 Declare_instanciable_sans_constructeur(
RTabInt);
39 inline int size()
const;
49 const ArrOfInt&
donnees()
const;
74 if(n>data.size_array())
76 int sz = data.size_array();
78 data.resize_array(sz+TB_);
79 for(
int j=sz; j< sz+TB_; j++)
Objet_U()
Default constructor: assigns a unique identifier to the object (object_id_) and registers the object ...
int size() const
Returns the number of elements in the array.
void resize(int)
Resizes the array to hold at least n elements, growing by TB_ slots if needed.
const ArrOfInt & donnees() const
Returns the underlying data array.
int & operator()(int i)
Same as operator[]: returns a reference to the element at index i.
int & operator[](int i)
Returns a reference to the element at index i.
RTabInt(int n=0, int x=0)
Constructor: initializes the array with n elements set to x, plus TB_ extra slots.
void add(int)
Appends the value i at the end of the array; grows by TB_ slots if needed.
int search(int)
Searches for an element equal to i in the array. Returns the value if found, -1 otherwise.