* Fix a segfault case.
* Improve the trash system to handle several types more gracefully.
This commit is contained in:
jean.chalard
2010-06-13 14:03:02 +00:00
parent f14f56b9ce
commit 32352161cc
3 changed files with 37 additions and 23 deletions

View File

@@ -5,17 +5,21 @@
#include "Pos.h"
#include "WEvent.h"
void trash(Pos*);
template <class T> void trash(T*);
class Trash
{
std::vector<Pos*> bin;
void put_out();
int receiveEvent(WEvent* e);
friend void trash(Pos*);
public:
static void cleanup();
};
template <class T>
class TrashBin
{
std::vector<T*> bin;
void put_out();
int receiveEvent(WEvent* e);
template <class Q> friend void trash(Q*);
friend class Trash;
};
#endif // _TRASH_H_