mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-22 13:16:23 +00:00
31 lines
1.1 KiB
C++
31 lines
1.1 KiB
C++
/*
|
|
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU GPL v2 license: https://github.com/azerothcore/azerothcore-wotlk/blob/master/LICENSE-GPL2
|
|
* Copyright (C) 2008-2016 TrinityCore <http://www.trinitycore.org/>
|
|
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
|
|
*/
|
|
|
|
#ifndef _GRIDREFMANAGER
|
|
#define _GRIDREFMANAGER
|
|
|
|
#include "RefManager.h"
|
|
|
|
template<class OBJECT>
|
|
class GridReference;
|
|
|
|
template<class OBJECT>
|
|
class GridRefManager : public RefManager<GridRefManager<OBJECT>, OBJECT>
|
|
{
|
|
public:
|
|
typedef LinkedListHead::Iterator< GridReference<OBJECT> > iterator;
|
|
|
|
GridReference<OBJECT>* getFirst() { return (GridReference<OBJECT>*)RefManager<GridRefManager<OBJECT>, OBJECT>::getFirst(); }
|
|
GridReference<OBJECT>* getLast() { return (GridReference<OBJECT>*)RefManager<GridRefManager<OBJECT>, OBJECT>::getLast(); }
|
|
|
|
iterator begin() { return iterator(getFirst()); }
|
|
iterator end() { return iterator(NULL); }
|
|
iterator rbegin() { return iterator(getLast()); }
|
|
iterator rend() { return iterator(NULL); }
|
|
};
|
|
#endif
|
|
|