Freeciv-3.3
Loading...
Searching...
No Matches
Data Structures | Macros | Functions
oblig_reqs.h File Reference
#include "specvec.h"

Go to the source code of this file.

Data Structures

struct  action_enabler_contradiction
 
struct  obligatory_req
 
struct  ae_contra_or
 

Macros

#define SPECVEC_TAG   obligatory_req
 
#define SPECVEC_TYPE   struct obligatory_req
 
#define obligatory_req_vector_iterate(obreq_vec, pobreq)    TYPED_VECTOR_ITERATE(struct obligatory_req, obreq_vec, pobreq)
 
#define obligatory_req_vector_iterate_end   VECTOR_ITERATE_END
 

Functions

void oblig_hard_reqs_init (void)
 
void oblig_hard_reqs_free (void)
 
void hard_code_oblig_hard_reqs (void)
 
void hard_code_oblig_hard_reqs_ruleset (void)
 
struct obligatory_req_vectoroblig_hard_reqs_get (enum action_result res)
 
struct obligatory_req_vectoroblig_hard_reqs_get_sub (enum action_sub_result res)
 

Macro Definition Documentation

◆ obligatory_req_vector_iterate

#define obligatory_req_vector_iterate (   obreq_vec,
  pobreq 
)     TYPED_VECTOR_ITERATE(struct obligatory_req, obreq_vec, pobreq)

Definition at line 46 of file oblig_reqs.h.

◆ obligatory_req_vector_iterate_end

#define obligatory_req_vector_iterate_end   VECTOR_ITERATE_END

Definition at line 48 of file oblig_reqs.h.

◆ SPECVEC_TAG

#define SPECVEC_TAG   obligatory_req

Definition at line 43 of file oblig_reqs.h.

◆ SPECVEC_TYPE

#define SPECVEC_TYPE   struct obligatory_req

Definition at line 44 of file oblig_reqs.h.

Function Documentation

◆ hard_code_oblig_hard_reqs()

void hard_code_oblig_hard_reqs ( void  )

Hard code the obligatory hard requirements that don't depend on the rest of the ruleset. They are sorted by requirement to make it easy to read, modify and explain them.

Definition at line 250 of file oblig_reqs.c.

Referenced by actions_init().

◆ hard_code_oblig_hard_reqs_ruleset()

void hard_code_oblig_hard_reqs_ruleset ( void  )

Hard code the obligatory hard requirements that needs access to the ruleset before they can be generated.

Definition at line 770 of file oblig_reqs.c.

Referenced by actions_rs_pre_san_gen().

◆ oblig_hard_reqs_free()

void oblig_hard_reqs_free ( void  )

Free resources reserved for hard reqs system.

Definition at line 827 of file oblig_reqs.c.

Referenced by actions_free().

◆ oblig_hard_reqs_get()

struct obligatory_req_vector * oblig_hard_reqs_get ( enum action_result  res)

Get obligatory requirements for action result.

Parameters
resAction result to get requirements for
Returns
Vector of obligatory requirements

Definition at line 852 of file oblig_reqs.c.

Referenced by action_enabler_suggest_repair_oblig().

◆ oblig_hard_reqs_get_sub()

struct obligatory_req_vector * oblig_hard_reqs_get_sub ( enum action_sub_result  res)

Get obligatory requirements for action with sub result.

Parameters
resAction sub result to get requirements for
Returns
Vector of obligatory requirements

Definition at line 863 of file oblig_reqs.c.

Referenced by action_enabler_suggest_repair_oblig().

◆ oblig_hard_reqs_init()

void oblig_hard_reqs_init ( void  )

Initialize hard reqs system.

Definition at line 807 of file oblig_reqs.c.

Referenced by actions_init().