2 * Copyright (C) 2005-2008 MaNGOS <http://getmangos.com/>
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 #ifndef MANGOS_GRIDLOADER_H
20 #define MANGOS_GRIDLOADER_H
24 The GridLoader is working in conjuction with the Grid and responsible
25 for loading and unloading object-types (one or more) when objects
26 enters a grid. Unloading is scheduled and might be canceled if
27 an interested object re-enters. GridLoader does not do the actuall
28 loading and unloading but implements as a template pattern that
29 delicate its loading and unloading for the actualy loader and unloader.
30 GridLoader manages the grid (both local and remote).
33 #include "Platform/Define.h"
35 #include "TypeContainerVisitor.h"
40 class WORLD_OBJECT_TYPES
,
41 class GRID_OBJECT_TYPES
43 class MANGOS_DLL_DECL GridLoader
49 template<class LOADER
>
50 void Load(Grid
<ACTIVE_OBJECT
,WORLD_OBJECT_TYPES
, GRID_OBJECT_TYPES
> &grid
, LOADER
&loader
)
59 template<class STOPER
>
60 void Stop(Grid
<ACTIVE_OBJECT
,WORLD_OBJECT_TYPES
, GRID_OBJECT_TYPES
> &grid
, STOPER
&stoper
)
68 template<class UNLOADER
>
69 void Unload(Grid
<ACTIVE_OBJECT
,WORLD_OBJECT_TYPES
, GRID_OBJECT_TYPES
> &grid
, UNLOADER
&unloader
)
72 unloader
.Unload(grid
);