neoGFX
Cross-platform C++ app/game engine
time.hpp
Go to the documentation of this file.
1
// time.hpp
2
/*
3
neogfx C++ GUI Library
4
Copyright (c) 2018 Leigh Johnston. All Rights Reserved.
5
6
This program is free software: you can redistribute it and / or modify
7
it under the terms of the GNU General Public License as published by
8
the Free Software Foundation, either version 3 of the License, or
9
(at your option) any later version.
10
11
This program is distributed in the hope that it will be useful,
12
but WITHOUT ANY WARRANTY; without even the implied warranty of
13
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
GNU General Public License for more details.
15
16
You should have received a copy of the GNU General Public License
17
along with this program. If not, see <http://www.gnu.org/licenses/>.
18
*/
19
#pragma once
20
21
#include <
neogfx/neogfx.hpp
>
22
#include <
neogfx/game/chrono.hpp
>
23
#include <
neogfx/game/system.hpp
>
24
25
namespace
neogfx::game
26
{
27
class
time
:
public
system
28
{
29
30
public
:
31
time
(
game::i_ecs
& aEcs);
32
public
:
33
const
system_id
&
id
()
const override
;
34
const
i_string
&
name
()
const override
;
35
public
:
36
void
apply
()
override
;
37
public
:
38
step_time
system_time
()
const
;
39
step_time
world_time
()
const
;
40
public
:
41
struct
meta
42
{
43
static
const
neolib::uuid
&
id
()
44
{
45
static
const
neolib::uuid
sId = { 0x714a0e4a, 0xd0be, 0x4737, 0xbd25, { 0xe8, 0x3e, 0x2a, 0x5c, 0xd7, 0x65 } };
46
return
sId;
47
}
48
static
const
i_string
&
name
()
49
{
50
static
const
string
sName =
"Time"
;
51
return
sName;
52
}
53
};
54
private
:
55
mutable
optional_step_time
iSystemTimeOffset;
56
};
57
}
neogfx::game::system
Definition:
system.hpp:30
neogfx.hpp
neogfx::game::time::meta::id
static const neolib::uuid & id()
Definition:
time.hpp:43
system.hpp
neogfx::game::i_ecs
Definition:
i_ecs.hpp:59
neogfx::game::time::meta::name
static const i_string & name()
Definition:
time.hpp:48
neogfx::game::time::id
const system_id & id() const override
neogfx::game::time
Definition:
time.hpp:27
neogfx::game::optional_step_time
std::optional< step_time > optional_step_time
Definition:
chrono.hpp:42
neolib::i_string
Definition:
i_string.hpp:47
neogfx::game::time::time
time(game::i_ecs &aEcs)
neolib::uuid
Definition:
uuid.hpp:51
chrono.hpp
neogfx::game::time::world_time
step_time world_time() const
neogfx::game::step_time
step_time_interval step_time
Definition:
chrono.hpp:41
neogfx::game::time::name
const i_string & name() const override
neogfx::game::time::apply
void apply() override
neogfx::game
Definition:
aabb_octree.hpp:28
neogfx::game::time::meta
Definition:
time.hpp:41
neogfx::game::time::system_time
step_time system_time() const
include
neogfx
game
time.hpp
Generated by
1.8.13