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

#include <QuantumDrive.h>

Inheritance diagram for QuantumDrive:
System

List of all members.

Public Types

enum  SUBTYPE { QUANTUM, HYPER }
enum  ACTIVE_STATES { ACTIVE_READY, ACTIVE_COUNTDOWN, ACTIVE_PREWARP, ACTIVE_POSTWARP }
- 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

 QuantumDrive (SUBTYPE s, double capacity, double sink_rate)
 QuantumDrive (const QuantumDrive &rhs)
virtual ~QuantumDrive ()
void SetDestination (SimRegion *rgn, const Point &loc)
bool Engage (bool immediate=false)
int ActiveState () const
double WarpFactor () const
double JumpTime () const
virtual void PowerOff ()
virtual void ExecFrame (double seconds)
void SetShip (Ship *s)
ShipGetShip () const
double GetCountdown () const
void SetCountdown (double d)
- 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 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
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 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)
int GetID () const
void SetID (int n)

Protected Member Functions

void Jump ()
void AbortJump ()

Protected Attributes

int active_state
Shipship
double warp_fov
double jump_time
double countdown
SimRegiondst_rgn
Point dst_loc
- Protected Attributes inherited from System
CATEGORY type
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

Additional Inherited Members

- Static Public Member Functions inherited from System
static const char * TYPENAME ()

Detailed Description

Definition at line 29 of file QuantumDrive.h.


Member Enumeration Documentation

Enumerator:
ACTIVE_READY 
ACTIVE_COUNTDOWN 
ACTIVE_PREWARP 
ACTIVE_POSTWARP 

Definition at line 38 of file QuantumDrive.h.

Enumerator:
QUANTUM 
HYPER 

Definition at line 32 of file QuantumDrive.h.


Constructor & Destructor Documentation

QuantumDrive::QuantumDrive ( SUBTYPE  s,
double  capacity,
double  sink_rate 
)

Definition at line 33 of file QuantumDrive.cpp.

QuantumDrive::QuantumDrive ( const QuantumDrive rhs)

Definition at line 47 of file QuantumDrive.cpp.

QuantumDrive::~QuantumDrive ( )
virtual

Definition at line 60 of file QuantumDrive.cpp.


Member Function Documentation

void QuantumDrive::AbortJump ( )
protected

Definition at line 125 of file QuantumDrive.cpp.

int QuantumDrive::ActiveState ( ) const
inline

Definition at line 44 of file QuantumDrive.h.

bool QuantumDrive::Engage ( bool  immediate = false)

Definition at line 75 of file QuantumDrive.cpp.

void QuantumDrive::ExecFrame ( double  seconds)
virtual

Reimplemented from System.

Definition at line 151 of file QuantumDrive.cpp.

double QuantumDrive::GetCountdown ( ) const
inline

Definition at line 54 of file QuantumDrive.h.

Ship* QuantumDrive::GetShip ( ) const
inline

Reimplemented from System.

Definition at line 52 of file QuantumDrive.h.

void QuantumDrive::Jump ( )
protected

Definition at line 218 of file QuantumDrive.cpp.

double QuantumDrive::JumpTime ( ) const
inline

Definition at line 46 of file QuantumDrive.h.

void QuantumDrive::PowerOff ( )
virtual

Reimplemented from System.

Definition at line 118 of file QuantumDrive.cpp.

void QuantumDrive::SetCountdown ( double  d)
inline

Definition at line 55 of file QuantumDrive.h.

void QuantumDrive::SetDestination ( SimRegion rgn,
const Point loc 
)

Definition at line 66 of file QuantumDrive.cpp.

void QuantumDrive::SetShip ( Ship s)
inline

Reimplemented from System.

Definition at line 51 of file QuantumDrive.h.

double QuantumDrive::WarpFactor ( ) const
inline

Definition at line 45 of file QuantumDrive.h.


Member Data Documentation

int QuantumDrive::active_state
protected

Definition at line 61 of file QuantumDrive.h.

double QuantumDrive::countdown
protected

Definition at line 66 of file QuantumDrive.h.

Point QuantumDrive::dst_loc
protected

Definition at line 69 of file QuantumDrive.h.

SimRegion* QuantumDrive::dst_rgn
protected

Definition at line 68 of file QuantumDrive.h.

double QuantumDrive::jump_time
protected

Definition at line 65 of file QuantumDrive.h.

Ship* QuantumDrive::ship
protected

Reimplemented from System.

Definition at line 63 of file QuantumDrive.h.

double QuantumDrive::warp_fov
protected

Definition at line 64 of file QuantumDrive.h.


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