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

#include <MissionTemplate.h>

Inheritance diagram for MissionTemplate:
Mission

List of all members.

Public Member Functions

 MissionTemplate (int id, const char *filename=0, const char *path=0)
virtual ~MissionTemplate ()
virtual bool Load (const char *filename=0, const char *path=0)
virtual MissionElementFindElement (const char *name)
virtual void AddElement (MissionElement *elem)
virtual bool MapElement (MissionElement *elem)
virtual Text MapShip (Text name)
virtual CombatGroupGetPlayerSquadron () const
virtual void SetPlayerSquadron (CombatGroup *ps)
virtual Text MapCallsign (const char *name, int iff)
virtual bool MapEvent (MissionEvent *event)
- Public Member Functions inherited from Mission
 Mission (int id, const char *filename=0, const char *path=0)
virtual ~Mission ()
int operator== (const Mission &m) const
virtual void Validate ()
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 ()
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 Public Member Functions inherited from Mission
static const char * RoleName (int role)
static int TypeFromName (const char *n)

Protected Member Functions

CombatGroupFindCombatGroup (int iff, const ShipDesign *dsn)
void ParseAlias (TermStruct *val)
void ParseCallsign (TermStruct *val)
bool ParseOptional (TermStruct *val)
void CheckObjectives ()
- Protected Member Functions inherited from Mission
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

List< MissionAliasaliases
List< MissionCallsigncallsigns
CombatGroupplayer_squadron
- Protected Attributes inherited from Mission
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

Additional Inherited Members

- Public Types inherited from Mission
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
}

Detailed Description

Definition at line 30 of file MissionTemplate.h.


Constructor & Destructor Documentation

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

Definition at line 38 of file MissionTemplate.cpp.

MissionTemplate::~MissionTemplate ( )
virtual

Definition at line 43 of file MissionTemplate.cpp.


Member Function Documentation

void MissionTemplate::AddElement ( MissionElement elem)
virtual

Reimplemented from Mission.

Definition at line 52 of file MissionTemplate.cpp.

void MissionTemplate::CheckObjectives ( )
protected

Definition at line 823 of file MissionTemplate.cpp.

CombatGroup * MissionTemplate::FindCombatGroup ( int  iff,
const ShipDesign dsn 
)
protected

Definition at line 221 of file MissionTemplate.cpp.

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

Reimplemented from Mission.

Definition at line 246 of file MissionTemplate.cpp.

virtual CombatGroup* MissionTemplate::GetPlayerSquadron ( ) const
inlinevirtual

Definition at line 45 of file MissionTemplate.h.

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

Reimplemented from Mission.

Definition at line 279 of file MissionTemplate.cpp.

Text MissionTemplate::MapCallsign ( const char *  name,
int  iff 
)
virtual

Definition at line 181 of file MissionTemplate.cpp.

bool MissionTemplate::MapElement ( MissionElement elem)
virtual

Definition at line 61 of file MissionTemplate.cpp.

bool MissionTemplate::MapEvent ( MissionEvent event)
virtual

Definition at line 161 of file MissionTemplate.cpp.

Text MissionTemplate::MapShip ( Text  name)
virtual

Definition at line 128 of file MissionTemplate.cpp.

void MissionTemplate::ParseAlias ( TermStruct val)
protected

Definition at line 485 of file MissionTemplate.cpp.

void MissionTemplate::ParseCallsign ( TermStruct val)
protected

Definition at line 701 of file MissionTemplate.cpp.

bool MissionTemplate::ParseOptional ( TermStruct val)
protected

Definition at line 727 of file MissionTemplate.cpp.

virtual void MissionTemplate::SetPlayerSquadron ( CombatGroup ps)
inlinevirtual

Definition at line 46 of file MissionTemplate.h.

static const char* MissionTemplate::TYPENAME ( )
inlinestatic

Reimplemented from Mission.

Definition at line 33 of file MissionTemplate.h.


Member Data Documentation

List<MissionAlias> MissionTemplate::aliases
protected

Definition at line 58 of file MissionTemplate.h.

List<MissionCallsign> MissionTemplate::callsigns
protected

Definition at line 59 of file MissionTemplate.h.

CombatGroup* MissionTemplate::player_squadron
protected

Definition at line 60 of file MissionTemplate.h.


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