The Battle for Wesnoth  1.19.0-dev
typedefs.hpp
Go to the documentation of this file.
1 /*
2  Copyright (C) 2010 - 2024
3  by Gabriel Morin <gabrielmorin (at) gmail (dot) com>
4  Part of the Battle for Wesnoth Project https://www.wesnoth.org/
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 2 of the License, or
9  (at your option) any later version.
10  This program is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY.
12 
13  See the COPYING file for more details.
14 */
15 
16 /**
17  * @file
18  * Contains typedefs for the whiteboard.
19  */
20 
21 #pragma once
22 
23 #include "log.hpp"
24 static lg::log_domain log_whiteboard("whiteboard");
25 #define ERR_WB LOG_STREAM_INDENT(err, log_whiteboard)
26 #define WRN_WB LOG_STREAM_INDENT(warn, log_whiteboard)
27 #define LOG_WB LOG_STREAM_INDENT(info, log_whiteboard)
28 #define DBG_WB LOG_STREAM_INDENT(debug, log_whiteboard)
29 
30 #include <deque>
31 #include <ostream> //used for << operators
32 
33 #include "fake_unit_ptr.hpp"
34 #include "units/ptr.hpp"
35 
36 class arrow;
37 class config;
38 class fake_unit_manager;
39 struct map_location; //not used in the typedefs, saves a few forward declarations
40 class unit;
41 class unit_map; //not used in the typedefs, saves a few forward declarations
42 
43 namespace pathfind {
44  struct plain_route;
45  struct marked_route;
46 }
47 
48 namespace wb {
49 
50 class action;
51 class move;
52 class attack;
53 class recall;
54 class recruit;
55 class suppose_dead;
56 class side_actions;
57 
58 typedef std::shared_ptr<bool> whiteboard_lock;
59 
60 typedef std::shared_ptr<arrow> arrow_ptr;
61 
62 typedef std::shared_ptr<action> action_ptr;
63 typedef std::shared_ptr<action const> action_const_ptr;
64 typedef std::weak_ptr<action> weak_action_ptr;
65 typedef std::deque<action_ptr> action_queue;
66 typedef std::shared_ptr<side_actions> side_actions_ptr;
67 
68 typedef std::shared_ptr<move> move_ptr;
69 typedef std::shared_ptr<move const> move_const_ptr;
70 typedef std::shared_ptr<attack> attack_ptr;
71 typedef std::shared_ptr<attack const> attack_const_ptr;
72 typedef std::shared_ptr<recruit> recruit_ptr;
73 typedef std::shared_ptr<recruit const> recruit_const_ptr;
74 typedef std::shared_ptr<recall> recall_ptr;
75 typedef std::shared_ptr<recall const> recall_const_ptr;
76 typedef std::shared_ptr<suppose_dead> suppose_dead_ptr;
77 typedef std::shared_ptr<suppose_dead const> suppose_dead_const_ptr;
78 
79 } // end namespace wb
Arrows destined to be drawn on the map.
Definition: arrow.hpp:30
A config object defines a single node in a WML file, with access to child nodes.
Definition: config.hpp:159
Manages a list of fake units for the display object.
Container associating units to locations.
Definition: map.hpp:98
This class represents a single unit of a specific type.
Definition: unit.hpp:133
Standard logging facilities (interface).
Definition: display.hpp:45
std::deque< action_ptr > action_queue
Definition: typedefs.hpp:65
std::shared_ptr< recruit > recruit_ptr
Definition: typedefs.hpp:72
std::weak_ptr< action > weak_action_ptr
Definition: typedefs.hpp:64
std::shared_ptr< suppose_dead > suppose_dead_ptr
Definition: typedefs.hpp:76
std::shared_ptr< recall const > recall_const_ptr
Definition: typedefs.hpp:75
std::shared_ptr< bool > whiteboard_lock
Definition: typedefs.hpp:56
std::shared_ptr< move > move_ptr
Definition: typedefs.hpp:68
std::shared_ptr< action > action_ptr
Definition: typedefs.hpp:62
std::shared_ptr< attack > attack_ptr
Definition: typedefs.hpp:70
std::shared_ptr< side_actions > side_actions_ptr
Definition: typedefs.hpp:66
std::shared_ptr< recruit const > recruit_const_ptr
Definition: typedefs.hpp:73
std::shared_ptr< arrow > arrow_ptr
Definition: typedefs.hpp:60
std::shared_ptr< move const > move_const_ptr
Definition: typedefs.hpp:69
std::shared_ptr< attack const > attack_const_ptr
Definition: typedefs.hpp:71
std::shared_ptr< suppose_dead const > suppose_dead_const_ptr
Definition: typedefs.hpp:77
std::shared_ptr< action const > action_const_ptr
Definition: typedefs.hpp:63
std::shared_ptr< recall > recall_ptr
Definition: typedefs.hpp:74
Encapsulates the map of the game.
Definition: location.hpp:38
static lg::log_domain log_whiteboard("whiteboard")