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

#include <Element.h>

Inheritance diagram for Element:
SimObserver

List of all members.

Public Member Functions

 Element (const char *call_sign, int iff, int type=0)
virtual ~Element ()
int operator== (const Element &e) const
int Identity () const
int Type () const
const TextName () const
void SetName (const char *s)
virtual int GetIFF () const
int Player () const
void SetPlayer (int p)
DWORD GetLaunchTime () const
void SetLaunchTime (DWORD t)
int IntelLevel () const
void SetIntelLevel (int i)
int NumShips () const
int AddShip (Ship *, int index=-1)
void DelShip (Ship *)
ShipGetShip (int index)
int GetShipClass ()
int FindIndex (const Ship *s)
bool Contains (const Ship *s)
bool IsActive () const
bool IsFinished () const
bool IsNetObserver () const
bool IsSquadron () const
bool IsStatic () const
bool IsHostileTo (const Ship *s) const
bool IsHostileTo (int iff_code) const
bool IsObjectiveTargetOf (const Ship *s) const
bool IsRogue () const
bool IsPlayable () const
int * Loadout ()
void SetRogue (bool r)
void SetPlayable (bool p)
void SetLoadout (int *l)
virtual void SetIFF (int iff)
virtual void ExecFrame (double seconds)
virtual bool Update (SimObject *obj)
virtual const char * GetObserverName () const
void ClearObjectives ()
void AddObjective (Instruction *obj)
InstructionGetObjective (int index)
InstructionGetTargetObjective ()
int NumObjectives () const
void ClearInstructions ()
void AddInstruction (const char *instr)
Text GetInstruction (int index)
int NumInstructions () const
double GetHoldTime ()
void SetHoldTime (double t)
bool GetZoneLock ()
void SetZoneLock (bool z)
void AddNavPoint (Instruction *pt, Instruction *afterPoint=0, bool send=true)
void DelNavPoint (Instruction *pt, bool send=true)
void ClearFlightPlan (bool send=true)
InstructionGetNextNavPoint ()
int GetNavIndex (const Instruction *n)
List< Instruction > & GetFlightPlan ()
int FlightPlanLength ()
virtual void HandleRadioMessage (RadioMessage *msg)
ElementGetCommander () const
void SetCommander (Element *e)
ElementGetAssignment () const
void SetAssignment (Element *e)
void ResumeAssignment ()
bool CanCommand (Element *e)
ShipGetCarrier () const
void SetCarrier (Ship *c)
int GetCommandAILevel () const
void SetCommandAILevel (int n)
const TextGetSquadron () const
void SetSquadron (const char *s)
CombatGroupGetCombatGroup ()
void SetCombatGroup (CombatGroup *g)
CombatUnitGetCombatUnit ()
void SetCombatUnit (CombatUnit *u)
int GetCount () const
void SetCount (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 Attributes

int id
int iff
int type
int player
int command_ai
int respawns
int intel
Text name
int count
List< Shipships
List< Textship_names
List< Textinstructions
List< Instructionobjectives
List< Instructionflight_plan
Elementcommander
Elementassignment
Shipcarrier
Text squadron
CombatGroupcombat_group
CombatUnitcombat_unit
DWORD launch_time
double hold_time
bool rogue
bool playable
bool zone_lock
int load [16]
- Protected Attributes inherited from SimObserver
List< SimObjectobserve_list

Additional Inherited Members

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

Detailed Description

Definition at line 35 of file Element.h.


Constructor & Destructor Documentation

Element::Element ( const char *  call_sign,
int  iff,
int  type = 0 
)

Definition at line 30 of file Element.cpp.

Element::~Element ( )
virtual

Definition at line 45 of file Element.cpp.


Member Function Documentation

void Element::AddInstruction ( const char *  instr)

Definition at line 534 of file Element.cpp.

void Element::AddNavPoint ( Instruction pt,
Instruction afterPoint = 0,
bool  send = true 
)

Definition at line 357 of file Element.cpp.

void Element::AddObjective ( Instruction obj)

Definition at line 478 of file Element.cpp.

int Element::AddShip ( Ship ship,
int  index = -1 
)

Definition at line 60 of file Element.cpp.

bool Element::CanCommand ( Element e)

Definition at line 630 of file Element.cpp.

void Element::ClearFlightPlan ( bool  send = true)

Definition at line 403 of file Element.cpp.

void Element::ClearInstructions ( )

Definition at line 528 of file Element.cpp.

void Element::ClearObjectives ( )

Definition at line 472 of file Element.cpp.

bool Element::Contains ( const Ship s)

Definition at line 119 of file Element.cpp.

void Element::DelNavPoint ( Instruction pt,
bool  send = true 
)

Definition at line 382 of file Element.cpp.

void Element::DelShip ( Ship ship)

Definition at line 83 of file Element.cpp.

void Element::ExecFrame ( double  seconds)
virtual

Definition at line 644 of file Element.cpp.

int Element::FindIndex ( const Ship s)

Definition at line 113 of file Element.cpp.

int Element::FlightPlanLength ( )

Definition at line 464 of file Element.cpp.

Element* Element::GetAssignment ( ) const
inline

Definition at line 115 of file Element.h.

Ship* Element::GetCarrier ( ) const
inline

Definition at line 119 of file Element.h.

CombatGroup* Element::GetCombatGroup ( )
inline

Definition at line 127 of file Element.h.

CombatUnit* Element::GetCombatUnit ( )
inline

Definition at line 129 of file Element.h.

int Element::GetCommandAILevel ( ) const
inline

Definition at line 121 of file Element.h.

Element* Element::GetCommander ( ) const
inline

Definition at line 113 of file Element.h.

int Element::GetCount ( ) const
inline

Definition at line 133 of file Element.h.

List< Instruction > & Element::GetFlightPlan ( )

Definition at line 458 of file Element.cpp.

double Element::GetHoldTime ( )

Definition at line 292 of file Element.cpp.

virtual int Element::GetIFF ( ) const
inlinevirtual

Definition at line 49 of file Element.h.

Text Element::GetInstruction ( int  index)

Definition at line 540 of file Element.cpp.

DWORD Element::GetLaunchTime ( ) const
inline

Definition at line 52 of file Element.h.

int Element::GetNavIndex ( const Instruction n)

Definition at line 439 of file Element.cpp.

Instruction * Element::GetNextNavPoint ( )

Definition at line 418 of file Element.cpp.

Instruction * Element::GetObjective ( int  index)

Definition at line 484 of file Element.cpp.

const char * Element::GetObserverName ( ) const
virtual

Reimplemented from SimObserver.

Definition at line 349 of file Element.cpp.

Ship * Element::GetShip ( int  index)

Definition at line 95 of file Element.cpp.

int Element::GetShipClass ( )

Definition at line 104 of file Element.cpp.

const Text& Element::GetSquadron ( ) const
inline

Definition at line 123 of file Element.h.

Instruction * Element::GetTargetObjective ( )

Definition at line 499 of file Element.cpp.

bool Element::GetZoneLock ( )

Definition at line 305 of file Element.cpp.

void Element::HandleRadioMessage ( RadioMessage msg)
virtual

Definition at line 599 of file Element.cpp.

int Element::Identity ( ) const
inline

Definition at line 45 of file Element.h.

int Element::IntelLevel ( ) const
inline

Definition at line 54 of file Element.h.

bool Element::IsActive ( ) const

Definition at line 125 of file Element.cpp.

bool Element::IsFinished ( ) const

Definition at line 139 of file Element.cpp.

bool Element::IsHostileTo ( const Ship s) const

Definition at line 197 of file Element.cpp.

bool Element::IsHostileTo ( int  iff_code) const

Definition at line 220 of file Element.cpp.

bool Element::IsNetObserver ( ) const

Definition at line 161 of file Element.cpp.

bool Element::IsObjectiveTargetOf ( const Ship s) const

Definition at line 235 of file Element.cpp.

bool Element::IsPlayable ( ) const
inline

Definition at line 74 of file Element.h.

bool Element::IsRogue ( ) const
inline

Definition at line 73 of file Element.h.

bool Element::IsSquadron ( ) const

Definition at line 176 of file Element.cpp.

bool Element::IsStatic ( ) const

Definition at line 182 of file Element.cpp.

int* Element::Loadout ( )
inline

Definition at line 75 of file Element.h.

const Text& Element::Name ( ) const
inline

Definition at line 47 of file Element.h.

int Element::NumInstructions ( ) const
inline

Definition at line 96 of file Element.h.

int Element::NumObjectives ( ) const
inline

Definition at line 91 of file Element.h.

int Element::NumShips ( ) const
inline

Definition at line 58 of file Element.h.

int Element::operator== ( const Element e) const
inline

Definition at line 42 of file Element.h.

int Element::Player ( ) const
inline

Definition at line 50 of file Element.h.

void Element::ResumeAssignment ( )

Definition at line 557 of file Element.cpp.

void Element::SetAssignment ( Element e)
inline

Definition at line 116 of file Element.h.

void Element::SetCarrier ( Ship c)
inline

Definition at line 120 of file Element.h.

void Element::SetCombatGroup ( CombatGroup g)
inline

Definition at line 128 of file Element.h.

void Element::SetCombatUnit ( CombatUnit u)
inline

Definition at line 130 of file Element.h.

void Element::SetCommandAILevel ( int  n)
inline

Definition at line 122 of file Element.h.

void Element::SetCommander ( Element e)
inline

Definition at line 114 of file Element.h.

void Element::SetCount ( int  n)
inline

Definition at line 134 of file Element.h.

void Element::SetHoldTime ( double  t)

Definition at line 298 of file Element.cpp.

void Element::SetIFF ( int  iff)
virtual

Definition at line 663 of file Element.cpp.

void Element::SetIntelLevel ( int  i)
inline

Definition at line 55 of file Element.h.

void Element::SetLaunchTime ( DWORD  t)

Definition at line 285 of file Element.cpp.

void Element::SetLoadout ( int *  l)

Definition at line 317 of file Element.cpp.

void Element::SetName ( const char *  s)
inline

Definition at line 48 of file Element.h.

void Element::SetPlayable ( bool  p)
inline

Definition at line 78 of file Element.h.

void Element::SetPlayer ( int  p)
inline

Definition at line 51 of file Element.h.

void Element::SetRogue ( bool  r)
inline

Definition at line 77 of file Element.h.

void Element::SetSquadron ( const char *  s)
inline

Definition at line 124 of file Element.h.

void Element::SetZoneLock ( bool  z)

Definition at line 311 of file Element.cpp.

int Element::Type ( ) const
inline

Definition at line 46 of file Element.h.

bool Element::Update ( SimObject obj)
virtual

Reimplemented from SimObserver.

Definition at line 331 of file Element.cpp.


Member Data Documentation

Element* Element::assignment
protected

Definition at line 156 of file Element.h.

Ship* Element::carrier
protected

Definition at line 157 of file Element.h.

CombatGroup* Element::combat_group
protected

Definition at line 160 of file Element.h.

CombatUnit* Element::combat_unit
protected

Definition at line 161 of file Element.h.

int Element::command_ai
protected

Definition at line 141 of file Element.h.

Element* Element::commander
protected

Definition at line 155 of file Element.h.

int Element::count
protected

Definition at line 147 of file Element.h.

List<Instruction> Element::flight_plan
protected

Definition at line 153 of file Element.h.

double Element::hold_time
protected

Definition at line 163 of file Element.h.

int Element::id
protected

Definition at line 137 of file Element.h.

int Element::iff
protected

Definition at line 138 of file Element.h.

List<Text> Element::instructions
protected

Definition at line 151 of file Element.h.

int Element::intel
protected

Definition at line 143 of file Element.h.

DWORD Element::launch_time
protected

Definition at line 162 of file Element.h.

int Element::load[16]
protected

Definition at line 168 of file Element.h.

Text Element::name
protected

Definition at line 144 of file Element.h.

List<Instruction> Element::objectives
protected

Definition at line 152 of file Element.h.

bool Element::playable
protected

Definition at line 166 of file Element.h.

int Element::player
protected

Definition at line 140 of file Element.h.

int Element::respawns
protected

Definition at line 142 of file Element.h.

bool Element::rogue
protected

Definition at line 165 of file Element.h.

List<Text> Element::ship_names
protected

Definition at line 150 of file Element.h.

List<Ship> Element::ships
protected

Definition at line 149 of file Element.h.

Text Element::squadron
protected

Definition at line 158 of file Element.h.

int Element::type
protected

Definition at line 139 of file Element.h.

bool Element::zone_lock
protected

Definition at line 167 of file Element.h.


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