Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/trunk/src/util/mission_goal.h @ 10665

Last change on this file since 10665 was 9869, checked in by bensch, 18 years ago

orxonox/trunk: merged the new_class_id branche back to the trunk.
merged with command:
svn merge https://svn.orxonox.net/orxonox/branches/new_class_id trunk -r9683:HEAD
no conflicts… puh..

File size: 2.0 KB
RevLine 
[7391]1/*!
2 * @file mission_goal.h
3 * @brief General definition of mission goals
4*/
5
6#ifndef _MISSION_GOAL_H
7#define _MISSION_GOAL_H
8
9#include "base_object.h"
10
11
[7400]12class TiXmlElement;
[7391]13
14
[7400]15typedef enum MissionState
16{
17  MS_ACCOMPLISHED = 0,
[7464]18  MS_ACCEPTED,
[7400]19  MS_FAILED,
[7464]20  MS_PASSIVE,
[7400]21
22  MS_NUMBER
23};
24
25
[7391]26//! A class representing a mission goal
27class MissionGoal : public BaseObject {
[9869]28  ObjectListDeclaration(MissionGoal);
[7391]29
30 public:
[7461]31  MissionGoal(const TiXmlElement* root);
[7391]32  virtual ~MissionGoal();
33
[7400]34  virtual void loadParams(const TiXmlElement* root);
[7391]35
[7463]36  /** sets the mission name @param missionName: the string containig the mission title */
37  inline void setMissionName(const std::string& missionName) { this->missionName = missionName; }
38  /** @return the mission title */
39  inline std::string getMissionName() { return this->missionName; }
40
[7400]41  /** sets the mission description @param descrtiption: the string containing the description */
[7463]42  inline void setMissionDescription(const std::string& description) { this->missionDescription = description; }
[7400]43  /** gets the mission description @returns the string containing the description */
44  inline std::string getMissionDescription() { return this->missionDescription; }
[7391]45
[7463]46  /** sets the mission state @param missionState  state of the mission*/
47  inline void setMissionState(MissionState state) { this->missionState = state; }
48  /** @returns the current mission state */
49  inline MissionState getMissionState() { return this->missionState; }
50
[7464]51  virtual MissionState checkMissionGoal(float dt) = 0;
[7400]52
53
54 protected:
[7463]55   std::string      missionName;                                           //!< the title of the mission
[7400]56   // perhaps there will be more than one description soon: a long and short version for different parsts in the gui
57   std::string      missionDescription;                                    //!< the text description of the mission
58
59   MissionState     missionState;                                          //!< the state of this mission
60
[7391]61};
62
63#endif /* _MISSION_GOAL_H */
Note: See TracBrowser for help on using the repository browser.