mojo_client/src/Client/GUI/DrawObjMgr.h
false_genesis aa63fc56f4 * fixed many gui-related possible crashes
* the DrawObject system should be stable enough now to do more serious things with it.
* added some object drawing code (cute cubes) - thx shlainn!!
2008-03-31 16:57:28 +00:00

30 lines
631 B
C++

#ifndef DRAWOBJMGR_H
#define DRAWOBJMGR_H
#include <utility>
class DrawObject;
typedef std::map<uint64,DrawObject*> DrawObjStorage;
class DrawObjMgr
{
public:
DrawObjMgr();
~DrawObjMgr();
void Add(uint64,DrawObject*);
void Delete(uint64);
void Clear(void);
void Update(void); // Threadsafe! delete code must be called from here!
uint32 StorageSize(void) { return _storage.size(); }
void UnlinkAll(void);
private:
DrawObjStorage _storage;
ZThread::LockedQueue<uint64,ZThread::FastMutex> _del;
ZThread::LockedQueue<std::pair<uint64,DrawObject*>,ZThread::FastMutex > _add;
};
#endif