![]() |
Freeciv21
Develop your civilization from humble roots to a global empire
|
#include <cstdarg>#include "fcintl.h"#include "log.h"#include "registry.h"#include "registry_ini.h"#include "shared.h"#include "support.h"#include "fc_types.h"#include "requirements.h"#include "worklist.h"#include "client_main.h"#include "global_worklist.h"
Include dependency graph for global_worklist.cpp:Go to the source code of this file.
Classes | |
| struct | uni_name |
| struct | global_worklist |
Enumerations | |
| enum | global_worklist_status { STATUS_UNBUILT , STATUS_WORKLIST } |
Functions | |
| static bool | global_worklist_load (struct section_file *file, const char *path,...) |
| Load a global worklist form a section file. More... | |
| static bool static void | global_worklist_save (const struct global_worklist *pgwl, struct section_file *file, int fill_until, const char *path,...) |
| Save one global worklist into a section file. More... | |
| static bool static void void | global_worklists_init () |
| Initialize the client global worklists. More... | |
| void | global_worklists_free () |
| Free the client global worklists. More... | |
| void | global_worklists_build () |
| Check if the global worklists are valid or not for the ruleset. More... | |
| void | global_worklists_unbuild () |
| Convert the universal pointers to strings to work out-ruleset. More... | |
| static struct global_worklist * | global_worklist_alloc (enum global_worklist_status type) |
| Returns a new created global worklist structure. More... | |
| void | global_worklist_destroy (struct global_worklist *pgwl) |
| Destroys a glocal worklist. More... | |
| struct global_worklist * | global_worklist_new (const char *name) |
| Creates a new global worklist form a normal worklist. More... | |
| bool | global_worklist_is_valid (const struct global_worklist *pgwl) |
| Returns TRUE if this global worklist is valid. More... | |
| bool | global_worklist_set (struct global_worklist *pgwl, const struct worklist *pwl) |
| Sets the worklist. More... | |
| const struct worklist * | global_worklist_get (const struct global_worklist *pgwl) |
| Returns the worklist of this global worklist or nullptr if it's not valid. More... | |
| int | global_worklist_id (const struct global_worklist *pgwl) |
| Returns the id of the global worklist. More... | |
| struct global_worklist * | global_worklist_by_id (int id) |
| Returns the global worklist corresponding to this id. More... | |
| void | global_worklist_set_name (struct global_worklist *pgwl, const char *name) |
| Sets the name of this global worklist. More... | |
| const char * | global_worklist_name (const struct global_worklist *pgwl) |
| Return the name of the global worklist. More... | |
| void | global_worklists_load (struct section_file *file) |
| Load all global worklist from a section file. More... | |
| void | global_worklists_save (struct section_file *file) |
| Save all global worklist into a section file. More... | |
| Enumerator | |
|---|---|
| STATUS_UNBUILT | |
| STATUS_WORKLIST | |
Definition at line 33 of file global_worklist.cpp.
|
static |
Returns a new created global worklist structure.
Definition at line 173 of file global_worklist.cpp.
Referenced by global_worklist_load(), and global_worklist_new().
| struct global_worklist* global_worklist_by_id | ( | int | id | ) |
Returns the global worklist corresponding to this id.
N.B.: It can returns an invalid glocbal worklist.
Definition at line 284 of file global_worklist.cpp.
Referenced by city_widget::display_list_menu(), and city_dialog::display_worklist_menu().
| void global_worklist_destroy | ( | struct global_worklist * | pgwl | ) |
Destroys a glocal worklist.
Definition at line 199 of file global_worklist.cpp.
Referenced by global_worklists_free(), and global_worklists_load().
| const struct worklist* global_worklist_get | ( | const struct global_worklist * | pgwl | ) |
Returns the worklist of this global worklist or nullptr if it's not valid.
Definition at line 262 of file global_worklist.cpp.
Referenced by city_widget::display_list_menu(), and city_dialog::display_worklist_menu().
| int global_worklist_id | ( | const struct global_worklist * | pgwl | ) |
Returns the id of the global worklist.
Definition at line 274 of file global_worklist.cpp.
Referenced by city_dialog::display_worklist_menu(), and city_widget::gen_worklist_labels().
| bool global_worklist_is_valid | ( | const struct global_worklist * | pgwl | ) |
Returns TRUE if this global worklist is valid.
Definition at line 240 of file global_worklist.cpp.
|
static |
Load a global worklist form a section file.
Returns FALSE if we reached the end of the array.
Definition at line 320 of file global_worklist.cpp.
Referenced by global_worklists_load().
| const char* global_worklist_name | ( | const struct global_worklist * | pgwl | ) |
Return the name of the global worklist.
Definition at line 310 of file global_worklist.cpp.
Referenced by city_dialog::display_worklist_menu(), and city_widget::gen_worklist_labels().
| struct global_worklist* global_worklist_new | ( | const char * | name | ) |
Creates a new global worklist form a normal worklist.
Definition at line 229 of file global_worklist.cpp.
Referenced by city_dialog::save_worklist().
|
static |
Save one global worklist into a section file.
Definition at line 397 of file global_worklist.cpp.
Referenced by global_worklists_save().
| bool global_worklist_set | ( | struct global_worklist * | pgwl, |
| const struct worklist * | pwl | ||
| ) |
Sets the worklist.
Return TRUE on success.
Definition at line 248 of file global_worklist.cpp.
Referenced by city_dialog::save_worklist().
| void global_worklist_set_name | ( | struct global_worklist * | pgwl, |
| const char * | name | ||
| ) |
Sets the name of this global worklist.
Definition at line 300 of file global_worklist.cpp.
Referenced by global_worklist_load(), and global_worklist_new().
| void global_worklists_build | ( | ) |
Check if the global worklists are valid or not for the ruleset.
Definition at line 96 of file global_worklist.cpp.
Referenced by client_state(), and global_worklists_load().
| void global_worklists_free | ( | ) |
Free the client global worklists.
Definition at line 83 of file global_worklist.cpp.
Referenced by options_free().
| static bool static void void global_worklists_init | ( | ) |
Initialize the client global worklists.
Definition at line 73 of file global_worklist.cpp.
Referenced by options_init().
| void global_worklists_load | ( | struct section_file * | file | ) |
Load all global worklist from a section file.
Definition at line 376 of file global_worklist.cpp.
| void global_worklists_save | ( | struct section_file * | file | ) |
Save all global worklist into a section file.
Definition at line 449 of file global_worklist.cpp.
Referenced by options_save().
| void global_worklists_unbuild | ( | ) |
Convert the universal pointers to strings to work out-ruleset.
Definition at line 143 of file global_worklist.cpp.
Referenced by client_state().