Freeciv21
Develop your civilization from humble roots to a global empire
global_worklist.h File Reference
#include "speclist.h"
+ Include dependency graph for global_worklist.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define SPECLIST_TAG   global_worklist
 
#define SPECLIST_TYPE   struct global_worklist
 
#define global_worklists_iterate_all(pgwl)
 
#define global_worklists_iterate_all_end
 
#define global_worklists_iterate(pgwl)
 
#define global_worklists_iterate_end
 

Functions

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...
 
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...
 
struct global_worklistglobal_worklist_new (const char *name)
 Creates a new global worklist form a normal worklist. More...
 
void global_worklist_destroy (struct global_worklist *pgwl)
 Destroys a glocal worklist. More...
 
struct global_worklistglobal_worklist_by_id (int id)
 Returns the global worklist corresponding to this id. 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 worklistglobal_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...
 
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...
 

Macro Definition Documentation

◆ global_worklists_iterate

#define global_worklists_iterate (   pgwl)
Value:
{ \
#define global_worklists_iterate_all(pgwl)
bool global_worklist_is_valid(const struct global_worklist *pgwl)
Returns TRUE if this global worklist is valid.

Definition at line 52 of file global_worklist.h.

◆ global_worklists_iterate_all

#define global_worklists_iterate_all (   pgwl)
Value:
if (client.worklists) { \
TYPED_LIST_ITERATE(struct global_worklist, client.worklists, pgwl)
struct civclient client
struct global_worklist_list * worklists
Definition: client_main.h:90

Definition at line 44 of file global_worklist.h.

◆ global_worklists_iterate_all_end

#define global_worklists_iterate_all_end
Value:
}
#define LIST_ITERATE_END
Definition: speclist.h:579

Definition at line 47 of file global_worklist.h.

◆ global_worklists_iterate_end

#define global_worklists_iterate_end
Value:
} \
} \
global_worklists_iterate_all_end;

Definition at line 56 of file global_worklist.h.

◆ SPECLIST_TAG

#define SPECLIST_TAG   global_worklist

Definition at line 39 of file global_worklist.h.

◆ SPECLIST_TYPE

#define SPECLIST_TYPE   struct global_worklist

Definition at line 40 of file global_worklist.h.

Function Documentation

◆ global_worklist_by_id()

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().

◆ global_worklist_destroy()

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().

◆ global_worklist_get()

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().

◆ global_worklist_id()

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().

◆ global_worklist_is_valid()

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.

◆ global_worklist_name()

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().

◆ global_worklist_new()

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().

◆ global_worklist_set()

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().

◆ global_worklist_set_name()

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().

◆ global_worklists_build()

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().

◆ global_worklists_free()

void global_worklists_free ( )

Free the client global worklists.

Definition at line 83 of file global_worklist.cpp.

Referenced by options_free().

◆ global_worklists_init()

void global_worklists_init ( )

Initialize the client global worklists.

Definition at line 73 of file global_worklist.cpp.

Referenced by options_init().

◆ global_worklists_load()

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.

◆ global_worklists_save()

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().

◆ global_worklists_unbuild()

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().