The Battle for Wesnoth  1.19.0-dev
make.hpp
Go to the documentation of this file.
1 /*
2  Copyright (C) 2014 - 2024
3  by Chris Beck <render787@gmail.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 #include "units/race.hpp"
17 #include "units/ptr.hpp"
18 
19 class config;
20 class unit_type;
21 class vconfig;
22 
23 //file to allow creating units without including unit.hpp
24 unit_ptr make_unit_ptr(const config& cfg, bool use_traits = false, const vconfig* vcfg = nullptr);
25 unit_ptr make_unit_ptr(const unit_type& t, int side, bool real_unit, unit_race::GENDER gender = unit_race::NUM_GENDERS);
26 unit_ptr make_unit_ptr(const unit& u);
double t
Definition: astarsearch.cpp:63
A config object defines a single node in a WML file, with access to child nodes.
Definition: config.hpp:159
@ NUM_GENDERS
Definition: race.hpp:27
A single unit type that the player may recruit.
Definition: types.hpp:43
This class represents a single unit of a specific type.
Definition: unit.hpp:133
A variable-expanding proxy for the config class.
Definition: variable.hpp:45
unit_ptr make_unit_ptr(const config &cfg, bool use_traits=false, const vconfig *vcfg=nullptr)
Definition: make.cpp:19
std::shared_ptr< unit > unit_ptr
Definition: ptr.hpp:26