Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

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

orxonox: mission goals get checked now, verbose output.

File size: 1.9 KB
Line 
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
12class TiXmlElement;
13
14
15typedef enum MissionState
16{
17  MS_ACCOMPLISHED = 0,
18  MS_ACCEPTED,
19  MS_FAILED,
20  MS_PASSIVE,
21
22  MS_NUMBER
23};
24
25
26//! A class representing a mission goal
27class MissionGoal : public BaseObject {
28
29 public:
30  MissionGoal(const TiXmlElement* root);
31  virtual ~MissionGoal();
32
33  virtual void loadParams(const TiXmlElement* root);
34
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
40  /** sets the mission description @param descrtiption: the string containing the description */
41  inline void setMissionDescription(const std::string& description) { this->missionDescription = description; }
42  /** gets the mission description @returns the string containing the description */
43  inline std::string getMissionDescription() { return this->missionDescription; }
44
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
50  virtual MissionState checkMissionGoal(float dt) = 0;
51
52
53 protected:
54   std::string      missionName;                                           //!< the title of the mission
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
60};
61
62#endif /* _MISSION_GOAL_H */
Note: See TracBrowser for help on using the repository browser.