The Battle for Wesnoth  1.15.1+dev
typedefs.hpp
Go to the documentation of this file.
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;
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
std::shared_ptr< recruit const > recruit_const_ptr
Definition: typedefs.hpp:72
This class represents a single unit of a specific type.
Definition: unit.hpp:99
std::shared_ptr< recall const > recall_const_ptr
Definition: typedefs.hpp:74
Manages a list of fake units for the display object.
std::shared_ptr< side_actions > side_actions_ptr
Definition: typedefs.hpp:65
std::shared_ptr< bool > whiteboard_lock
Definition: typedefs.hpp:55
std::shared_ptr< move const > move_const_ptr
Definition: typedefs.hpp:68
std::shared_ptr< attack const > attack_const_ptr
Definition: typedefs.hpp:70
std::shared_ptr< recruit > recruit_ptr
Definition: typedefs.hpp:71
Arrows destined to be drawn on the map.
Definition: arrow.hpp:29
std::shared_ptr< suppose_dead const > suppose_dead_const_ptr
Definition: typedefs.hpp:76
std::shared_ptr< action > action_ptr
Definition: typedefs.hpp:61
Encapsulates the map of the game.
Definition: location.hpp:42
static lg::log_domain log_whiteboard("whiteboard")
std::shared_ptr< suppose_dead > suppose_dead_ptr
Definition: typedefs.hpp:75
std::shared_ptr< move > move_ptr
Definition: typedefs.hpp:67
std::shared_ptr< attack_type > attack_ptr
Definition: ptr.hpp:36
std::weak_ptr< action > weak_action_ptr
Definition: typedefs.hpp:63
std::shared_ptr< arrow > arrow_ptr
Definition: typedefs.hpp:59
Standard logging facilities (interface).
Container associating units to locations.
Definition: map.hpp:99
std::shared_ptr< recall > recall_ptr
Definition: typedefs.hpp:73
std::deque< action_ptr > action_queue
Definition: typedefs.hpp:64
A config object defines a single node in a WML file, with access to child nodes.
Definition: config.hpp:68
This internal whiteboard class holds the planned action queues for a team, and offers many utility me...
Definition: display.hpp:48
std::shared_ptr< action const > action_const_ptr
Definition: typedefs.hpp:62