Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

history.h File Reference

Definitions for the historical record. More...

#include "history.def"

Include dependency graph for history.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

struct  a_hevt_defn
 Historical Event description. More...

struct  a_histevent
 Historical Event. More...

struct  a_pastunit
 Unit History. More...


Defines

#define DEF_HEVT(name, CODE, datadescs)   CODE,

Typedefs

typedef a_hevt_defn HevtDefn
 Historical Event description.

typedef a_histevent HistEvent
 Historical Event.

typedef a_pastunit PastUnit
 Unit History.


Enumerations

enum  HistEventType { NUMHEVTTYPES }
 History Event type. More...

enum  gain_reasons {
  initial_gain = 0, build_gain = 1, capture_gain = 2, other_gain = 3,
  num_gain_reasons = 4
}
 Reasons for gain. More...

enum  loss_reasons {
  combat_loss = 0, capture_loss = 1, starvation_loss = 2, accident_loss = 3,
  attrition_loss = 4, disband_loss = 5, other_loss = 6, num_loss_reasons = 7
}
 Reasons for loss. More...

enum  damage_reasons { combat_dmg, accident_dmg, attrition_dmg, starvation_dmg }
 Damage resons. More...


Functions

void init_history (void)
void start_history (void)
HistEventcreate_historical_event (HistEventType type)
HistEventrecord_event (HistEventType type, SideMask observers,...)
void record_unit_death (Unit *unit, HistEventType reason)
void record_unit_name_change (Unit *unit, char *newname)
void record_unit_side_change (Unit *unit, Side *newside, HistEventType reason, Unit *agent)
void count_gain (Side *side, int u, enum gain_reasons reason)
void count_loss (Side *side, int u, enum loss_reasons reason)
void end_history (void)
HistEventget_nth_history_line (Side *side, int n, HistEvent **nextevt)
PastUnitcreate_past_unit (int type, int id)
PastUnitfind_past_unit (int n)
char * past_unit_desig (PastUnit *pastunit)
PastUnitchange_unit_to_past_unit (Unit *unit)
void dump_statistics (void)
int update_total_hist_lines (Side *side)
int build_hist_contents (Side *side, int n, HistEvent **histcontents, int numvis)
int total_gain (Side *side, int u)
int total_loss (Side *side, int u)

Variables

HevtDefn hevtdefns []
 Historical Event Definition array.

HistEventhistory
PastUnitpast_unit_list
 Past Unit History list.


Detailed Description

Definitions for the historical record.


Define Documentation

#define DEF_HEVT name,
CODE,
datadescs   )     CODE,
 


Typedef Documentation

typedef struct a_hevt_defn HevtDefn
 

Historical Event description.

This is the form of the description of a event type. It contains the name of the event, and the description of the event.

typedef struct a_histevent HistEvent
 

Historical Event.

This ddefines an historical event.

typedef struct a_pastunit PastUnit
 

Unit History.

This is a snapshot of key bits of state of a at a particular moment.


Enumeration Type Documentation

enum damage_reasons
 

Damage resons.

Enumeration values:
combat_dmg  combat
accident_dmg  accident
attrition_dmg  attrition
starvation_dmg  starvation

enum gain_reasons
 

Reasons for gain.

Enumeration values:
initial_gain  Initial
build_gain  build
capture_gain 
other_gain  other
num_gain_reasons  number of gain reasons.

enum HistEventType
 

History Event type.

Enumeration values:
NUMHEVTTYPES 

enum loss_reasons
 

Reasons for loss.

Enumeration values:
combat_loss  Combat
capture_loss  Capture
starvation_loss  Starvation
accident_loss  Accident
attrition_loss  Attrition
disband_loss  Disband
other_loss  Other
num_loss_reasons  number of loss reasons.


Function Documentation

int build_hist_contents Side side,
int  n,
HistEvent **  histcontents,
int  numvis
 

PastUnit* change_unit_to_past_unit Unit unit  ) 
 

void count_gain Side side,
int  u,
enum gain_reasons  reason
 

void count_loss Side side,
int  u,
enum loss_reasons  reason
 

HistEvent* create_historical_event HistEventType  type  ) 
 

PastUnit* create_past_unit int  type,
int  id
 

void dump_statistics void   ) 
 

void end_history void   ) 
 

PastUnit* find_past_unit int  n  ) 
 

HistEvent* get_nth_history_line Side side,
int  n,
HistEvent **  nextevt
 

void init_history void   ) 
 

char* past_unit_desig PastUnit pastunit  ) 
 

HistEvent* record_event HistEventType  type,
SideMask  observers,
... 
 

void record_unit_death Unit unit,
HistEventType  reason
 

void record_unit_name_change Unit unit,
char *  newname
 

void record_unit_side_change Unit unit,
Side newside,
HistEventType  reason,
Unit agent
 

void start_history void   ) 
 

int total_gain Side side,
int  u
 

int total_loss Side side,
int  u
 

int update_total_hist_lines Side side  ) 
 


Variable Documentation

HevtDefn hevtdefns[]
 

Historical Event Definition array.

HistEvent* history
 

PastUnit* past_unit_list
 

Past Unit History list.


Generated on Sat Sep 17 10:29:14 2005 for XconqKernel by doxygen 1.3.6