libcrn  3.9.5
A document image processing library
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | List of all members
crn::Point2DDouble Class Reference

A 2D point class. More...

#include <CRNPoint2DDouble.h>

+ Inheritance diagram for crn::Point2DDouble:
+ Collaboration diagram for crn::Point2DDouble:

Public Member Functions

 Point2DDouble () noexcept
 Default constructor. More...
 
 Point2DDouble (double x, double y) noexcept
 Constructor from values. More...
 
 Point2DDouble (const Point2D< double > &p) noexcept
 
 Point2DDouble (const Point2DDouble &)=default
 
 Point2DDouble (Point2DDouble &&)=default
 
virtual ~Point2DDouble () override
 Destructor. More...
 
Point2DDoubleoperator= (const Point2DDouble &)=default
 
Point2DDoubleoperator= (Point2DDouble &&)=default
 
Point2DDouble MakeRotation (Angle< Radian > theta) const
 Rotation for single point. More...
 
void Deserialize (xml::Element &el)
 Initializes the object from an XML element. Unsafe. More...
 
xml::Element Serialize (xml::Element &parent) const
 Dumps the object to an XML element. Unsafe. More...
 
- Public Member Functions inherited from crn::Point2D< double >
 Point2D () noexcept(noexcept(double{0}))
 Default constructor (sets coordinates to 0) More...
 
 Point2D (doublex, doubley) noexcept(std::is_nothrow_copy_constructible< double >::value)
 Constructor from values. More...
 
 Point2D (const Point2D &)=default
 
 Point2D (Point2D &&)=default
 
virtual ~Point2D () override=default
 Destructor. More...
 
String ToString () const
 Converts object to string. More...
 
Point2D< U > Convert () const noexcept(noexcept(U{X}))
 Converts to another type of Point. More...
 
Point2Doperator= (const Point2D &)=default
 
Point2Doperator= (Point2D &&)=default
 
bool operator== (const Point2D &p) const noexcept
 
Point2D< double > & operator+= (const Point2D< double > &p) noexcept
 Translation. More...
 
Point2D< double > & operator-= (const Point2D< double > &p) noexcept
 Translation. More...
 
- Public Member Functions inherited from crn::Object
virtual ~Object ()=default
 

Additional Inherited Members

- Public Types inherited from crn::Point2D< double >
using value_type = double
 The value type. More...
 
- Public Attributes inherited from crn::Point2D< double >
value_type X
 
value_type Y
 

Detailed Description

A 2D point class.

Convenience 2D point class.

Author
Yann LEYDIER
Date
September 2008
Version
0.1

Definition at line 39 of file CRNPoint2DDouble.h.

Constructor & Destructor Documentation

crn::Point2DDouble::Point2DDouble ( )
inlinenoexcept

Default constructor.

Definition at line 43 of file CRNPoint2DDouble.h.

crn::Point2DDouble::Point2DDouble ( double  x,
double  y 
)
inlinenoexcept

Constructor from values.

Definition at line 45 of file CRNPoint2DDouble.h.

crn::Point2DDouble::Point2DDouble ( const Point2D< double > &  p)
inlinenoexcept

Definition at line 46 of file CRNPoint2DDouble.h.

crn::Point2DDouble::Point2DDouble ( const Point2DDouble )
default
crn::Point2DDouble::Point2DDouble ( Point2DDouble &&  )
default
virtual crn::Point2DDouble::~Point2DDouble ( )
inlineoverridevirtual

Destructor.

Definition at line 50 of file CRNPoint2DDouble.h.

Member Function Documentation

void Point2DDouble::Deserialize ( xml::Element el)

Initializes the object from an XML element. Unsafe.

Initializes the object from an XML element. Unsafe.

Exceptions
ExceptionInvalidArgumentnot a Point2DDouble
ExceptionNotFoundattribute not found
ExceptionDomainwrong attribute
Parameters
[in]elthe XML element to read

Definition at line 38 of file CRNPoint2DDouble.cpp.

Point2DDouble Point2DDouble::MakeRotation ( Angle< Radian theta) const

Rotation for single point.

Perform plan rotation for a single point

Parameters
[in]thetathe rotation angle (in radian)
Returns
the new point

Definition at line 75 of file CRNPoint2DDouble.cpp.

Point2DDouble& crn::Point2DDouble::operator= ( const Point2DDouble )
default
Point2DDouble& crn::Point2DDouble::operator= ( Point2DDouble &&  )
default
xml::Element Point2DDouble::Serialize ( xml::Element parent) const

Dumps the object to an XML element. Unsafe.

Dumps the object to an XML element. Unsafe.

Parameters
[in]parentthe element in which the new element will be stored
Returns
the newly created element

Definition at line 58 of file CRNPoint2DDouble.cpp.


The documentation for this class was generated from the following files: