1 /*
2  Copyright (C) 2010 - 2018 by Gabriel Morin <gabrielmorin (at) gmail (dot) com>
3  Part of the Battle for Wesnoth Project https://www.wesnoth.org
4 
5  This program is free software; you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation; either version 2 of the License, or
8    (at your option) any later version.
9  This program is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY.
11 
12  See the COPYING file for more details.
13  */
14 
15 /**
16  * @file
17  * Contains typedefs for the whiteboard.
18  */
19 
20 #pragma once
21 
22 #include "log.hpp"
23 static lg::log_domain log_whiteboard("whiteboard");
24 #define ERR_WB LOG_STREAM_INDENT(err, log_whiteboard)
25 #define WRN_WB LOG_STREAM_INDENT(warn, log_whiteboard)
26 #define LOG_WB LOG_STREAM_INDENT(info, log_whiteboard)
27 #define DBG_WB LOG_STREAM_INDENT(debug, log_whiteboard)
28 
29 #include <deque>
30 #include <ostream> //used for << operators
31 
32 #include "fake_unit_ptr.hpp"
33 #include "units/ptr.hpp"
34 
35 class arrow;
36 class config;
37 class fake_unit_manager;
38 struct map_location; //not used in the typedefs, saves a few forward declarations
39 class unit;
40 class unit_map; //not used in the typedefs, saves a few forward declarations
41 
42 namespace pathfind {
43 	struct plain_route;
44 	struct marked_route;
45 }
46 
47 namespace wb {
48 
49 class action;
50 class move;
51 class attack;
52 class recall;
53 class recruit;
54 class suppose_dead;
55 class side_actions;
56 
57 typedef std::shared_ptr<bool> whiteboard_lock;
58 
59 typedef std::shared_ptr<arrow> arrow_ptr;
60 
61 typedef std::shared_ptr<action> action_ptr;
62 typedef std::shared_ptr<action const> action_const_ptr;
63 typedef std::weak_ptr<action> weak_action_ptr;
64 typedef std::deque<action_ptr> action_queue;
65 typedef std::shared_ptr<side_actions> side_actions_ptr;
66 
67 typedef std::shared_ptr<move> move_ptr;
68 typedef std::shared_ptr<move const> move_const_ptr;
69 typedef std::shared_ptr<attack> attack_ptr;
70 typedef std::shared_ptr<attack const> attack_const_ptr;
71 typedef std::shared_ptr<recruit> recruit_ptr;
72 typedef std::shared_ptr<recruit const> recruit_const_ptr;
73 typedef std::shared_ptr<recall> recall_ptr;
74 typedef std::shared_ptr<recall const> recall_const_ptr;
75 typedef std::shared_ptr<suppose_dead> suppose_dead_ptr;
76 typedef std::shared_ptr<suppose_dead const> suppose_dead_const_ptr;
77 
78 } // end namespace wb
79