00001 // Authors: 00002 // Anselmo Cervera, Juan J. Gomez-Cadenas and Jose Angel Hernando 00003 00004 #ifndef LogicalObjectB_h 00005 #define LogicalObjectB_h 1 00006 00007 #include "Kalman/Util_ETypes.h" 00008 00009 //! Class to perform a LogicalObject 00010 class LogicalObjectB 00011 { 00012 public: 00013 00014 00015 LogicalObjectB(std::string name, std::string type, int i, int j, std::string trueAction, std::string falseAction){ 00016 m_name = name; 00017 m_type = type; 00018 m_firstIndex = i; 00019 m_secondIndex = j; 00020 m_trueAction = trueAction; 00021 m_falseAction = falseAction; 00022 } 00023 00024 00025 00026 00027 //! default destructor 00028 virtual ~LogicalObjectB(){} 00029 00030 00031 //! returns the first index 00032 virtual int firstIndex() const{return m_firstIndex;} 00033 00034 //! returns the second index 00035 virtual int secondIndex() const{return m_secondIndex;} 00036 00037 //! get the actions to be taken in the case of intersection/no-intersection 00038 virtual std::string action(bool inter) const { 00039 if (inter) return m_trueAction; 00040 else return m_falseAction; 00041 } 00042 //! returns the second index 00043 virtual std::string type() const {return m_type;} 00044 00045 //! returns the second index 00046 virtual std::string name() const {return m_name;} 00047 00048 //! comparison operators 00049 virtual int operator >(const LogicalObjectB& right) const; 00050 virtual int operator >=(const LogicalObjectB& right) const; 00051 virtual int operator <(const LogicalObjectB& right) const; 00052 virtual int operator <=(const LogicalObjectB& right) const; 00053 00054 00055 protected: 00056 00057 std::string m_type; 00058 std::string m_name; 00059 00060 int m_firstIndex; 00061 int m_secondIndex; 00062 00063 std::string m_trueAction; 00064 std::string m_falseAction; 00065 00066 }; 00067 #endif 00068 00069
1.4.7