Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/heathaze/src/util/mission_goal.h @ 10561

Last change on this file since 10561 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
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  ObjectListDeclaration(MissionGoal);
29
30 public:
31  MissionGoal(const TiXmlElement* root);
32  virtual ~MissionGoal();
33
34  virtual void loadParams(const TiXmlElement* root);
35
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
41  /** sets the mission description @param descrtiption: the string containing the description */
42  inline void setMissionDescription(const std::string& description) { this->missionDescription = description; }
43  /** gets the mission description @returns the string containing the description */
44  inline std::string getMissionDescription() { return this->missionDescription; }
45
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
51  virtual MissionState checkMissionGoal(float dt) = 0;
52
53
54 protected:
55   std::string      missionName;                                           //!< the title of the mission
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
61};
62
63#endif /* _MISSION_GOAL_H */
Note: See TracBrowser for help on using the repository browser.