Toggle navigation
ivorium
iv_components
Example project
GitHub
Main Page
Modules
Classes
Files
File List
File Members
ivorium_systems
DelayedLoadSystem
DelayedLoad.cpp
Go to the documentation of this file.
1
#include "
DelayedLoadSystem.hpp
"
2
#include "../Defs.hpp"
3
4
namespace
iv
5
{
6
7
DelayedLoad::DelayedLoad
(
Instance
* inst ) :
8
cm( inst, this,
"DelayedLoad"
),
9
inst( inst )
10
{
11
}
12
13
DelayedLoad::~DelayedLoad
()
14
{
15
auto
* sys = this->
instance
()->
getSystem
<
DelayedLoadSystem
>();
16
if
( sys )
17
sys->
ClearDelayedLoad
(
this
);
18
}
19
20
Instance
*
DelayedLoad::instance
()
const
21
{
22
return
this->inst;
23
}
24
25
void
DelayedLoad::LoadNow
()
26
{
27
this->
Load
();
28
}
29
30
void
DelayedLoad::RequestDelayedLoad
(
int
complexity_bytes )
31
{
32
auto
* sys = this->
instance
()->
getSystem
<
DelayedLoadSystem
>();
33
if
( sys )
34
sys->
QueueDelayedLoad
(
this
, complexity_bytes );
35
}
36
37
}