45 #ifdef CONSTUCTOR_OUTPUT
46 std::cout <<
"BaseHandler::BaseHandler() finished" << std::endl;
55 for (
typename std::vector<T*>::const_iterator it=BH.
begin();it!=BH.
end();it++)
59 #ifdef CONSTUCTOR_OUTPUT
60 std::cout <<
"BaseHandler::BaseHandler(const BaseHandler &BH) finished" << std::endl;
86 #ifdef DESTRUCTOR_OUTPUT
87 std::cout <<
"BaseHandler::~BaseHandler() finished" << std::endl;
126 std::cerr<<
"In: void BaseHandler::removeObject(const unsigned int id) const"<<std::endl;
127 std::cerr<<
"No Object exist with index "<<
id<<
" number of objects is "<<
getNumberOfObjects()<<std::endl;
151 std::cerr<<
"In: void BaseHandler::removeLastObject const"<<std::endl;
152 std::cerr<<
"No Object exist in this BaseHandler"<<std::endl;
180 std::cerr<<
"In: Object* BaseHandler::getObject(const unsigned int id) const"<<std::endl;
181 std::cerr<<
"No Object exist with index "<<
id<<
" number of objects is "<<
getNumberOfObjects()<<std::endl;
220 const typename std::vector<T*>::const_iterator
begin()
const
227 const typename std::vector<T*>::iterator
begin()
233 const typename std::vector<T*>::const_iterator
end()
const
240 const typename std::vector<T*>::iterator
end()
virtual void addObject(T *O)
Adds a new Object to the BaseHandler.
virtual void readObject(std::istream &is)=0
Reads Object into the BaseHandler from restart data.
void copyAndAddObject(const T &O)
Creates a copy of a Object and adds it to the BaseHandler.
T * getObject(const unsigned int id) const
Gets a pointer to the Object at the specified index in the BaseHandler.
void setStorageCapacity(const unsigned int N)
Sets the storage capacity of this BaseHandler.
void copyAndAddObject(const T *O)
Creates a copy of a Object and adds it to the BaseHandler.
T * getLastObject() const
Gets a pointer to the last Object in this BaseHandler.
const std::vector< T * >::const_iterator begin() const
Gets the begin of the const_iterator over all Object in this BaseHandler.
BaseHandler()
Default BaseHandler constructor, it simply creates an empty BaseHandler.
void removeLastObject()
Removes the last Object from the BaseHandler.
const std::vector< T * >::iterator end()
Gets the end of the iterator over all BaseBoundary in this BaseHandler.
const std::vector< T * >::const_iterator end() const
Gets the end of the const_iterator over all BaseBoundary in this BaseHandler.
std::vector< T * > objects_
The actual list of Object pointers.
Container to store all Object.
unsigned int getNumberOfObjects() const
Gets the number of Object in this BaseHandler.
const std::vector< T * >::iterator begin()
Gets the begin of the iterator over all BaseBoundary in this BaseHandler.
BaseHandler(const BaseHandler< T > &BH)
Copy constructor, it copies the BaseHandler and all Object it contains.
int nextId_
identifier for next object created
unsigned int getStorageCapacity() const
Gets the storage capacity of this BaseHandler.
virtual void removeObject(unsigned const int id)
Removes a Object from the BaseHandler.
unsigned int maxObjects_
An integer to keep track of the largest number of objects ever stored in this BaseHandler.
virtual ~BaseHandler()
Assignment operator.
void clear()
Empties the whole BaseHandler by removing all Object.