#ifndef TOOLS_H_INCLUDED
#define TOOLS_H_INCLUDED

#include <vector>
using namespace std;

/**
 * Delete all points of a vector of pointers
 * When pointer==0, do not delete it
 **/
template <class T> void VectorDeleteAll(vector<T*> v){
	while(!v.empty()){
		T *ptr = v.back();
		v.pop_back();
		if(ptr){
			delete ptr;
		}
	}
}

#endif // TOOLS_H_INCLUDED
