The Battle for Wesnoth 1.21.0-dev
 
Loading...
Searching...
No Matches
typedefs.hpp
Go to the documentation of this file.
1/*
2 Copyright (C) 2010 - 2025
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"
24static 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
36class arrow;
37class config;
39struct map_location; //not used in the typedefs, saves a few forward declarations
40class unit;
41class unit_map; //not used in the typedefs, saves a few forward declarations
42
43namespace pathfind {
44 struct plain_route;
45 struct marked_route;
46}
47
48namespace wb {
49
50class action;
51class move;
52class attack;
53class recall;
54class recruit;
55class suppose_dead;
56class side_actions;
57
58typedef std::shared_ptr<bool> whiteboard_lock;
59
60typedef std::shared_ptr<arrow> arrow_ptr;
61
62typedef std::shared_ptr<action> action_ptr;
63typedef std::shared_ptr<action const> action_const_ptr;
64typedef std::weak_ptr<action> weak_action_ptr;
65typedef std::deque<action_ptr> action_queue;
66typedef std::shared_ptr<side_actions> side_actions_ptr;
67
68typedef std::shared_ptr<move> move_ptr;
69typedef std::shared_ptr<move const> move_const_ptr;
70typedef std::shared_ptr<attack> attack_ptr;
71typedef std::shared_ptr<attack const> attack_const_ptr;
72typedef std::shared_ptr<recruit> recruit_ptr;
73typedef std::shared_ptr<recruit const> recruit_const_ptr;
74typedef std::shared_ptr<recall> recall_ptr;
75typedef std::shared_ptr<recall const> recall_const_ptr;
76typedef std::shared_ptr<suppose_dead> suppose_dead_ptr;
77typedef 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:157
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:39
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:58
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:46
static lg::log_domain log_whiteboard("whiteboard")