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

#include <Component.h>

List of all members.

Public Types

enum  STATUS {
  DESTROYED, CRITICAL, DEGRADED, NOMINAL,
  REPLACE, REPAIR
}
enum  DAMAGE { DAMAGE_EFFICIENCY = 0x01, DAMAGE_SAFETY = 0x02, DAMAGE_STABILITY = 0x04 }

Public Member Functions

 Component (ComponentDesign *d, System *s)
 Component (const Component &c)
virtual ~Component ()
const char * Name () const
const char * Abbreviation () const
float RepairTime () const
float ReplaceTime () const
bool DamageEfficiency () const
bool DamageSafety () const
bool DamageStability () const
STATUS Status () const
float Availability () const
float TimeRemaining () const
int SpareCount () const
bool IsJerried () const
int NumJerried () const
void SetSystem (System *s)
SystemGetSystem () const
virtual void ApplyDamage (double damage)
virtual void ExecMaintFrame (double seconds)
virtual void Repair ()
virtual void Replace ()

Static Public Member Functions

static const char * TYPENAME ()

Protected Attributes

ComponentDesigndesign
STATUS status
float availability
float time_remaining
int spares
int jerried
Systemsystem

Detailed Description

Definition at line 49 of file Component.h.


Member Enumeration Documentation

Enumerator:
DAMAGE_EFFICIENCY 
DAMAGE_SAFETY 
DAMAGE_STABILITY 

Definition at line 55 of file Component.h.

Enumerator:
DESTROYED 
CRITICAL 
DEGRADED 
NOMINAL 
REPLACE 
REPAIR 

Definition at line 54 of file Component.h.


Constructor & Destructor Documentation

Component::Component ( ComponentDesign d,
System s 
)

Definition at line 33 of file Component.cpp.

Component::Component ( const Component c)

Definition at line 44 of file Component.cpp.

Component::~Component ( )
virtual

Definition at line 53 of file Component.cpp.


Member Function Documentation

const char* Component::Abbreviation ( ) const
inline

Definition at line 64 of file Component.h.

void Component::ApplyDamage ( double  damage)
virtual

Definition at line 97 of file Component.cpp.

float Component::Availability ( ) const

Definition at line 147 of file Component.cpp.

bool Component::DamageEfficiency ( ) const
inline

Definition at line 68 of file Component.h.

bool Component::DamageSafety ( ) const
inline

Definition at line 69 of file Component.h.

bool Component::DamageStability ( ) const
inline

Definition at line 70 of file Component.h.

void Component::ExecMaintFrame ( double  seconds)
virtual

Definition at line 59 of file Component.cpp.

System* Component::GetSystem ( ) const
inline

Definition at line 80 of file Component.h.

bool Component::IsJerried ( ) const

Definition at line 168 of file Component.cpp.

const char* Component::Name ( ) const
inline

Definition at line 63 of file Component.h.

int Component::NumJerried ( ) const

Definition at line 174 of file Component.cpp.

void Component::Repair ( )
virtual

Definition at line 118 of file Component.cpp.

float Component::RepairTime ( ) const
inline

Definition at line 65 of file Component.h.

void Component::Replace ( )
virtual

Definition at line 132 of file Component.cpp.

float Component::ReplaceTime ( ) const
inline

Definition at line 66 of file Component.h.

void Component::SetSystem ( System s)
inline

Definition at line 79 of file Component.h.

int Component::SpareCount ( ) const

Definition at line 162 of file Component.cpp.

STATUS Component::Status ( ) const
inline

Definition at line 72 of file Component.h.

float Component::TimeRemaining ( ) const

Definition at line 156 of file Component.cpp.

static const char* Component::TYPENAME ( )
inlinestatic

Definition at line 52 of file Component.h.


Member Data Documentation

float Component::availability
protected

Definition at line 92 of file Component.h.

ComponentDesign* Component::design
protected

Definition at line 88 of file Component.h.

int Component::jerried
protected

Definition at line 95 of file Component.h.

int Component::spares
protected

Definition at line 94 of file Component.h.

STATUS Component::status
protected

Definition at line 91 of file Component.h.

System* Component::system
protected

Definition at line 96 of file Component.h.

float Component::time_remaining
protected

Definition at line 93 of file Component.h.


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