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

#include <FlightComp.h>

Inheritance diagram for FlightComp:
Computer System

List of all members.

Public Types

enum  CompType { AVIONICS = 1, FLIGHT, TACTICAL }
- Public Types inherited from Computer
- 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

 FlightComp (int comp_type, const char *comp_name)
 FlightComp (const Computer &rhs)
virtual ~FlightComp ()
virtual void ExecSubFrame ()
int Mode () const
double Throttle () const
void SetMode (int m)
void SetVelocityLimit (double v)
void SetTransLimit (double x, double y, double z)
void FullStop ()
- Public Member Functions inherited from Computer
 Computer (int comp_type, const char *comp_name)
 Computer (const Computer &rhs)
virtual ~Computer ()
virtual void ApplyDamage (double damage)
virtual void ExecFrame (double seconds)
virtual void Distribute (double delivered_energy, double seconds)
- 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 ExecMaintFrame (double seconds)
virtual void DoEMCON (int emcon)
virtual void Orient (const Physical *rep)
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
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)

Protected Member Functions

virtual void ExecTrans ()
virtual void ExecThrottle ()

Protected Attributes

int mode
int halt
float throttle
float vlimit
float trans_x_limit
float trans_y_limit
float trans_z_limit

Detailed Description

Definition at line 28 of file FlightComp.h.


Member Enumeration Documentation

Enumerator:
AVIONICS 
FLIGHT 
TACTICAL 

Reimplemented from Computer.

Definition at line 31 of file FlightComp.h.


Constructor & Destructor Documentation

FlightComp::FlightComp ( int  comp_type,
const char *  comp_name 
)

Definition at line 23 of file FlightComp.cpp.

FlightComp::FlightComp ( const Computer rhs)

Definition at line 31 of file FlightComp.cpp.

FlightComp::~FlightComp ( )
virtual

Definition at line 39 of file FlightComp.cpp.


Member Function Documentation

void FlightComp::ExecSubFrame ( )
virtual

Definition at line 59 of file FlightComp.cpp.

void FlightComp::ExecThrottle ( )
protectedvirtual

Definition at line 70 of file FlightComp.cpp.

void FlightComp::ExecTrans ( )
protectedvirtual

Definition at line 81 of file FlightComp.cpp.

void FlightComp::FullStop ( )
inline

Definition at line 46 of file FlightComp.h.

int FlightComp::Mode ( ) const
inline

Definition at line 39 of file FlightComp.h.

void FlightComp::SetMode ( int  m)
inline

Definition at line 42 of file FlightComp.h.

void FlightComp::SetTransLimit ( double  x,
double  y,
double  z 
)

Definition at line 45 of file FlightComp.cpp.

void FlightComp::SetVelocityLimit ( double  v)
inline

Definition at line 43 of file FlightComp.h.

double FlightComp::Throttle ( ) const
inline

Definition at line 40 of file FlightComp.h.


Member Data Documentation

int FlightComp::halt
protected

Definition at line 53 of file FlightComp.h.

int FlightComp::mode
protected

Definition at line 52 of file FlightComp.h.

float FlightComp::throttle
protected

Definition at line 54 of file FlightComp.h.

float FlightComp::trans_x_limit
protected

Definition at line 57 of file FlightComp.h.

float FlightComp::trans_y_limit
protected

Definition at line 58 of file FlightComp.h.

float FlightComp::trans_z_limit
protected

Definition at line 59 of file FlightComp.h.

float FlightComp::vlimit
protected

Definition at line 56 of file FlightComp.h.


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