Project Alice
Loading...
Searching...
No Matches
notifications.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include "
container_types.hpp
"
4
#include "
text.hpp
"
5
6
namespace
notification
{
7
8
struct
message
{
9
std::function<void(
sys::state
&,
text::layout_base
&)>
body
;
10
char
const
*
title
=
nullptr
;
11
dcon::nation_id
source
;
// which nation caused the notification to be sent
12
dcon::nation_id
target
;
// which nation is primarily affected by the event (if != source)
13
dcon::nation_id
third
;
// a secondary nation affected by the event
14
sys::message_base_type
type
;
15
};
16
17
void
post
(
sys::state
& state,
message
&& m);
18
bool
nation_is_interesting
(
sys::state
& state, dcon::nation_id n);
19
20
}
// namespace notification
container_types.hpp
notification
Definition:
notifications.cpp:4
notification::post
void post(sys::state &state, message &&m)
Definition:
notifications.cpp:6
notification::nation_is_interesting
bool nation_is_interesting(sys::state &state, dcon::nation_id n)
Definition:
notifications.cpp:17
sys::message_base_type
message_base_type
Definition:
constants.hpp:333
notification::message
Definition:
notifications.hpp:8
notification::message::source
dcon::nation_id source
Definition:
notifications.hpp:11
notification::message::title
char const * title
Definition:
notifications.hpp:10
notification::message::body
std::function< void(sys::state &, text::layout_base &)> body
Definition:
notifications.hpp:9
notification::message::third
dcon::nation_id third
Definition:
notifications.hpp:13
notification::message::type
sys::message_base_type type
Definition:
notifications.hpp:14
notification::message::target
dcon::nation_id target
Definition:
notifications.hpp:12
sys::state
Definition:
system_state.hpp:472
text::layout_base
Definition:
text.hpp:835
text.hpp
src
gamestate
notifications.hpp
Generated by
1.9.5