00001
00002 #ifndef DDF_ACCPROFILEITEM_HPP
00003 #define DDF_ACCPROFILEITEM_HPP
00004
00005 #include <iostream>
00006 #include "ddf/ctime.hpp"
00007 #include "ddf/definitions.hpp"
00008
00012 namespace jafar
00013 {
00014 namespace ddfsimu
00015 {
00016
00017 using namespace jafar::ddf;
00018
00022 class AccProfileItem
00023 {
00024 VEC m_accel;
00025 time m_time;
00026
00027 public:
00028 static const unsigned int N = 3;
00029 AccProfileItem();
00030 AccProfileItem(AccProfileItem const& item);
00031 AccProfileItem(time t, VEC const& a);
00032 ~AccProfileItem();
00033
00034 void SetTime(time t) { m_time = t; }
00035 void SetAccel(VEC const& a) { m_accel = a; }
00036 void SetItem(time t, VEC const& a) { SetTime(t); SetAccel(a); }
00037
00038 time GetTime() const { return m_time; }
00039 double GetTimeDbl() const { return m_time.to_double(); }
00040 VEC const& GetAccel() const { return m_accel; }
00041 bool operator <(AccProfileItem const &right) const { return this->m_time < right.m_time; }
00042 bool operator >(AccProfileItem const &left) const { return this->m_time > left.m_time; }
00043 bool operator ==(AccProfileItem const &item) const { return this->m_time == item.m_time; }
00044 AccProfileItem & operator =(AccProfileItem const& item);
00045
00046 friend std::ostream &operator << (std::ostream & stream, AccProfileItem const& pd);
00047 };
00048
00049 std::ostream &operator << (std::ostream &stream, AccProfileItem const& pd);
00050
00051 }
00052 }
00053 #endif