37 #ifndef ICL_CORE_DATA_HEADER_H_INCLUDED 38 #define ICL_CORE_DATA_HEADER_H_INCLUDED 41 #include <boost/shared_ptr.hpp> 42 #include <boost/date_time.hpp> 43 #include <boost/version.hpp> 44 #if (BOOST_VERSION >= 104800) 45 # include <boost/type_traits/has_left_shift.hpp> 50 #ifdef _IC_BUILDER_EIGEN_ 74 const boost::posix_time::ptime&
timestamp,
76 : coordinate_system(coordinate_system),
106 typedef boost::shared_ptr<StampedBase>
Ptr;
107 typedef boost::shared_ptr<const StampedBase>
ConstPtr;
119 virtual void print(std::ostream& os)
const = 0;
136 template <
typename T,
bool has_left_shift>
139 template <
typename T>
142 static std::ostream&
print(std::ostream& os,
const T& obj)
144 return os <<
sizeof(T) <<
" data bytes";
148 template <
typename T>
151 static std::ostream&
print(std::ostream& os,
const T& obj)
162 template <
class DataType>
178 #ifdef _IC_BUILDER_EIGEN_ 179 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
183 typedef boost::shared_ptr<Stamped<DataType> >
Ptr;
185 typedef boost::shared_ptr<const Stamped<DataType> >
ConstPtr;
210 inline operator DataType ()
const {
return m_data; }
220 inline DataType&
get() {
return m_data; }
224 inline const DataType&
get()
const {
return m_data; }
229 inline const DataType&
cget()
const {
return m_data; }
234 inline const DataType&
operator * ()
const {
return m_data; }
237 inline DataType *operator -> () {
return &m_data; }
239 inline const DataType *operator -> ()
const {
return &m_data; }
262 virtual void print(std::ostream& os)
const 265 <<
", timestamp: " << boost::posix_time::to_simple_string(this->m_header.
timestamp)
266 <<
", DSIN: " << this->m_header.
dsin 269 #if (BOOST_VERSION >= 104800)
std::ostream & operator<<(std::ostream &os, StampedBase const &stamped)
Stamped(const DataHeader &header)
Implicit construction from a data header.
virtual void print(std::ostream &os) const
virtual DataHeader & header()
Access the data header.
Stamped()
Default constructor which leaves the data uninitialized.
boost::shared_ptr< StampedBase > Ptr
Convenience shared pointer typedefs.
#define ICL_CORE_IMPORT_EXPORT
virtual const DataHeader & header() const
Access the data header (const version).
StampedBase()
define default Constructor and Destructor for boost_dynamic_cast
boost::shared_ptr< Stamped< DataType > > Ptr
Convenience smart pointer typedef.
Stamped(const DataType &data, const DataHeader &header)
Full constructor.
DataHeader m_header
The data header.
static std::ostream & print(std::ostream &os, const T &obj)
Contains import/export definitions for the Win32 plattform.
Stamped(const DataType &data)
Implicit construction from a data value.
const DataType & cget() const
DataType m_data
The wrapped data.
Contains Interface base classes and base types.
boost::shared_ptr< const Stamped< DataType > > ConstPtr
Convenience smart pointer typedef.
TimeSpan operator*(const TimeSpan &span, double divisor)
boost::shared_ptr< const StampedBase > ConstPtr
static std::ostream & print(std::ostream &os, const T &obj)