libcrn  3.9.5
A document image processing library
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CRNPoint2DDouble.h
Go to the documentation of this file.
1 /* Copyright 2008-2016 INSA Lyon, CoReNum, ENS-Lyon
2  *
3  * This file is part of libcrn.
4  *
5  * libcrn is free software: you can redistribute it and/or modify
6  * it under the terms of the GNU Lesser General Public License as published by
7  * the Free Software Foundation, either version 3 of the License, or
8  * (at your option) any later version.
9  *
10  * libcrn is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public License
16  * along with libcrn. If not, see <http://www.gnu.org/licenses/>.
17  *
18  * file: CRNPoint2DDouble.h
19  * \author Yann LEYDIER
20  */
21 
22 #ifndef CRNPOINT2DDOUBLE_HEADER
23 #define CRNPOINT2DDOUBLE_HEADER
24 
25 #include <CRNGeometry/CRNPoint2D.h>
26 
27 namespace crn
28 {
29  /****************************************************************************/
39  class Point2DDouble: public Point2D<double>
40  {
41  public:
43  Point2DDouble() noexcept:Point2D<double>() {}
45  Point2DDouble(double x, double y) noexcept:Point2D<double>(x,y) {}
47  Point2DDouble(const Point2DDouble&) = default;
48  Point2DDouble(Point2DDouble&&) = default;
50  virtual ~Point2DDouble() override {}
51 
52  Point2DDouble& operator=(const Point2DDouble&) = default;
54 
57 
59  void Deserialize(xml::Element &el);
61  xml::Element Serialize(xml::Element &parent) const;
62  private:
63 
66  };
67  template<> struct IsSerializable<Point2DDouble> : public std::true_type {};
68  template<> struct IsClonable<Point2DDouble> : public std::true_type {};
69 
71 }
72 
73 #endif
Point2DDouble(double x, double y) noexcept
Constructor from values.
#define CRN_SERIALIZATION_CONSTRUCTOR(classname)
Defines a default constructor from xml element.
Definition: CRNObject.h:165
xml::Element Serialize(xml::Element &parent) const
Dumps the object to an XML element. Unsafe.
A 2D point class.
Point2DDouble & operator=(const Point2DDouble &)=default
XML element.
Definition: CRNXml.h:135
Point2DDouble MakeRotation(Angle< Radian > theta) const
Rotation for single point.
virtual ~Point2DDouble() override
Destructor.
A convenience class for angles units.
A 2D point class.
Definition: CRNPoint2D.h:45
Point2DDouble(const Point2D< double > &p) noexcept
#define CRN_DECLARE_CLASS_CONSTRUCTOR(classname)
Declares a class constructor.
Definition: CRNObject.h:173
CRN_ALIAS_SMART_PTR(ImageBW)
void Deserialize(xml::Element &el)
Initializes the object from an XML element. Unsafe.
Point2DDouble() noexcept
Default constructor.