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

#include <Farcaster.h>

Inheritance diagram for Farcaster:
System SimObserver

List of all members.

Public Types

enum  CONSTANTS { NUM_APPROACH_PTS = 4 }
- 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

 Farcaster (double capacity, double sink_rate)
 Farcaster (const Farcaster &rhs)
virtual ~Farcaster ()
virtual void ExecFrame (double seconds)
void SetShip (Ship *s)
void SetDest (Ship *d)
Point ApproachPoint (int i) const
Point StartPoint () const
Point EndPoint () const
virtual void SetApproachPoint (int i, Point loc)
virtual void SetStartPoint (Point loc)
virtual void SetEndPoint (Point loc)
virtual void SetCycleTime (double time)
virtual void Orient (const Physical *rep)
virtual bool Update (SimObject *obj)
virtual const char * GetObserverName () const
const ShipGetShip () const
const ShipGetDest () const
int ActiveState () const
double WarpFactor () 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)
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)

Protected Member Functions

virtual void Jump ()
virtual void Arrive (Ship *s)

Protected Attributes

Shipship
Shipdest
Shipjumpship
Point start_rel
Point end_rel
Point approach_rel [NUM_APPROACH_PTS]
Point start_point
Point end_point
Point approach_point [NUM_APPROACH_PTS]
double cycle_time
int active_state
double warp_fov
bool no_dest
- 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
- Protected Attributes inherited from SimObserver
List< SimObjectobserve_list

Additional Inherited Members

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

Detailed Description

Definition at line 31 of file Farcaster.h.


Member Enumeration Documentation

Enumerator:
NUM_APPROACH_PTS 

Definition at line 38 of file Farcaster.h.


Constructor & Destructor Documentation

Farcaster::Farcaster ( double  capacity,
double  sink_rate 
)

Definition at line 32 of file Farcaster.cpp.

Farcaster::Farcaster ( const Farcaster rhs)

Definition at line 43 of file Farcaster.cpp.

Farcaster::~Farcaster ( )
virtual

Definition at line 58 of file Farcaster.cpp.


Member Function Documentation

int Farcaster::ActiveState ( ) const
inline

Definition at line 63 of file Farcaster.h.

Point Farcaster::ApproachPoint ( int  i) const
inline

Definition at line 44 of file Farcaster.h.

void Farcaster::Arrive ( Ship s)
protectedvirtual

Definition at line 198 of file Farcaster.cpp.

Point Farcaster::EndPoint ( ) const
inline

Definition at line 46 of file Farcaster.h.

void Farcaster::ExecFrame ( double  seconds)
virtual

Reimplemented from System.

Definition at line 65 of file Farcaster.cpp.

const Ship* Farcaster::GetDest ( ) const
inline

Definition at line 61 of file Farcaster.h.

const char * Farcaster::GetObserverName ( ) const
virtual

Reimplemented from SimObserver.

Definition at line 285 of file Farcaster.cpp.

const Ship* Farcaster::GetShip ( ) const
inline

Reimplemented from System.

Definition at line 60 of file Farcaster.h.

void Farcaster::Jump ( )
protectedvirtual

Definition at line 177 of file Farcaster.cpp.

void Farcaster::Orient ( const Physical rep)
virtual

Reimplemented from System.

Definition at line 243 of file Farcaster.cpp.

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

Definition at line 214 of file Farcaster.cpp.

void Farcaster::SetCycleTime ( double  time)
virtual

Definition at line 235 of file Farcaster.cpp.

void Farcaster::SetDest ( Ship d)
inline

Definition at line 42 of file Farcaster.h.

void Farcaster::SetEndPoint ( Point  loc)
virtual

Definition at line 227 of file Farcaster.cpp.

void Farcaster::SetShip ( Ship s)
inline

Reimplemented from System.

Definition at line 41 of file Farcaster.h.

void Farcaster::SetStartPoint ( Point  loc)
virtual

Definition at line 221 of file Farcaster.cpp.

Point Farcaster::StartPoint ( ) const
inline

Definition at line 45 of file Farcaster.h.

bool Farcaster::Update ( SimObject obj)
virtual

Reimplemented from SimObserver.

Definition at line 260 of file Farcaster.cpp.

double Farcaster::WarpFactor ( ) const
inline

Definition at line 64 of file Farcaster.h.


Member Data Documentation

int Farcaster::active_state
protected

Definition at line 83 of file Farcaster.h.

Point Farcaster::approach_point[NUM_APPROACH_PTS]
protected

Definition at line 80 of file Farcaster.h.

Point Farcaster::approach_rel[NUM_APPROACH_PTS]
protected

Definition at line 76 of file Farcaster.h.

double Farcaster::cycle_time
protected

Definition at line 82 of file Farcaster.h.

Ship* Farcaster::dest
protected

Definition at line 71 of file Farcaster.h.

Point Farcaster::end_point
protected

Definition at line 79 of file Farcaster.h.

Point Farcaster::end_rel
protected

Definition at line 75 of file Farcaster.h.

Ship* Farcaster::jumpship
protected

Definition at line 72 of file Farcaster.h.

bool Farcaster::no_dest
protected

Definition at line 86 of file Farcaster.h.

Ship* Farcaster::ship
protected

Reimplemented from System.

Definition at line 70 of file Farcaster.h.

Point Farcaster::start_point
protected

Definition at line 78 of file Farcaster.h.

Point Farcaster::start_rel
protected

Definition at line 74 of file Farcaster.h.

double Farcaster::warp_fov
protected

Definition at line 84 of file Farcaster.h.


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