Stack of pointers to ADFObjects. More...
#include <StackOfObjects.h>
Public Member Functions | |
T * | At (UShort_t i) const |
To get the object at slot #i. More... | |
UShort_t | GetMaxSize () const |
To know the max size of the stack. More... | |
UShort_t | GetSize () const |
To know the current size of the stack. More... | |
T * | New (Bool_t do_reset=true) |
It pops up a new object on the top of the stack. More... | |
void | Reset () |
Reset the stack. More... | |
Bool_t | SetSize (UShort_t how_many, Bool_t do_reset=true) |
Change the current size. More... | |
StackOfObjects (UShort_t max_size=100u) | |
~StackOfObjects () | |
Stack of pointers to ADFObjects.
This is a simple implementation of a stack ... so it should be used carefully !
The stack is empty at the beginning. New objects are allocated by the New method. At Reset, the size of the stack is set to 0 but the objects are not deleted.
A additional call of the New method returns the already allocated objects and call their Reset method:
It allows to avoid to many cycles of new/delete
Definition at line 44 of file StackOfObjects.h.