Freeciv21
Develop your civilization from humble roots to a global empire
server_settings.h
Go to the documentation of this file.
1 /***********************************************************************
2 Copyright (c) 1996-2021 Freeciv21 and Freeciv contributors. This file is
3  /\/\ part of Freeciv21. Freeciv21 is free software: you can
4  \_\ _..._ redistribute it and/or modify it under the terms of the
5  (" )(_..._) GNU General Public License as published by the Free
6  ^^ // \\ Software Foundation, either version 3 of the License,
7  or (at your option) any later version. You should have
8 received a copy of the GNU General Public License along with Freeciv21.
9  If not, see https://www.gnu.org/licenses/.
10 ***********************************************************************/
11 
12 #pragma once
13 
14 // common
15 #include "fc_types.h"
16 
17 // Special value to signal the absence of a server setting.
18 #define SERVER_SETTING_NONE ((server_setting_id) -1)
19 
20 // Pure server settings.
23 
25 
27 
30 
31 // Special value to signal the absence of a server setting + its value.
32 #define SSETV_NONE SERVER_SETTING_NONE
33 
36 
37 ssetv ssetv_by_rule_name(const char *name);
38 const char *ssetv_rule_name(ssetv val);
39 
40 QString ssetv_human_readable(ssetv val, bool present);
41 
int server_setting_id
Definition: fc_types.h:893
int ssetv
Definition: fc_types.h:560
const char * name
Definition: inputfile.cpp:118
QString ssetv_human_readable(ssetv val, bool present)
Returns the server setting - value pair formated in a user readable way.
server_setting_id server_setting_by_name(const char *name)
Returns the server setting with the specified name.
bool server_setting_value_bool_get(server_setting_id id)
Returns the value of the server setting with the specified id.
enum sset_type server_setting_type_get(server_setting_id id)
Returns the type of the server setting with the specified id.
server_setting_id ssetv_setting_get(ssetv enc)
Returns the server setting of the setting - value pair.
bool server_setting_exists(server_setting_id id)
Returns TRUE iff a server setting with the specified id exists.
const char * ssetv_rule_name(ssetv val)
Returns the server setting - value pair encoded as a string.
bool ssetv_setting_has_value(ssetv val)
Returns if the server setting currently has the value in the pair.
ssetv ssetv_by_rule_name(const char *name)
Returns the server setting - value pair encoded in the string.
const char * server_setting_name_get(server_setting_id id)
Returns the name of the server setting with the specified id.
ssetv ssetv_from_values(server_setting_id setting, int value)
Returns a server setting - value pair from its setting and value;.
int server_setting_value_int_get(server_setting_id id)
Returns the value of the server setting with the specified id.