74 #ifndef SLIP_DPOINT2D_HPP
75 #define SLIP_DPOINT2D_HPP
83 #include <boost/serialization/access.hpp>
84 #include <boost/serialization/split_member.hpp>
85 #include <boost/serialization/version.hpp>
102 template <
typename CoordType>
103 class DPoint2d:
public DPoint<CoordType,2>
131 const CoordType&
dx2);
144 void dx1(
const CoordType& dx);
154 const CoordType&
dx1()
const;
159 void dx2(
const CoordType& dx);
169 const CoordType&
dx2()
const;
184 std::string
name()
const;
188 template<
class Archive>
189 void save(Archive & ar,
const unsigned int version)
const
191 ar & boost::serialization::base_object<slip::DPoint<CoordType,2> >(*this);
193 template<
class Archive>
194 void load(Archive & ar,
const unsigned int version)
196 ar & boost::serialization::base_object<slip::DPoint<CoordType,2> >(*this);
198 BOOST_SERIALIZATION_SPLIT_MEMBER()
204 template<
typename CoordType>
208 this->coord_[0] = CoordType(0);
209 this->coord_[1] = CoordType(0);
212 template<
typename CoordType>
215 DPoint<CoordType,2>(array)
218 template<
typename CoordType>
221 const CoordType& dx2)
223 this->coord_[0] = CoordType(dx1);
224 this->coord_[1] = CoordType(dx2);
227 template<
typename CoordType>
231 template<
typename CoordType>
235 template<
typename CoordType>
239 template<
typename CoordType>
243 template<
typename CoordType>
247 template<
typename CoordType>
251 template<
typename CoordType>
255 this->coord_[0]= dx1;
256 this->coord_[1] = dx2;
258 template<
typename CoordType>
269 #endif //SLIP_DPOINT2D_HPP
DPoint2d()
Constructs a DPoint2d.
CoordType & dx1()
Accessor/Mutator of the first coordinate of DPoint2d.
CoordType & dx2()
Accessor/Mutator of the second coordinate of DPoint2d.
Provides a class to manipulate 1d static and generic arrays.
Difference of Point2D class, specialization of DPoint<CoordType,DIM> with DIM = 2.
void set_coord(const CoordType &dx1, const CoordType &dx2)
Accessor/Mutator of the coordinates of DPoint2d.
DPoint< CoordType, 2 > base
std::string name() const
Returns the name of the class.
friend class boost::serialization::access
Provides an abstract class to modelize the difference of slip::Point.