/*! * @file mission_goal.h * @brief General definition of mission goals */ #ifndef _MISSION_GOAL_H #define _MISSION_GOAL_H #include "base_object.h" class TiXmlElement; typedef enum MissionState { MS_ACCOMPLISHED = 0, MS_ACCEPTED, MS_FAILED, MS_PASSIVE, MS_NUMBER }; //! A class representing a mission goal class MissionGoal : public BaseObject { ObjectListDeclaration(MissionGoal); public: MissionGoal(const TiXmlElement* root); virtual ~MissionGoal(); virtual void loadParams(const TiXmlElement* root); /** sets the mission name @param missionName: the string containig the mission title */ inline void setMissionName(const std::string& missionName) { this->missionName = missionName; } /** @return the mission title */ inline std::string getMissionName() { return this->missionName; } /** sets the mission description @param descrtiption: the string containing the description */ inline void setMissionDescription(const std::string& description) { this->missionDescription = description; } /** gets the mission description @returns the string containing the description */ inline std::string getMissionDescription() { return this->missionDescription; } /** sets the mission state @param missionState state of the mission*/ inline void setMissionState(MissionState state) { this->missionState = state; } /** @returns the current mission state */ inline MissionState getMissionState() { return this->missionState; } virtual MissionState checkMissionGoal(float dt) = 0; protected: std::string missionName; //!< the title of the mission // perhaps there will be more than one description soon: a long and short version for different parsts in the gui std::string missionDescription; //!< the text description of the mission MissionState missionState; //!< the state of this mission }; #endif /* _MISSION_GOAL_H */