Vegastrike 0.5.1 rc1  1.0
Original sources for Vegastrike Evolved
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Mission::Objective Struct Reference

#include <mission.h>

Public Member Functions

UnitgetOwner ()
 
void setOwner (Unit *u)
 
 Objective ()
 
 Objective (float complete, std::string obj)
 

Public Attributes

float completeness
 
std::string objective
 
UnitContainer Owner
 

Detailed Description

Definition at line 441 of file mission.h.

Constructor & Destructor Documentation

Mission::Objective::Objective ( )
inline

Definition at line 451 of file mission.h.

References completeness.

452  {
453  completeness = 0;
454  }
Mission::Objective::Objective ( float  complete,
std::string  obj 
)
inline

Definition at line 455 of file mission.h.

References completeness, and objective.

456  {
457  completeness = complete;
458  objective = obj;
459  }

Member Function Documentation

Unit * Mission::Objective::getOwner ( )

Definition at line 113 of file mission.cpp.

References UnitContainer::GetUnit(), objective, and Owner.

114 {
115  Unit *Nawl = NULL;
116  if (Owner != Nawl) {
117  Unit *ret = Owner.GetUnit();
118  if (ret == NULL)
119  objective = ""; //unit died
120  return ret;
121  }
122  return Owner.GetUnit();
123 }
void Mission::Objective::setOwner ( Unit u)
inline

Definition at line 446 of file mission.h.

References Owner, and UnitContainer::SetUnit().

447  {
448  Owner.SetUnit( u );
449  }

Member Data Documentation

float Mission::Objective::completeness

Definition at line 443 of file mission.h.

Referenced by Objective().

std::string Mission::Objective::objective

Definition at line 444 of file mission.h.

Referenced by getOwner(), and Objective().

UnitContainer Mission::Objective::Owner

Definition at line 450 of file mission.h.

Referenced by getOwner(), and setOwner().


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