1 #ifndef GPS_POSITION_HPP
2 #define GPS_POSITION_HPP
4 // Copyright Matthias Troyer
5 // 2005. Distributed under the Boost Software License, Version
6 // 1.0. (See accompanying file LICENSE_1_0.txt or copy at
7 // http://www.boost.org/LICENSE_1_0.txt)
9 #include <boost/mpi/datatype_fwd.hpp>
10 #include <boost/mpl/and.hpp>
11 #include <boost/serialization/export.hpp>
12 #include <boost/shared_ptr.hpp>
17 friend class boost::serialization::access;
18 // When the class Archive corresponds to an output archive, the
19 // & operator is defined similar to <<. Likewise, when the class Archive
20 // is a type of input archive the & operator is defined similar to >>.
21 template<class Archive>
22 void serialize(Archive & ar, const unsigned int version)
24 ar & degrees & minutes & seconds;
31 gps_position(int d, int m, float s) :
32 degrees(d), minutes(m), seconds(s)
35 friend bool operator==(const gps_position& x, const gps_position& y)
37 return (x.degrees == y.degrees
38 && x.minutes == y.minutes
39 && x.seconds == y.seconds);
42 inline friend bool operator!=(const gps_position& x, const gps_position& y)
49 namespace boost { namespace mpi {
52 struct is_mpi_datatype<gps_position>
56 is_mpi_datatype<float>