Freeciv-3.3
Loading...
Searching...
No Matches
Macros | Functions
global_worklist.h File Reference
#include "registry.h"
#include "shared.h"
#include "worklist.h"
#include "speclist.h"

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 (void)
 
void global_worklists_free (void)
 
void global_worklists_build (void)
 
void global_worklists_unbuild (void)
 
void global_worklists_load (struct section_file *file)
 
void global_worklists_save (struct section_file *file)
 
int global_worklists_number (void)
 
struct global_worklistglobal_worklist_new (const char *name)
 
void global_worklist_destroy (struct global_worklist *pgwl)
 
struct global_worklistglobal_worklist_by_id (int id)
 
bool global_worklist_is_valid (const struct global_worklist *pgwl)
 
bool global_worklist_set (struct global_worklist *pgwl, const struct worklist *pwl)
 
const struct worklistglobal_worklist_get (const struct global_worklist *pgwl)
 
int global_worklist_id (const struct global_worklist *pgwl)
 
void global_worklist_set_name (struct global_worklist *pgwl, const char *name)
 
const charglobal_worklist_name (const struct global_worklist *pgwl)
 

Macro Definition Documentation

◆ global_worklists_iterate

#define global_worklists_iterate (   pgwl)
Value:
char * incite_cost
Definition comments.c:76
#define global_worklists_iterate_all(pgwl)
bool global_worklist_is_valid(const struct global_worklist *pgwl)

Definition at line 65 of file global_worklist.h.

◆ global_worklists_iterate_all

#define global_worklists_iterate_all (   pgwl)
Value:
struct civclient client
struct global_worklist_list * worklists
Definition client_main.h:97

Definition at line 57 of file global_worklist.h.

◆ global_worklists_iterate_all_end

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

Definition at line 60 of file global_worklist.h.

◆ global_worklists_iterate_end

#define global_worklists_iterate_end
Value:
} \
#define global_worklists_iterate_all_end

Definition at line 68 of file global_worklist.h.

◆ SPECLIST_TAG

#define SPECLIST_TAG   global_worklist

Definition at line 52 of file global_worklist.h.

◆ SPECLIST_TYPE

#define SPECLIST_TYPE   struct global_worklist

Definition at line 53 of file global_worklist.h.

Function Documentation

◆ global_worklist_by_id()

struct global_worklist * global_worklist_by_id ( int  id)

◆ global_worklist_destroy()

void global_worklist_destroy ( struct global_worklist pgwl)

Destroys a glocal worklist.

Definition at line 214 of file global_worklist.c.

Referenced by edit_worklist_callback(), global_worklists_free(), global_worklists_load(), and worklists_response().

◆ global_worklist_get()

const struct worklist * global_worklist_get ( const struct global_worklist pgwl)

◆ global_worklist_id()

int global_worklist_id ( const struct global_worklist pgwl)

◆ 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 255 of file global_worklist.c.

◆ global_worklist_name()

const char * global_worklist_name ( const struct global_worklist pgwl)

◆ global_worklist_new()

struct global_worklist * global_worklist_new ( const char name)

Creates a new global worklist form a normal worklist.

Definition at line 244 of file global_worklist.c.

Referenced by add_new_worklist_callback(), city_dialog::save_worklist(), and worklists_response().

◆ 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 263 of file global_worklist.c.

Referenced by commit_worklist(), ok_worklist_editor_callback(), and 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 312 of file global_worklist.c.

Referenced by cell_edited(), cell_edited(), global_worklist_load(), global_worklist_new(), and ok_worklist_editor_callback().

◆ global_worklists_build()

void global_worklists_build ( void  )

Check if the global worklists are valid or not for the ruleset.

Definition at line 100 of file global_worklist.c.

Referenced by global_worklists_load(), and set_client_state().

◆ global_worklists_free()

void global_worklists_free ( void  )

Free the client global worklists.

Definition at line 86 of file global_worklist.c.

◆ global_worklists_init()

void global_worklists_init ( void  )

Initialize the client global worklists.

Definition at line 76 of file global_worklist.c.

◆ global_worklists_load()

void global_worklists_load ( struct section_file file)

Load all global worklist from a section file.

Definition at line 390 of file global_worklist.c.

◆ global_worklists_number()

int global_worklists_number ( void  )

Returns the number of valid global worklists. N.B.: This counts only the valid global worklists.

Definition at line 173 of file global_worklist.c.

◆ global_worklists_save()

void global_worklists_save ( struct section_file file)

Save all global worklist into a section file.

Definition at line 465 of file global_worklist.c.

◆ global_worklists_unbuild()

void global_worklists_unbuild ( void  )

Convert the universal pointers to strings to work out-ruleset.

Definition at line 145 of file global_worklist.c.

Referenced by set_client_state().