CartoType C++ API 8.8-7-gb35e4dc71
for Windows, Linux, Qt and other platforms supporting C++ development
Public Member Functions | Public Attributes | List of all members
CartoTypeCore::Point Class Reference

#include <cartotype_base.h>

Inheritance diagram for CartoTypeCore::Point:
CartoTypeCore::OutlinePoint

Public Member Functions

constexpr Point () noexcept
 
constexpr Point (int32_t aX, int32_t aY) noexcept
 
 Point (InputStream &aInput)
 
void Write (OutputStream &aOutput) const
 
constexpr bool operator== (const Point &aPoint) const noexcept
 
constexpr bool operator!= (const Point &aPoint) const noexcept
 
void operator+= (const Point &aPoint) noexcept
 
void operator-= (const Point &aPoint) noexcept
 
constexpr bool operator< (const Point &aPoint) const noexcept
 
constexpr bool operator> (const Point &aPoint) const noexcept
 
constexpr uint64_t ComparisonValue () const noexcept
 

Public Attributes

int32_t X { 0 }
 
int32_t Y { 0 }
 

Detailed Description

A point in two-dimensional space.

Constructor & Destructor Documentation

◆ Point() [1/3]

constexpr CartoTypeCore::Point::Point ( )
inlineconstexprnoexcept

Creates a point with coordinates (0,0).

◆ Point() [2/3]

constexpr CartoTypeCore::Point::Point ( int32_t  aX,
int32_t  aY 
)
inlineconstexprnoexcept

Creates a point, specifying coordinates.

◆ Point() [3/3]

CartoTypeCore::Point::Point ( InputStream aInput)
explicit

Creates a Point by reading it from serialized form.

Member Function Documentation

◆ ComparisonValue()

constexpr uint64_t CartoTypeCore::Point::ComparisonValue ( ) const
inlineconstexprnoexcept

Returns a single number which can be used to sort points into order.

◆ operator!=()

constexpr bool CartoTypeCore::Point::operator!= ( const Point aPoint) const
inlineconstexprnoexcept

The inequality operator.

◆ operator+=()

void CartoTypeCore::Point::operator+= ( const Point aPoint)
inlinenoexcept

Offsets a point by another point, treated as a positive vector.

◆ operator-=()

void CartoTypeCore::Point::operator-= ( const Point aPoint)
inlinenoexcept

Offsets a point by another point, treated as a negative vector.

◆ operator<()

constexpr bool CartoTypeCore::Point::operator< ( const Point aPoint) const
inlineconstexprnoexcept

The less-than operator, ordering points by x coordinate, then y coordinate.

◆ operator==()

constexpr bool CartoTypeCore::Point::operator== ( const Point aPoint) const
inlineconstexprnoexcept

The equality operator.

◆ operator>()

constexpr bool CartoTypeCore::Point::operator> ( const Point aPoint) const
inlineconstexprnoexcept

The greater-than operator, ordering points by x coordinate, then y coordinate.

◆ Write()

void CartoTypeCore::Point::Write ( OutputStream aOutput) const

Serializes this object.

Member Data Documentation

◆ X

int32_t CartoTypeCore::Point::X { 0 }

The x coordinate.

◆ Y

int32_t CartoTypeCore::Point::Y { 0 }

The y coordinate.


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