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

#include <Mission.h>

Inheritance diagram for Mission:
MissionTemplate

List of all members.

Public Types

enum  TYPE {
  PATROL, SWEEP, INTERCEPT, AIR_PATROL,
  AIR_SWEEP, AIR_INTERCEPT, STRIKE, ASSAULT,
  DEFEND, ESCORT, ESCORT_FREIGHT, ESCORT_SHUTTLE,
  ESCORT_STRIKE, INTEL, SCOUT, RECON,
  BLOCKADE, FLEET, BOMBARDMENT, FLIGHT_OPS,
  TRANSPORT, CARGO, TRAINING, OTHER
}

Public Member Functions

 Mission (int id, const char *filename=0, const char *path=0)
virtual ~Mission ()
int operator== (const Mission &m) const
virtual void Validate ()
virtual bool Load (const char *filename=0, const char *path=0)
virtual bool Save ()
virtual bool ParseMission (const char *buffer)
virtual void SetPlayer (MissionElement *player_element)
virtual MissionElementGetPlayer ()
int Identity () const
const char * FileName () const
const char * Name () const
const char * Description () const
const char * Situation () const
const char * Objective () const
const char * Subtitles () const
int Start () const
double Stardate () const
int Type () const
const char * TypeName () const
int Team () const
bool IsOK () const
bool IsActive () const
bool IsComplete () const
StarSystemGetStarSystem () const
List< StarSystem > & GetSystemList ()
const char * GetRegion () const
List< MissionElement > & GetElements ()
virtual MissionElementFindElement (const char *name)
virtual void AddElement (MissionElement *elem)
List< MissionEvent > & GetEvents ()
MissionEventFindEvent (int event_type) const
virtual void AddEvent (MissionEvent *event)
MissionElementGetTarget () const
MissionElementGetWard () const
void SetName (const char *n)
void SetDescription (const char *d)
void SetSituation (const char *sit)
void SetObjective (const char *obj)
void SetStart (int s)
void SetType (int t)
void SetTeam (int iff)
void SetStarSystem (StarSystem *s)
void SetRegion (const char *rgn)
void SetOK (bool a)
void SetActive (bool a)
void SetComplete (bool c)
void SetTarget (MissionElement *t)
void SetWard (MissionElement *w)
void ClearSystemList ()
void IncreaseElemPriority (int index)
void DecreaseElemPriority (int index)
void IncreaseEventPriority (int index)
void DecreaseEventPriority (int index)
Text ErrorMessage () const
void AddError (Text err)
Text Serialize (const char *player_elem=0, int player_index=0)

Static Public Member Functions

static const char * TYPENAME ()
static const char * RoleName (int role)
static int TypeFromName (const char *n)

Protected Member Functions

MissionElementParseElement (TermStruct *val)
MissionEventParseEvent (TermStruct *val)
MissionShipParseShip (TermStruct *val, MissionElement *element)
InstructionParseInstruction (TermStruct *val, MissionElement *element)
void ParseLoadout (TermStruct *val, MissionElement *element)
RLocParseRLoc (TermStruct *val)

Protected Attributes

int id
char filename [64]
char path [64]
Text region
Text name
Text desc
int type
int team
int start
double stardate
bool ok
bool active
bool complete
bool degrees
Text objective
Text sitrep
Text errmsg
Text subtitles
StarSystemstar_system
List< StarSystemsystem_list
List< MissionElementelements
List< MissionEventevents
MissionElementtarget
MissionElementward
MissionElementcurrent

Detailed Description

Definition at line 54 of file Mission.h.


Member Enumeration Documentation

Enumerator:
PATROL 
SWEEP 
INTERCEPT 
AIR_PATROL 
AIR_SWEEP 
AIR_INTERCEPT 
STRIKE 
ASSAULT 
DEFEND 
ESCORT 
ESCORT_FREIGHT 
ESCORT_SHUTTLE 
ESCORT_STRIKE 
INTEL 
SCOUT 
RECON 
BLOCKADE 
FLEET 
BOMBARDMENT 
FLIGHT_OPS 
TRANSPORT 
CARGO 
TRAINING 
OTHER 

Definition at line 59 of file Mission.h.


Constructor & Destructor Documentation

Mission::Mission ( int  id,
const char *  filename = 0,
const char *  path = 0 
)

Definition at line 37 of file Mission.cpp.

Mission::~Mission ( )
virtual

Definition at line 56 of file Mission.cpp.


Member Function Documentation

void Mission::AddElement ( MissionElement elem)
virtual

Reimplemented in MissionTemplate.

Definition at line 74 of file Mission.cpp.

void Mission::AddError ( Text  err)

Definition at line 517 of file Mission.cpp.

void Mission::AddEvent ( MissionEvent event)
virtual

Definition at line 215 of file Mission.cpp.

void Mission::ClearSystemList ( )

Definition at line 162 of file Mission.cpp.

void Mission::DecreaseElemPriority ( int  index)

Definition at line 111 of file Mission.cpp.

void Mission::DecreaseEventPriority ( int  index)

Definition at line 137 of file Mission.cpp.

const char* Mission::Description ( ) const
inline

Definition at line 103 of file Mission.h.

Text Mission::ErrorMessage ( ) const
inline

Definition at line 156 of file Mission.h.

const char* Mission::FileName ( ) const
inline

Definition at line 101 of file Mission.h.

MissionElement * Mission::FindElement ( const char *  name)
virtual

Reimplemented in MissionTemplate.

Definition at line 83 of file Mission.cpp.

MissionEvent * Mission::FindEvent ( int  event_type) const

Definition at line 200 of file Mission.cpp.

List<MissionElement>& Mission::GetElements ( )
inline

Definition at line 120 of file Mission.h.

List<MissionEvent>& Mission::GetEvents ( )
inline

Definition at line 124 of file Mission.h.

MissionElement * Mission::GetPlayer ( )
virtual

Definition at line 184 of file Mission.cpp.

const char* Mission::GetRegion ( ) const
inline

Definition at line 118 of file Mission.h.

StarSystem* Mission::GetStarSystem ( ) const
inline

Definition at line 116 of file Mission.h.

List<StarSystem>& Mission::GetSystemList ( )
inline

Definition at line 117 of file Mission.h.

MissionElement* Mission::GetTarget ( ) const
inline

Definition at line 128 of file Mission.h.

MissionElement* Mission::GetWard ( ) const
inline

Definition at line 129 of file Mission.h.

int Mission::Identity ( ) const
inline

Definition at line 100 of file Mission.h.

void Mission::IncreaseElemPriority ( int  index)

Definition at line 99 of file Mission.cpp.

void Mission::IncreaseEventPriority ( int  index)

Definition at line 125 of file Mission.cpp.

bool Mission::IsActive ( ) const
inline

Definition at line 113 of file Mission.h.

bool Mission::IsComplete ( ) const
inline

Definition at line 114 of file Mission.h.

bool Mission::IsOK ( ) const
inline

Definition at line 112 of file Mission.h.

bool Mission::Load ( const char *  filename = 0,
const char *  path = 0 
)
virtual

Reimplemented in MissionTemplate.

Definition at line 224 of file Mission.cpp.

const char* Mission::Name ( ) const
inline

Definition at line 102 of file Mission.h.

const char* Mission::Objective ( ) const
inline

Definition at line 105 of file Mission.h.

int Mission::operator== ( const Mission m) const
inline

Definition at line 90 of file Mission.h.

MissionElement * Mission::ParseElement ( TermStruct val)
protected

Definition at line 575 of file Mission.cpp.

MissionEvent * Mission::ParseEvent ( TermStruct val)
protected

Definition at line 802 of file Mission.cpp.

Instruction * Mission::ParseInstruction ( TermStruct val,
MissionElement element 
)
protected

Definition at line 1035 of file Mission.cpp.

void Mission::ParseLoadout ( TermStruct val,
MissionElement element 
)
protected

Definition at line 1156 of file Mission.cpp.

bool Mission::ParseMission ( const char *  buffer)
virtual

Definition at line 269 of file Mission.cpp.

RLoc * Mission::ParseRLoc ( TermStruct val)
protected

Definition at line 1194 of file Mission.cpp.

MissionShip * Mission::ParseShip ( TermStruct val,
MissionElement element 
)
protected

Definition at line 917 of file Mission.cpp.

const char * Mission::RoleName ( int  role)
static

Definition at line 1302 of file Mission.cpp.

bool Mission::Save ( )
virtual

Definition at line 428 of file Mission.cpp.

Text Mission::Serialize ( const char *  player_elem = 0,
int  player_index = 0 
)

Definition at line 1336 of file Mission.cpp.

void Mission::SetActive ( bool  a)
inline

Definition at line 141 of file Mission.h.

void Mission::SetComplete ( bool  c)
inline

Definition at line 142 of file Mission.h.

void Mission::SetDescription ( const char *  d)
inline

Definition at line 132 of file Mission.h.

void Mission::SetName ( const char *  n)
inline

Definition at line 131 of file Mission.h.

void Mission::SetObjective ( const char *  obj)
inline

Definition at line 134 of file Mission.h.

void Mission::SetOK ( bool  a)
inline

Definition at line 140 of file Mission.h.

void Mission::SetPlayer ( MissionElement player_element)
virtual

Definition at line 171 of file Mission.cpp.

void Mission::SetRegion ( const char *  rgn)
inline

Definition at line 139 of file Mission.h.

void Mission::SetSituation ( const char *  sit)
inline

Definition at line 133 of file Mission.h.

void Mission::SetStarSystem ( StarSystem s)

Definition at line 151 of file Mission.cpp.

void Mission::SetStart ( int  s)
inline

Definition at line 135 of file Mission.h.

void Mission::SetTarget ( MissionElement t)
inline

Definition at line 143 of file Mission.h.

void Mission::SetTeam ( int  iff)
inline

Definition at line 137 of file Mission.h.

void Mission::SetType ( int  t)
inline

Definition at line 136 of file Mission.h.

void Mission::SetWard ( MissionElement w)
inline

Definition at line 144 of file Mission.h.

const char* Mission::Situation ( ) const
inline

Definition at line 104 of file Mission.h.

double Mission::Stardate ( ) const
inline

Definition at line 108 of file Mission.h.

int Mission::Start ( ) const
inline

Definition at line 107 of file Mission.h.

const char * Mission::Subtitles ( ) const

Definition at line 66 of file Mission.cpp.

int Mission::Team ( ) const
inline

Definition at line 111 of file Mission.h.

int Mission::Type ( ) const
inline

Definition at line 109 of file Mission.h.

int Mission::TypeFromName ( const char *  n)
static

Definition at line 530 of file Mission.cpp.

static const char* Mission::TYPENAME ( )
inlinestatic

Reimplemented in MissionTemplate.

Definition at line 57 of file Mission.h.

const char* Mission::TypeName ( ) const
inline

Definition at line 110 of file Mission.h.

void Mission::Validate ( )
virtual

Definition at line 468 of file Mission.cpp.


Member Data Documentation

bool Mission::active
protected

Definition at line 180 of file Mission.h.

bool Mission::complete
protected

Definition at line 181 of file Mission.h.

MissionElement* Mission::current
protected

Definition at line 195 of file Mission.h.

bool Mission::degrees
protected

Definition at line 182 of file Mission.h.

Text Mission::desc
protected

Definition at line 174 of file Mission.h.

List<MissionElement> Mission::elements
protected

Definition at line 190 of file Mission.h.

Text Mission::errmsg
protected

Definition at line 185 of file Mission.h.

List<MissionEvent> Mission::events
protected

Definition at line 191 of file Mission.h.

char Mission::filename[64]
protected

Definition at line 170 of file Mission.h.

int Mission::id
protected

Definition at line 169 of file Mission.h.

Text Mission::name
protected

Definition at line 173 of file Mission.h.

Text Mission::objective
protected

Definition at line 183 of file Mission.h.

bool Mission::ok
protected

Definition at line 179 of file Mission.h.

char Mission::path[64]
protected

Definition at line 171 of file Mission.h.

Text Mission::region
protected

Definition at line 172 of file Mission.h.

Text Mission::sitrep
protected

Definition at line 184 of file Mission.h.

StarSystem* Mission::star_system
protected

Definition at line 187 of file Mission.h.

double Mission::stardate
protected

Definition at line 178 of file Mission.h.

int Mission::start
protected

Definition at line 177 of file Mission.h.

Text Mission::subtitles
protected

Definition at line 186 of file Mission.h.

List<StarSystem> Mission::system_list
protected

Definition at line 188 of file Mission.h.

MissionElement* Mission::target
protected

Definition at line 193 of file Mission.h.

int Mission::team
protected

Definition at line 176 of file Mission.h.

int Mission::type
protected

Definition at line 175 of file Mission.h.

MissionElement* Mission::ward
protected

Definition at line 194 of file Mission.h.


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