The Battle for Wesnoth  1.15.0+dev
Go to the documentation of this file.
1 /*
2  Copyright (C) 2017-2018 by the Battle for Wesnoth Project
4  This program is free software; you can redistribute it and/or modify
5  it under the terms of the GNU General Public License as published by
6  the Free Software Foundation; either version 2 of the License, or
7  (at your option) any later version.
8  This program is distributed in the hope that it will be useful,
11  See the COPYING file for more details.
12 */
14 #pragma once
16 #include <string>
18 /** See for more info. */
21 /**
22  * Prints a message to the deprecation log domain informing players that a given feature
23  * has been deprecated.
24  *
25  * @param elem_name The name of the feature to be deprecated.
26  * @param level The deprecation level. This indicates how long the feature will
27  * remain supported before removal.
28  * @param version If @a level is PREEMPTIVE or FOR_REMOVAL, this should be the first
29  * version in which the feature could be removed. If it's INDEFINITE
30  * or REMOVED, this is unused.
31  * @param detail Optional extra message elaborating on the deprecation. This can be
32  * used to specify which feature to use instead, for example.
33  *
34  * @returns The final translated deprecation message in case you want to output
35  * it elsewhere as well.
36  *
37  * @todo @a version should probably be made optional to handle INDEFINITE
38  * and REMOVED deprecation, but I don't think we can do that without
39  * including version_info.hpp in this header.
40  */
41 std::string deprecated_message(const std::string& elem_name,
43  const class version_info& version,
44  const std::string& detail = "");
std::string deprecated_message(const std::string &elem_name, DEP_LEVEL level, const class version_info &version, const std::string &detail="")
Prints a message to the deprecation log domain informing players that a given feature has been deprec...
Represents version numbers.
See for more info.
Definition: deprecation.hpp:19