Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 9489 was 7464, checked in by patrick, 19 years ago

orxonox: mission goals get checked now, verbose output.

File size: 1.9 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 {
28
29 public:
[7461]30  MissionGoal(const TiXmlElement* root);
[7391]31  virtual ~MissionGoal();
32
[7400]33  virtual void loadParams(const TiXmlElement* root);
[7391]34
[7463]35  /** sets the mission name @param missionName: the string containig the mission title */
36  inline void setMissionName(const std::string& missionName) { this->missionName = missionName; }
37  /** @return the mission title */
38  inline std::string getMissionName() { return this->missionName; }
39
[7400]40  /** sets the mission description @param descrtiption: the string containing the description */
[7463]41  inline void setMissionDescription(const std::string& description) { this->missionDescription = description; }
[7400]42  /** gets the mission description @returns the string containing the description */
43  inline std::string getMissionDescription() { return this->missionDescription; }
[7391]44
[7463]45  /** sets the mission state @param missionState  state of the mission*/
46  inline void setMissionState(MissionState state) { this->missionState = state; }
47  /** @returns the current mission state */
48  inline MissionState getMissionState() { return this->missionState; }
49
[7464]50  virtual MissionState checkMissionGoal(float dt) = 0;
[7400]51
52
53 protected:
[7463]54   std::string      missionName;                                           //!< the title of the mission
[7400]55   // perhaps there will be more than one description soon: a long and short version for different parsts in the gui
56   std::string      missionDescription;                                    //!< the text description of the mission
57
58   MissionState     missionState;                                          //!< the state of this mission
59
[7391]60};
61
62#endif /* _MISSION_GOAL_H */
Note: See TracBrowser for help on using the repository browser.