54 char special_separator=
'\0',
const std::string& special=std::string());
76 std::string
str()
const;
81 operator std::string()
const {
return this->
str(); }
Represents version numbers.
std::string str() const
Serializes the version number into string form.
unsigned int get_component(std::size_t index) const
Returns any numeric component from a version number.
unsigned int revision_level() const
Retrieves the revision level (x3 in "x1.x2.x3").
void set_component(std::size_t index, unsigned int value)
Sets any numeric component from a version number.
version_info(std::nullptr_t)=delete
void set_minor_version(unsigned int)
Sets the minor version number.
char special_version_separator() const
Retrieves the special version separator (e.g.
const std::string & special_version() const
Retrieves the special version suffix (e.g.
void set_major_version(unsigned int)
Sets the major version number.
unsigned int minor_version() const
Retrieves the minor version number (x2 in "x1.x2.x3").
unsigned int major_version() const
Retrieves the major version number (x1 in "x1.x2.x3").
std::vector< unsigned int > nums_
void set_revision_level(unsigned int)
Sets the revision level.
const std::vector< unsigned int > & components() const
Read-only access to all numeric components.
bool is_canonical() const
Whether the version number is considered canonical for mainline Wesnoth.
version_info()
Default constructor.
void set_special_version(const std::string &str)
Sets the special version suffix.
bool is_dev_version() const
Whether this version represents a development version of Wesnoth aka whether the minor version odd.
bool operator>=(const version_info &, const version_info &)
Greater-than-or-equal operator for version_info.
bool do_version_check(const version_info &a, VERSION_COMP_OP op, const version_info &b)
bool operator==(const version_info &, const version_info &)
Equality operator for version_info.
bool operator<(const version_info &, const version_info &)
Less-than operator for version_info.
bool operator>(const version_info &, const version_info &)
Greater-than operator for version_info.
bool operator!=(const version_info &, const version_info &)
Inequality operator for version_info.
bool operator<=(const version_info &, const version_info &)
Less-than-or-equal operator for version_info.
VERSION_COMP_OP parse_version_op(const std::string &op_str)
Game configuration data as global variables.
const version_info min_savegame_version(MIN_SAVEGAME_VERSION)
const version_info test_version("test")
const version_info wesnoth_version(VERSION)
const std::string revision
std::size_t index(std::string_view str, const std::size_t index)
Codepoint index corresponding to the nth character in a UTF-8 string.