Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Loading...
Searching...
No Matches
GridLoader.h
Go to the documentation of this file.
1/*
2* This file is part of Project SkyFire https://www.projectskyfire.org.
3* See LICENSE.md file for Copyright information
4*/
5
6#ifndef SKYFIRE_GRIDLOADER_H
7#define SKYFIRE_GRIDLOADER_H
8
19
20 //I cannot see why this cannot be replaced by a Grid::Visit
21 /*
22 #include "Define.h"
23 #include "Grid.h"
24 #include "TypeContainerVisitor.h"
25
26 template
27 <
28 class ACTIVE_OBJECT,
29 class WORLD_OBJECT_TYPES,
30 class GRID_OBJECT_TYPES
31 >
32 class GridLoader
33 {
34 public:
35
36 // Loads the grid
37 template<class LOADER>
38 void Load(Grid<ACTIVE_OBJECT, WORLD_OBJECT_TYPES, GRID_OBJECT_TYPES> &grid, LOADER &loader)
39 {
40 grid.LockGrid();
41 loader.Load(grid);
42 grid.UnlockGrid();
43 }
44
45 // Stop the grid
46 template<class STOPER>
47 void Stop(Grid<ACTIVE_OBJECT, WORLD_OBJECT_TYPES, GRID_OBJECT_TYPES> &grid, STOPER &stoper)
48 {
49 grid.LockGrid();
50 stoper.Stop(grid);
51 grid.UnlockGrid();
52 }
53
54 // Unloads the grid
55 template<class UNLOADER>
56 void Unload(Grid<ACTIVE_OBJECT, WORLD_OBJECT_TYPES, GRID_OBJECT_TYPES> &grid, UNLOADER &unloader)
57 {
58 grid.LockGrid();
59 unloader.Unload(grid);
60 grid.UnlockGrid();
61 }
62 };
63 */
64#endif