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