Go to the documentation of this file.00001
00013 #ifndef OBJECTABSTRACT_HPP_
00014 #define OBJECTABSTRACT_HPP_
00015
00016 #include <string>
00017 #include <vector>
00018
00019 #include "rtslam/rtSlam.hpp"
00020
00021 namespace jafar {
00022 namespace rtslam {
00023
00024 namespace display {
00025 class DisplayDataAbstract;
00026 }
00027
00037 class ObjectAbstract {
00038
00039 friend std::ostream& operator <<(std::ostream & s, ObjectAbstract const & obj);
00040
00041 public:
00045 typedef enum {
00046 FOR_SIMULATION
00047 } simulation_t;
00048
00049 enum category_enum { WORLD, MAP, OBJECT, MAPPABLE_OBJECT, ROBOT, SENSOR, LANDMARK, OBSERVATION, FEATURE, APPEARANCE, RAW, DATA_MANAGER};
00050
00051 private:
00052 std::size_t id_;
00053
00054 std::string name_;
00055
00056 protected:
00057 category_enum category;
00058
00059 public:
00060 ObjectAbstract();
00061 virtual ~ObjectAbstract();
00062 inline void id(std::size_t _id) {
00063 id_ = _id;
00064 }
00065 inline void name(std::string _name) {
00066 name_ = _name;
00067 }
00068 inline const std::size_t & id() const {
00069 return id_;
00070 }
00071 inline std::size_t & id() {
00072 return id_;
00073 }
00074 inline const std::string & name() const {
00075 return name_;
00076 }
00077 inline std::string & name() {
00078 return name_;
00079 }
00080 virtual std::string categoryName() const {
00081 return "OBJECT";
00082 }
00083 virtual std::string typeName() const {
00084 return "Undefined";
00085 }
00086
00087 inline void setup(const category_enum & _category, const size_t _id, const std::string & _name) {
00088 category = _category;
00089 id(_id);
00090 name(_name);
00091 }
00092 inline void setup(const size_t _id, const std::string & _name) {
00093 id(_id);
00094 name(_name);
00095 }
00096 virtual void destroyDisplay();
00097 std::vector<display::DisplayDataAbstract*> displayData;
00098 };
00099 }
00100 }
00101
00102 #endif