Toggle navigation
ivorium
iv_components
Example project
GitHub
Main Page
Modules
Classes
Files
File List
iv_components
Sectors
Sectors.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include <
ivorium.hpp
>
4
#include <unordered_set>
5
6
namespace
comp
7
{
8
12
class
Sectors
13
{
14
public
:
15
class
Listener
16
{
17
public
:
18
iv::ClientMarker
cm
;
19
Listener
(
iv::Instance
* inst,
Sectors
* sectors );
20
~Listener
();
21
iv::Instance
*
instance
()
const
;
22
23
virtual
void
Sector_Load
(
iv::int2
block ) = 0;
24
virtual
void
Sector_Unload
(
iv::int2
block ) = 0;
25
26
private
:
27
iv::Instance
* inst;
28
Sectors
* sectors;
29
};
30
31
public
:
32
void
AddListener
(
Listener
* );
33
void
RemoveListener
(
Listener
* );
34
35
void
Load
(
iv::ClientMarker
* behavior,
iv::int2
);
36
void
Unload
(
iv::ClientMarker
* behavior,
iv::int2
);
37
38
private
:
39
std::unordered_set< Listener * > listeners;
40
};
41
42
}