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

#include <FlightDeck.h>

Inheritance diagram for FlightDeck:
System SimObserver

List of all members.

Public Types

enum  FLIGHT_DECK_MODE { FLIGHT_DECK_LAUNCH, FLIGHT_DECK_RECOVERY }
enum  FLIGHT_SLOT_STATE {
  CLEAR, READY, QUEUED, LOCKED,
  LAUNCH, DOCKING
}
enum  CONSTANTS { NUM_APPROACH_PTS = 8 }
- Public Types inherited from System
enum  CATEGORY {
  MISC_SYSTEM = 0, DRIVE = 1, WEAPON, SHIELD,
  SENSOR, COMPUTER, POWER_SOURCE, FLIGHT_DECK,
  FARCASTER
}
enum  STATUS {
  DESTROYED, CRITICAL, DEGRADED, NOMINAL,
  MAINT
}
enum  POWER_FLAGS { POWER_WATTS = 1, POWER_CRITICAL = 2 }

Public Member Functions

 FlightDeck ()
 FlightDeck (const FlightDeck &rhs)
virtual ~FlightDeck ()
virtual void ExecFrame (double seconds)
void SetCarrier (Ship *s)
void SetIndex (int n)
virtual int SpaceLeft (int type) const
virtual bool Spot (Ship *s, int &index)
virtual bool Clear (int index)
virtual bool Launch (int index)
virtual bool LaunchShip (Ship *s)
virtual bool Recover (Ship *s)
virtual bool Dock (Ship *s)
virtual int Inbound (InboundSlot *&s)
virtual void GrantClearance ()
virtual void AddSlot (const Point &loc, DWORD filter=0xf)
virtual bool IsLaunchDeck () const
virtual void SetLaunchDeck ()
virtual bool IsRecoveryDeck () const
virtual void SetRecoveryDeck ()
Point BoundingBox () const
Point ApproachPoint (int i) const
Point RunwayPoint (int i) const
Point StartPoint () const
Point EndPoint () const
Point CamLoc () const
double Azimuth () const
virtual void SetBoundingBox (Point dimensions)
virtual void SetApproachPoint (int i, Point loc)
virtual void SetRunwayPoint (int i, Point loc)
virtual void SetStartPoint (Point loc)
virtual void SetEndPoint (Point loc)
virtual void SetCamLoc (Point loc)
virtual void SetCycleTime (double time)
virtual void SetAzimuth (double az)
virtual void SetLight (double l)
virtual void Orient (const Physical *rep)
virtual bool Update (SimObject *obj)
virtual const char * GetObserverName () const
int NumSlots () const
double TimeRemaining (int index) const
int State (int index) const
int Sequence (int index) const
const ShipGetCarrier () const
int GetIndex () const
ShipGetShip (int index) const
int NumHoops () const
HoopGetHoops () const
LightGetLight ()
List< InboundSlot > & GetRecoveryQueue ()
void PrintQueue ()
bool OverThreshold (Ship *s) const
bool ContainsPoint (const Point &p) const
- Public Member Functions inherited from System
 System (CATEGORY t, int s, const char *n, int maxv, double energy=0, double capacity=100, double sink_rate=1)
 System (const System &s)
virtual ~System ()
int operator== (const System &s) const
CATEGORY Type () const
int Subtype () const
const char * Name () const
const char * Abbreviation () const
void SetName (const char *n)
void SetAbbreviation (const char *a)
void SetDesign (SystemDesign *d)
virtual int Value () const
int MaxValue () const
STATUS Status () const
double Availability () const
double Safety () const
double Stability () const
virtual void CalcStatus ()
virtual void Repair ()
double NetAvail () const
void SetNetAvail (double d)
List< Component > & GetComponents ()
virtual void ApplyDamage (double damage)
virtual void ExecMaintFrame (double seconds)
virtual void DoEMCON (int emcon)
virtual void Mount (Point loc, float radius, float hull_factor=0.5f)
virtual void Mount (const System &system)
Point MountLocation () const
double Radius () const
double HullProtection () const
bool IsPowerCritical () const
bool UsesWatts () const
virtual double GetRequest (double seconds) const
virtual void Distribute (double delivered_energy, double seconds)
int GetSourceIndex () const
void SetSourceIndex (int i)
virtual int Charge () const
bool IsPowerOn () const
virtual void PowerOn ()
virtual void PowerOff ()
virtual double GetPowerLevel () const
virtual void SetPowerLevel (double level)
virtual void SetOverride (bool over)
virtual void DrainPower (double to_level)
void SetCapacity (double c)
double GetCapacity () const
double GetEnergy () const
double GetSinkRate () const
void SetEMCONPower (int emcon, int power_level)
int GetEMCONPower (int emcon)
int GetExplosionType () const
void SetExplosionType (int t)
ShipGetShip () const
void SetShip (Ship *s)
int GetID () const
void SetID (int n)
- Public Member Functions inherited from SimObserver
virtual ~SimObserver ()
int operator== (const SimObserver &o) const
virtual void Observe (SimObject *obj)
virtual void Ignore (SimObject *obj)

Static Public Member Functions

static const char * TYPENAME ()
static void Initialize ()
static void Close ()

Protected Attributes

Shipcarrier
int index
int num_slots
FlightDeckSlotslots
Point box
Point start_rel
Point end_rel
Point cam_rel
Point approach_rel [NUM_APPROACH_PTS]
Point runway_rel [2]
Point start_point
Point end_point
Point cam_loc
Point approach_point [NUM_APPROACH_PTS]
Point runway_point [2]
double azimuth
double cycle_time
int num_approach_pts
int num_catsounds
int num_hoops
Hoophoops
Lightlight
List< InboundSlotrecovery_queue
- Protected Attributes inherited from System
CATEGORY type
Shipship
int id
int subtype
int max_value
Text name
Text abrv
STATUS status
float crit_level
float availability
float safety
float stability
float safety_overload
float net_avail
Point mount_loc
Point mount_rel
float radius
float hull_factor
float energy
float capacity
float sink_rate
float power_level
int source_index
DWORD power_flags
bool power_on
BYTE emcon_power [3]
BYTE emcon
int explosion_type
SystemDesigndesign
List< Componentcomponents
- Protected Attributes inherited from SimObserver
List< SimObjectobserve_list

Detailed Description

Definition at line 82 of file FlightDeck.h.


Member Enumeration Documentation

Enumerator:
NUM_APPROACH_PTS 

Definition at line 93 of file FlightDeck.h.

Enumerator:
FLIGHT_DECK_LAUNCH 
FLIGHT_DECK_RECOVERY 

Definition at line 91 of file FlightDeck.h.

Enumerator:
CLEAR 
READY 
QUEUED 
LOCKED 
LAUNCH 
DOCKING 

Definition at line 92 of file FlightDeck.h.


Constructor & Destructor Documentation

FlightDeck::FlightDeck ( )

Definition at line 187 of file FlightDeck.cpp.

FlightDeck::FlightDeck ( const FlightDeck rhs)

Definition at line 198 of file FlightDeck.cpp.

FlightDeck::~FlightDeck ( )
virtual

Definition at line 228 of file FlightDeck.cpp.


Member Function Documentation

void FlightDeck::AddSlot ( const Point loc,
DWORD  filter = 0xf 
)
virtual

Definition at line 656 of file FlightDeck.cpp.

Point FlightDeck::ApproachPoint ( int  i) const
inline

Definition at line 121 of file FlightDeck.h.

double FlightDeck::Azimuth ( ) const
inline

Definition at line 126 of file FlightDeck.h.

Point FlightDeck::BoundingBox ( ) const
inline

Definition at line 120 of file FlightDeck.h.

Point FlightDeck::CamLoc ( ) const
inline

Definition at line 125 of file FlightDeck.h.

bool FlightDeck::Clear ( int  index)
virtual

Definition at line 791 of file FlightDeck.cpp.

void FlightDeck::Close ( )
static

Definition at line 277 of file FlightDeck.cpp.

bool FlightDeck::ContainsPoint ( const Point p) const

Definition at line 1183 of file FlightDeck.cpp.

bool FlightDeck::Dock ( Ship s)
virtual

Definition at line 899 of file FlightDeck.cpp.

Point FlightDeck::EndPoint ( ) const
inline

Definition at line 124 of file FlightDeck.h.

void FlightDeck::ExecFrame ( double  seconds)
virtual

Reimplemented from System.

Definition at line 289 of file FlightDeck.cpp.

const Ship* FlightDeck::GetCarrier ( ) const
inline

Definition at line 149 of file FlightDeck.h.

Hoop* FlightDeck::GetHoops ( ) const
inline

Definition at line 153 of file FlightDeck.h.

int FlightDeck::GetIndex ( ) const
inline

Definition at line 150 of file FlightDeck.h.

Light* FlightDeck::GetLight ( )
inline

Definition at line 154 of file FlightDeck.h.

const char * FlightDeck::GetObserverName ( ) const
virtual

Reimplemented from SimObserver.

Definition at line 1139 of file FlightDeck.cpp.

List<InboundSlot>& FlightDeck::GetRecoveryQueue ( )
inline

Definition at line 156 of file FlightDeck.h.

Ship * FlightDeck::GetShip ( int  index) const

Definition at line 1069 of file FlightDeck.cpp.

void FlightDeck::GrantClearance ( )
virtual

Definition at line 1014 of file FlightDeck.cpp.

int FlightDeck::Inbound ( InboundSlot *&  s)
virtual

Definition at line 965 of file FlightDeck.cpp.

void FlightDeck::Initialize ( )
static

Definition at line 250 of file FlightDeck.cpp.

virtual bool FlightDeck::IsLaunchDeck ( ) const
inlinevirtual

Definition at line 115 of file FlightDeck.h.

virtual bool FlightDeck::IsRecoveryDeck ( ) const
inlinevirtual

Definition at line 117 of file FlightDeck.h.

bool FlightDeck::Launch ( int  index)
virtual

Definition at line 817 of file FlightDeck.cpp.

bool FlightDeck::LaunchShip ( Ship s)
virtual

Definition at line 522 of file FlightDeck.cpp.

int FlightDeck::NumHoops ( ) const
inline

Definition at line 152 of file FlightDeck.h.

int FlightDeck::NumSlots ( ) const
inline

Definition at line 145 of file FlightDeck.h.

void FlightDeck::Orient ( const Physical rep)
virtual

Reimplemented from System.

Definition at line 677 of file FlightDeck.cpp.

bool FlightDeck::OverThreshold ( Ship s) const

Definition at line 1147 of file FlightDeck.cpp.

void FlightDeck::PrintQueue ( )

Definition at line 1040 of file FlightDeck.cpp.

bool FlightDeck::Recover ( Ship s)
virtual

Definition at line 861 of file FlightDeck.cpp.

Point FlightDeck::RunwayPoint ( int  i) const
inline

Definition at line 122 of file FlightDeck.h.

int FlightDeck::Sequence ( int  index) const

Definition at line 1097 of file FlightDeck.cpp.

void FlightDeck::SetApproachPoint ( int  i,
Point  loc 
)
virtual

Definition at line 618 of file FlightDeck.cpp.

virtual void FlightDeck::SetAzimuth ( double  az)
inlinevirtual

Definition at line 135 of file FlightDeck.h.

virtual void FlightDeck::SetBoundingBox ( Point  dimensions)
inlinevirtual

Definition at line 128 of file FlightDeck.h.

void FlightDeck::SetCamLoc ( Point  loc)
virtual

Definition at line 648 of file FlightDeck.cpp.

void FlightDeck::SetCarrier ( Ship s)
inline

Definition at line 99 of file FlightDeck.h.

void FlightDeck::SetCycleTime ( double  time)
virtual

Definition at line 669 of file FlightDeck.cpp.

void FlightDeck::SetEndPoint ( Point  loc)
virtual

Definition at line 642 of file FlightDeck.cpp.

void FlightDeck::SetIndex ( int  n)
inline

Definition at line 100 of file FlightDeck.h.

virtual void FlightDeck::SetLaunchDeck ( )
inlinevirtual

Definition at line 116 of file FlightDeck.h.

void FlightDeck::SetLight ( double  l)
virtual

Definition at line 611 of file FlightDeck.cpp.

virtual void FlightDeck::SetRecoveryDeck ( )
inlinevirtual

Definition at line 118 of file FlightDeck.h.

void FlightDeck::SetRunwayPoint ( int  i,
Point  loc 
)
virtual

Definition at line 629 of file FlightDeck.cpp.

void FlightDeck::SetStartPoint ( Point  loc)
virtual

Definition at line 636 of file FlightDeck.cpp.

int FlightDeck::SpaceLeft ( int  type) const
virtual

Definition at line 723 of file FlightDeck.cpp.

bool FlightDeck::Spot ( Ship s,
int &  index 
)
virtual

Definition at line 737 of file FlightDeck.cpp.

Point FlightDeck::StartPoint ( ) const
inline

Definition at line 123 of file FlightDeck.h.

int FlightDeck::State ( int  index) const

Definition at line 1088 of file FlightDeck.cpp.

double FlightDeck::TimeRemaining ( int  index) const

Definition at line 1078 of file FlightDeck.cpp.

static const char* FlightDeck::TYPENAME ( )
inlinestatic

Reimplemented from SimObserver.

Definition at line 85 of file FlightDeck.h.

bool FlightDeck::Update ( SimObject obj)
virtual

Reimplemented from SimObserver.

Definition at line 1108 of file FlightDeck.cpp.


Member Data Documentation

Point FlightDeck::approach_point[NUM_APPROACH_PTS]
protected

Definition at line 178 of file FlightDeck.h.

Point FlightDeck::approach_rel[NUM_APPROACH_PTS]
protected

Definition at line 172 of file FlightDeck.h.

double FlightDeck::azimuth
protected

Definition at line 181 of file FlightDeck.h.

Point FlightDeck::box
protected

Definition at line 168 of file FlightDeck.h.

Point FlightDeck::cam_loc
protected

Definition at line 177 of file FlightDeck.h.

Point FlightDeck::cam_rel
protected

Definition at line 171 of file FlightDeck.h.

Ship* FlightDeck::carrier
protected

Definition at line 163 of file FlightDeck.h.

double FlightDeck::cycle_time
protected

Definition at line 182 of file FlightDeck.h.

Point FlightDeck::end_point
protected

Definition at line 176 of file FlightDeck.h.

Point FlightDeck::end_rel
protected

Definition at line 170 of file FlightDeck.h.

Hoop* FlightDeck::hoops
protected

Definition at line 187 of file FlightDeck.h.

int FlightDeck::index
protected

Definition at line 164 of file FlightDeck.h.

Light* FlightDeck::light
protected

Definition at line 188 of file FlightDeck.h.

int FlightDeck::num_approach_pts
protected

Definition at line 184 of file FlightDeck.h.

int FlightDeck::num_catsounds
protected

Definition at line 185 of file FlightDeck.h.

int FlightDeck::num_hoops
protected

Definition at line 186 of file FlightDeck.h.

int FlightDeck::num_slots
protected

Definition at line 165 of file FlightDeck.h.

List<InboundSlot> FlightDeck::recovery_queue
protected

Definition at line 189 of file FlightDeck.h.

Point FlightDeck::runway_point[2]
protected

Definition at line 179 of file FlightDeck.h.

Point FlightDeck::runway_rel[2]
protected

Definition at line 173 of file FlightDeck.h.

FlightDeckSlot* FlightDeck::slots
protected

Definition at line 166 of file FlightDeck.h.

Point FlightDeck::start_point
protected

Definition at line 175 of file FlightDeck.h.

Point FlightDeck::start_rel
protected

Definition at line 169 of file FlightDeck.h.


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