00001 // Authors: 00002 // Anselmo Cervera, Juan J. Gomez-Cadenas and Jose Angel Hernando 00003 #ifndef MeasurementServer_h 00004 #define MeasurementServer_h 1 00005 00006 #include "Kalman/Interface_IMeasurement.h" 00007 #include "Kalman/Interface_IServer.h" 00008 00009 00010 class MeasurementServer : public IServer 00011 { 00012 public: 00013 //! default constructor 00014 MeasurementServer(){}; 00015 00016 //! default destructor 00017 virtual ~MeasurementServer(); 00018 00019 //-------- Set and Get methods ----------------- 00020 00021 //! Number of Measurements in the server 00022 int nMeasurements () const {return m_list.size();} 00023 //! Returns the ith Measurement in the Measurement 00024 const IMeasurement& measurement (int i) const {return *m_list[i];} 00025 //! Returns a (non const) reference to the ith Measurement 00026 IMeasurement& measurement(int i) {return *m_list[i];} 00027 00028 //! Number of measurements in the server 00029 virtual int nElements () const { return nMeasurements(); } //ME moved from the IServer, 00030 00031 00032 //-------- Add and Remove methods ----------------- 00033 00034 //! Delete physically (delete the pointer) all the measuremnts in the server 00035 //! Be carefull with this fuction !!!!!!!!!!!!!!!!!!!!!!!!!! 00036 void deletePhysicallyAllMeasurements(); 00037 00038 //! Add/Remove a Measurement 00039 void addMeasurement(IMeasurement&); 00040 void removeMeasurement(IMeasurement&); 00041 00042 00043 //-------- Global acctions ----------------- 00044 00045 //! reset the server (remove all the measurements) 00046 void reset(); 00047 00048 //! prints Measurement server information 00049 void info(int verb) const; 00050 00051 protected: 00052 00053 std::vector<IMeasurement*> m_list; 00054 00055 00056 }; 00057 00058 #endif
1.4.7