Starshatter_Open
Open source Starshatter engine
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
CombatGroup Class Reference

#include <CombatGroup.h>

List of all members.

Public Types

enum  GROUP_TYPE {
  FORCE = 1, WING, INTERCEPT_SQUADRON, FIGHTER_SQUADRON,
  ATTACK_SQUADRON, LCA_SQUADRON, FLEET, DESTROYER_SQUADRON,
  BATTLE_GROUP, CARRIER_GROUP, BATTALION, MINEFIELD,
  BATTERY, MISSILE, STATION, STARBASE,
  C3I, COMM_RELAY, EARLY_WARNING, FWD_CONTROL_CTR,
  ECM, SUPPORT, COURIER, MEDICAL,
  SUPPLY, REPAIR, CIVILIAN, WAR_PRODUCTION,
  FACTORY, REFINERY, RESOURCE, INFRASTRUCTURE,
  TRANSPORT, NETWORK, HABITAT, STORAGE,
  NON_COM, FREIGHT, PASSENGER, PRIVATE
}

Public Member Functions

 CombatGroup (int t, int n, const char *s, int i, int e, CombatGroup *p=0)
 ~CombatGroup ()
int operator< (const CombatGroup &g) const
int operator<= (const CombatGroup &g) const
int operator== (const CombatGroup &g) const
void AddComponent (CombatGroup *g)
CombatGroupFindGroup (int t, int n=-1)
CombatGroupClone (bool deep=true)
const char * GetDescription () const
const char * GetShortDescription () const
void SetCombatant (Combatant *c)
CombatantGetCombatant ()
CombatGroupGetParent ()
List< CombatGroup > & GetComponents ()
List< CombatGroup > & GetLiveComponents ()
List< CombatUnit > & GetUnits ()
CombatUnitGetRandomUnit ()
CombatUnitGetFirstUnit ()
CombatUnitGetNextUnit ()
CombatUnitFindUnit (const char *name)
CombatGroupFindCarrier ()
const TextName () const
int Type () const
int CountUnits () const
int IntelLevel () const
int GetID () const
int GetIFF () const
Point Location () const
void MoveTo (const Point &loc)
const TextGetRegion () const
void SetRegion (Text rgn)
void AssignRegion (Text rgn)
int Value () const
int Sorties () const
void SetSorties (int n)
int Kills () const
void SetKills (int n)
int Points () const
void SetPoints (int n)
int UnitIndex () const
double GetNextJumpTime () const
double GetPlanValue () const
void SetPlanValue (double v)
bool IsAssignable () const
bool IsTargetable () const
bool IsDefensible () const
bool IsStrikeTarget () const
bool IsMovable () const
bool IsFighterGroup () const
bool IsStarshipGroup () const
bool IsReserve () const
bool IsExpanded () const
void SetExpanded (bool e)
const TextGetAssignedSystem () const
void SetAssignedSystem (const char *s)
CombatZoneGetCurrentZone () const
void SetCurrentZone (CombatZone *z)
CombatZoneGetAssignedZone () const
void SetAssignedZone (CombatZone *z)
void ClearUnlockedZones ()
bool IsZoneLocked () const
void SetZoneLock (bool lock=true)
bool IsSystemLocked () const
const TextGetStrategicDirection () const
void SetStrategicDirection (Text dir)
void SetIntelLevel (int n)
int CalcValue ()
List< CombatAssignment > & GetAssignments ()
void ClearAssignments ()

Static Public Member Functions

static const char * TYPENAME ()
static CombatGroupLoadOrderOfBattle (const char *fname, int iff, Combatant *combatant)
static void SaveOrderOfBattle (const char *fname, CombatGroup *force)
static void MergeOrderOfBattle (BYTE *block, const char *fname, int iff, Combatant *combatant, Campaign *campaign)
static const int * PreferredAttacker (int type)
static const int * PreferredDefender (int type)
static int TypeFromName (const char *name)
static const char * NameFromType (int type)

Detailed Description

Definition at line 34 of file CombatGroup.h.


Member Enumeration Documentation

Enumerator:
FORCE 
WING 
INTERCEPT_SQUADRON 
FIGHTER_SQUADRON 
ATTACK_SQUADRON 
LCA_SQUADRON 
FLEET 
DESTROYER_SQUADRON 
BATTLE_GROUP 
CARRIER_GROUP 
BATTALION 
MINEFIELD 
BATTERY 
MISSILE 
STATION 
STARBASE 
C3I 
COMM_RELAY 
EARLY_WARNING 
FWD_CONTROL_CTR 
ECM 
SUPPORT 
COURIER 
MEDICAL 
SUPPLY 
REPAIR 
CIVILIAN 
WAR_PRODUCTION 
FACTORY 
REFINERY 
RESOURCE 
INFRASTRUCTURE 
TRANSPORT 
NETWORK 
HABITAT 
STORAGE 
NON_COM 
FREIGHT 
PASSENGER 
PRIVATE 

Definition at line 39 of file CombatGroup.h.


Constructor & Destructor Documentation

CombatGroup::CombatGroup ( int  t,
int  n,
const char *  s,
int  i,
int  e,
CombatGroup p = 0 
)

Definition at line 31 of file CombatGroup.cpp.

CombatGroup::~CombatGroup ( )

Definition at line 41 of file CombatGroup.cpp.


Member Function Documentation

void CombatGroup::AddComponent ( CombatGroup g)

Definition at line 51 of file CombatGroup.cpp.

void CombatGroup::AssignRegion ( Text  rgn)

Definition at line 874 of file CombatGroup.cpp.

int CombatGroup::CalcValue ( )

Definition at line 706 of file CombatGroup.cpp.

void CombatGroup::ClearAssignments ( )

Definition at line 754 of file CombatGroup.cpp.

void CombatGroup::ClearUnlockedZones ( )

Definition at line 648 of file CombatGroup.cpp.

CombatGroup * CombatGroup::Clone ( bool  deep = true)

Definition at line 386 of file CombatGroup.cpp.

int CombatGroup::CountUnits ( ) const

Definition at line 723 of file CombatGroup.cpp.

CombatGroup * CombatGroup::FindCarrier ( )

Definition at line 766 of file CombatGroup.cpp.

CombatGroup * CombatGroup::FindGroup ( int  t,
int  n = -1 
)

Definition at line 368 of file CombatGroup.cpp.

CombatUnit * CombatGroup::FindUnit ( const char *  name)

Definition at line 855 of file CombatGroup.cpp.

const Text& CombatGroup::GetAssignedSystem ( ) const
inline

Definition at line 170 of file CombatGroup.h.

CombatZone* CombatGroup::GetAssignedZone ( ) const
inline

Definition at line 174 of file CombatGroup.h.

List<CombatAssignment>& CombatGroup::GetAssignments ( )
inline

Definition at line 187 of file CombatGroup.h.

Combatant* CombatGroup::GetCombatant ( )
inline

Definition at line 116 of file CombatGroup.h.

List<CombatGroup>& CombatGroup::GetComponents ( )
inline

Definition at line 118 of file CombatGroup.h.

CombatZone* CombatGroup::GetCurrentZone ( ) const
inline

Definition at line 172 of file CombatGroup.h.

const char * CombatGroup::GetDescription ( ) const

Definition at line 471 of file CombatGroup.cpp.

CombatUnit * CombatGroup::GetFirstUnit ( )

Definition at line 820 of file CombatGroup.cpp.

int CombatGroup::GetID ( ) const
inline

Definition at line 131 of file CombatGroup.h.

int CombatGroup::GetIFF ( ) const
inline

Definition at line 132 of file CombatGroup.h.

List<CombatGroup>& CombatGroup::GetLiveComponents ( )
inline

Definition at line 119 of file CombatGroup.h.

double CombatGroup::GetNextJumpTime ( ) const

Definition at line 596 of file CombatGroup.cpp.

CombatUnit * CombatGroup::GetNextUnit ( )

Definition at line 831 of file CombatGroup.cpp.

CombatGroup* CombatGroup::GetParent ( )
inline

Definition at line 117 of file CombatGroup.h.

double CombatGroup::GetPlanValue ( ) const
inline

Definition at line 149 of file CombatGroup.h.

CombatUnit * CombatGroup::GetRandomUnit ( )

Definition at line 783 of file CombatGroup.cpp.

const Text& CombatGroup::GetRegion ( ) const
inline

Definition at line 135 of file CombatGroup.h.

const char * CombatGroup::GetShortDescription ( ) const

Definition at line 536 of file CombatGroup.cpp.

const Text& CombatGroup::GetStrategicDirection ( ) const
inline

Definition at line 181 of file CombatGroup.h.

List<CombatUnit>& CombatGroup::GetUnits ( )
inline

Definition at line 120 of file CombatGroup.h.

int CombatGroup::IntelLevel ( ) const
inline

Definition at line 130 of file CombatGroup.h.

bool CombatGroup::IsAssignable ( ) const

Definition at line 62 of file CombatGroup.cpp.

bool CombatGroup::IsDefensible ( ) const

Definition at line 101 of file CombatGroup.cpp.

bool CombatGroup::IsExpanded ( ) const
inline

Definition at line 167 of file CombatGroup.h.

bool CombatGroup::IsFighterGroup ( ) const

Definition at line 152 of file CombatGroup.cpp.

bool CombatGroup::IsMovable ( ) const

Definition at line 126 of file CombatGroup.cpp.

bool CombatGroup::IsReserve ( ) const

Definition at line 181 of file CombatGroup.cpp.

bool CombatGroup::IsStarshipGroup ( ) const

Definition at line 166 of file CombatGroup.cpp.

bool CombatGroup::IsStrikeTarget ( ) const

Definition at line 110 of file CombatGroup.cpp.

bool CombatGroup::IsSystemLocked ( ) const
inline

Definition at line 179 of file CombatGroup.h.

bool CombatGroup::IsTargetable ( ) const

Definition at line 79 of file CombatGroup.cpp.

bool CombatGroup::IsZoneLocked ( ) const
inline

Definition at line 177 of file CombatGroup.h.

int CombatGroup::Kills ( ) const
inline

Definition at line 141 of file CombatGroup.h.

CombatGroup * CombatGroup::LoadOrderOfBattle ( const char *  fname,
int  iff,
Combatant combatant 
)
static

Definition at line 966 of file CombatGroup.cpp.

Point CombatGroup::Location ( ) const
inline

Definition at line 133 of file CombatGroup.h.

void CombatGroup::MergeOrderOfBattle ( BYTE *  block,
const char *  fname,
int  iff,
Combatant combatant,
Campaign campaign 
)
static

Definition at line 1213 of file CombatGroup.cpp.

void CombatGroup::MoveTo ( const Point loc)

Definition at line 611 of file CombatGroup.cpp.

const Text& CombatGroup::Name ( ) const
inline

Definition at line 127 of file CombatGroup.h.

const char * CombatGroup::NameFromType ( int  type)
static

Definition at line 946 of file CombatGroup.cpp.

int CombatGroup::operator< ( const CombatGroup g) const
inline

Definition at line 97 of file CombatGroup.h.

int CombatGroup::operator<= ( const CombatGroup g) const
inline

Definition at line 98 of file CombatGroup.h.

int CombatGroup::operator== ( const CombatGroup g) const
inline

Definition at line 99 of file CombatGroup.h.

int CombatGroup::Points ( ) const
inline

Definition at line 143 of file CombatGroup.h.

const int * CombatGroup::PreferredAttacker ( int  type)
static

Definition at line 195 of file CombatGroup.cpp.

const int * CombatGroup::PreferredDefender ( int  type)
static

Definition at line 290 of file CombatGroup.cpp.

void CombatGroup::SaveOrderOfBattle ( const char *  fname,
CombatGroup force 
)
static

Definition at line 1581 of file CombatGroup.cpp.

void CombatGroup::SetAssignedSystem ( const char *  s)

Definition at line 619 of file CombatGroup.cpp.

void CombatGroup::SetAssignedZone ( CombatZone z)

Definition at line 633 of file CombatGroup.cpp.

void CombatGroup::SetCombatant ( Combatant c)
inline

Definition at line 114 of file CombatGroup.h.

void CombatGroup::SetCurrentZone ( CombatZone z)
inline

Definition at line 173 of file CombatGroup.h.

void CombatGroup::SetExpanded ( bool  e)
inline

Definition at line 168 of file CombatGroup.h.

void CombatGroup::SetIntelLevel ( int  n)

Definition at line 681 of file CombatGroup.cpp.

void CombatGroup::SetKills ( int  n)
inline

Definition at line 142 of file CombatGroup.h.

void CombatGroup::SetPlanValue ( double  v)
inline

Definition at line 150 of file CombatGroup.h.

void CombatGroup::SetPoints ( int  n)
inline

Definition at line 144 of file CombatGroup.h.

void CombatGroup::SetRegion ( Text  rgn)
inline

Definition at line 136 of file CombatGroup.h.

void CombatGroup::SetSorties ( int  n)
inline

Definition at line 140 of file CombatGroup.h.

void CombatGroup::SetStrategicDirection ( Text  dir)
inline

Definition at line 182 of file CombatGroup.h.

void CombatGroup::SetZoneLock ( bool  lock = true)

Definition at line 661 of file CombatGroup.cpp.

int CombatGroup::Sorties ( ) const
inline

Definition at line 139 of file CombatGroup.h.

int CombatGroup::Type ( ) const
inline

Definition at line 128 of file CombatGroup.h.

int CombatGroup::TypeFromName ( const char *  name)
static

Definition at line 936 of file CombatGroup.cpp.

static const char* CombatGroup::TYPENAME ( )
inlinestatic

Definition at line 37 of file CombatGroup.h.

int CombatGroup::UnitIndex ( ) const
inline

Definition at line 145 of file CombatGroup.h.

int CombatGroup::Value ( ) const
inline

Definition at line 138 of file CombatGroup.h.


The documentation for this class was generated from the following files: