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

#include <Instruction.h>

Inheritance diagram for Instruction:
SimObserver

List of all members.

Public Types

enum  ACTION {
  VECTOR, LAUNCH, DOCK, RTB,
  DEFEND, ESCORT, PATROL, SWEEP,
  INTERCEPT, STRIKE, ASSAULT, RECON,
  NUM_ACTIONS
}
enum  STATUS {
  PENDING, ACTIVE, SKIPPED, ABORTED,
  FAILED, COMPLETE, NUM_STATUS
}
enum  FORMATION {
  DIAMOND, SPREAD, BOX, TRAIL,
  NUM_FORMATIONS
}
enum  PRIORITY { PRIMARY = 1, SECONDARY, BONUS }

Public Member Functions

 Instruction (int action, const char *tgt)
 Instruction (const char *rgn, Point loc, int act=VECTOR)
 Instruction (SimRegion *rgn, Point loc, int act=VECTOR)
 Instruction (const Instruction &instr)
virtual ~Instruction ()
Instructionoperator= (const Instruction &n)
const char * RegionName () const
SimRegionRegion () const
Point Location () const
RLocGetRLoc ()
int Action () const
int Status () const
int Formation () const
int Speed () const
int EMCON () const
int WeaponsFree () const
int Priority () const
int Farcast () const
double HoldTime () const
const char * TargetName () const
const char * TargetDesc () const
SimObjectGetTarget ()
void Evaluate (Ship *s)
const char * GetShortDescription () const
const char * GetDescription () const
void SetRegion (SimRegion *r)
void SetLocation (const Point &l)
void SetAction (int s)
void SetStatus (int s)
void SetFormation (int s)
void SetSpeed (int s)
void SetEMCON (int e)
void SetWeaponsFree (int f)
void SetPriority (int p)
void SetFarcast (int f)
void SetHoldTime (double t)
void SetTarget (const char *n)
void SetTarget (SimObject *s)
void SetTargetDesc (const char *d)
void ClearTarget ()
virtual bool Update (SimObject *s)
virtual const char * GetObserverName () const
- Public Member Functions inherited from SimObserver
virtual ~SimObserver ()
int operator== (const SimObserver &o) const
virtual void Observe (SimObject *obj)
virtual void Ignore (SimObject *obj)

Static Public Member Functions

static const char * TYPENAME ()
static const char * ActionName (int a)
static const char * StatusName (int s)
static const char * FormationName (int f)
static const char * PriorityName (int p)

Protected Attributes

Text rgn_name
SimRegionregion
RLoc rloc
int action
int formation
int status
int speed
Text tgt_name
Text tgt_desc
SimObjecttarget
int emcon
int wep_free
int priority
int farcast
double hold_time
- Protected Attributes inherited from SimObserver
List< SimObjectobserve_list

Detailed Description

Definition at line 30 of file Instruction.h.


Member Enumeration Documentation

Enumerator:
VECTOR 
LAUNCH 
DOCK 
RTB 
DEFEND 
ESCORT 
PATROL 
SWEEP 
INTERCEPT 
STRIKE 
ASSAULT 
RECON 
NUM_ACTIONS 

Definition at line 35 of file Instruction.h.

Enumerator:
DIAMOND 
SPREAD 
BOX 
TRAIL 
NUM_FORMATIONS 

Definition at line 69 of file Instruction.h.

Enumerator:
PRIMARY 
SECONDARY 
BONUS 

Definition at line 79 of file Instruction.h.

Enumerator:
PENDING 
ACTIVE 
SKIPPED 
ABORTED 
FAILED 
COMPLETE 
NUM_STATUS 

Definition at line 57 of file Instruction.h.


Constructor & Destructor Documentation

Instruction::Instruction ( int  action,
const char *  tgt 
)

Definition at line 27 of file Instruction.cpp.

Instruction::Instruction ( const char *  rgn,
Point  loc,
int  act = VECTOR 
)

Definition at line 33 of file Instruction.cpp.

Instruction::Instruction ( SimRegion rgn,
Point  loc,
int  act = VECTOR 
)

Definition at line 43 of file Instruction.cpp.

Instruction::Instruction ( const Instruction instr)

Definition at line 53 of file Instruction.cpp.

Instruction::~Instruction ( )
virtual

Definition at line 65 of file Instruction.cpp.


Member Function Documentation

int Instruction::Action ( ) const
inline

Definition at line 104 of file Instruction.h.

const char * Instruction::ActionName ( int  a)
static

Definition at line 509 of file Instruction.cpp.

void Instruction::ClearTarget ( )

Definition at line 162 of file Instruction.cpp.

int Instruction::EMCON ( ) const
inline

Definition at line 108 of file Instruction.h.

void Instruction::Evaluate ( Ship s)

Definition at line 191 of file Instruction.cpp.

int Instruction::Farcast ( ) const
inline

Definition at line 111 of file Instruction.h.

int Instruction::Formation ( ) const
inline

Definition at line 106 of file Instruction.h.

const char * Instruction::FormationName ( int  f)
static

Definition at line 546 of file Instruction.cpp.

const char * Instruction::GetDescription ( ) const

Definition at line 423 of file Instruction.cpp.

const char * Instruction::GetObserverName ( ) const
virtual

Reimplemented from SimObserver.

Definition at line 183 of file Instruction.cpp.

RLoc& Instruction::GetRLoc ( )
inline

Definition at line 103 of file Instruction.h.

const char * Instruction::GetShortDescription ( ) const

Definition at line 337 of file Instruction.cpp.

SimObject * Instruction::GetTarget ( )

Definition at line 114 of file Instruction.cpp.

double Instruction::HoldTime ( ) const
inline

Definition at line 112 of file Instruction.h.

Point Instruction::Location ( ) const

Definition at line 97 of file Instruction.cpp.

Instruction & Instruction::operator= ( const Instruction n)

Definition at line 71 of file Instruction.cpp.

int Instruction::Priority ( ) const
inline

Definition at line 110 of file Instruction.h.

const char * Instruction::PriorityName ( int  p)
static

Definition at line 559 of file Instruction.cpp.

SimRegion* Instruction::Region ( ) const
inline

Definition at line 101 of file Instruction.h.

const char* Instruction::RegionName ( ) const
inline

Definition at line 100 of file Instruction.h.

void Instruction::SetAction ( int  s)
inline

Definition at line 125 of file Instruction.h.

void Instruction::SetEMCON ( int  e)
inline

Definition at line 129 of file Instruction.h.

void Instruction::SetFarcast ( int  f)
inline

Definition at line 132 of file Instruction.h.

void Instruction::SetFormation ( int  s)
inline

Definition at line 127 of file Instruction.h.

void Instruction::SetHoldTime ( double  t)
inline

Definition at line 133 of file Instruction.h.

void Instruction::SetLocation ( const Point l)

Definition at line 104 of file Instruction.cpp.

void Instruction::SetPriority ( int  p)
inline

Definition at line 131 of file Instruction.h.

void Instruction::SetRegion ( SimRegion r)
inline

Definition at line 123 of file Instruction.h.

void Instruction::SetSpeed ( int  s)
inline

Definition at line 128 of file Instruction.h.

void Instruction::SetStatus ( int  s)

Definition at line 329 of file Instruction.cpp.

void Instruction::SetTarget ( const char *  n)

Definition at line 133 of file Instruction.cpp.

void Instruction::SetTarget ( SimObject s)

Definition at line 145 of file Instruction.cpp.

void Instruction::SetTargetDesc ( const char *  d)

Definition at line 155 of file Instruction.cpp.

void Instruction::SetWeaponsFree ( int  f)
inline

Definition at line 130 of file Instruction.h.

int Instruction::Speed ( ) const
inline

Definition at line 107 of file Instruction.h.

int Instruction::Status ( ) const
inline

Definition at line 105 of file Instruction.h.

const char * Instruction::StatusName ( int  s)
static

Definition at line 531 of file Instruction.cpp.

const char* Instruction::TargetDesc ( ) const
inline

Definition at line 115 of file Instruction.h.

const char* Instruction::TargetName ( ) const
inline

Definition at line 114 of file Instruction.h.

static const char* Instruction::TYPENAME ( )
inlinestatic

Reimplemented from SimObserver.

Definition at line 33 of file Instruction.h.

bool Instruction::Update ( SimObject s)
virtual

Reimplemented from SimObserver.

Definition at line 174 of file Instruction.cpp.

int Instruction::WeaponsFree ( ) const
inline

Definition at line 109 of file Instruction.h.


Member Data Documentation

int Instruction::action
protected

Definition at line 147 of file Instruction.h.

int Instruction::emcon
protected

Definition at line 155 of file Instruction.h.

int Instruction::farcast
protected

Definition at line 158 of file Instruction.h.

int Instruction::formation
protected

Definition at line 148 of file Instruction.h.

double Instruction::hold_time
protected

Definition at line 160 of file Instruction.h.

int Instruction::priority
protected

Definition at line 157 of file Instruction.h.

SimRegion* Instruction::region
protected

Definition at line 145 of file Instruction.h.

Text Instruction::rgn_name
protected

Definition at line 144 of file Instruction.h.

RLoc Instruction::rloc
protected

Definition at line 146 of file Instruction.h.

int Instruction::speed
protected

Definition at line 150 of file Instruction.h.

int Instruction::status
protected

Definition at line 149 of file Instruction.h.

SimObject* Instruction::target
protected

Definition at line 154 of file Instruction.h.

Text Instruction::tgt_desc
protected

Definition at line 153 of file Instruction.h.

Text Instruction::tgt_name
protected

Definition at line 152 of file Instruction.h.

int Instruction::wep_free
protected

Definition at line 156 of file Instruction.h.


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