Maps SDK for C++ 1.0.0
Loading...
Searching...
No Matches
gem::PolygonGeographicArea Class Reference

PolygonGeographicArea object. More...

Inheritance diagram for gem::PolygonGeographicArea:
Collaboration diagram for gem::PolygonGeographicArea:

Public Member Functions

 PolygonGeographicArea ()
 Default constructor.
 PolygonGeographicArea (CoordinatesList const &coords)
 Constructs a PolygonGeographicArea object with a list of coordinates.
 PolygonGeographicArea (Api *api)
 Constructs a PolygonGeographicArea object by directly associating it with an existing API interface.
 PolygonGeographicArea (const Api &api)
 Constructs a PolygonGeographicArea object from an existing API interface by copying.
 PolygonGeographicArea (const PolygonGeographicArea &other)=default
 Copy constructor.
 PolygonGeographicArea (PolygonGeographicArea &&other) noexcept
 Move constructor.
PolygonGeographicAreaoperator= (const PolygonGeographicArea &other)=default
 Copy assignment operator.
PolygonGeographicAreaoperator= (PolygonGeographicArea &&other) noexcept
 Move assignment operator.
CoordinatesList getCoordinates () const noexcept
 Retrieves the coordinates that define the polygon.
PolygonGeographicAreasetCoordinates (CoordinatesList const &list) noexcept
 Sets the coordinates that define the polygon.
EGeographicAreaType type () const
 Retrieves the specific type of the geographic area.
bool containsCoordinates (Coordinates const &point) const
 Checks if the specified point is contained within the geographic area.
RectangleGeographicArea getBoundingBox () const noexcept
 Get the bounding box.
Coordinates getCenterPoint () const noexcept
 Retrieves the center point of the geographic area.
bool equals (GeographicArea const &other) const noexcept
 Checks if two geographic areas are considered equal.
bool operator== (const GeographicArea &area) const noexcept
 Equality comparison operator for geographic areas.
bool operator!= (const GeographicArea &area) const noexcept
 Inequality comparison operator for geographic areas.
template<typename TSubclass>
TSubclass cast () const noexcept
 Attempts to cast the current geographic area object to a specified subclass.
bool isDefault () const override
 Determines if the current geographic area object is in its default state (unaltered since creation).
 operator bool () const noexcept
 Boolean conversion operator indicating if the geographic area is valid and not in its default state.
bool isEmpty () const noexcept
 Checks if the geographic area is empty.
void reset () noexcept
 Resets the geographic area object to its default state.
int convert (GeographicArea &area) const noexcept
 Converts the geographic area to another type, if possible.

Static Public Member Functions

static constexpr EGeographicAreaType type () noexcept
 Retrieves the static type of the geographic area as a polygon.

Detailed Description

PolygonGeographicArea object.

Implements share-read / copy-on-write Api object over IPolygonGeographicArea.

Constructor & Destructor Documentation

◆ PolygonGeographicArea() [1/6]

gem::PolygonGeographicArea::PolygonGeographicArea ( )
inline

Default constructor.

Initializes a new instance of the PolygonGeographicArea class without setting coordinates.

◆ PolygonGeographicArea() [2/6]

gem::PolygonGeographicArea::PolygonGeographicArea ( CoordinatesList const & coords)
inline

Constructs a PolygonGeographicArea object with a list of coordinates.

Parameters
coordsA list of coordinates defining the polygon.

◆ PolygonGeographicArea() [3/6]

gem::PolygonGeographicArea::PolygonGeographicArea ( Api * api)
inline

Constructs a PolygonGeographicArea object by directly associating it with an existing API interface.

Note
This constructor is typically used internally and may be hidden from external documentation.
Parameters
apiPointer to an existing Api interface to associate with this polygon.

◆ PolygonGeographicArea() [4/6]

gem::PolygonGeographicArea::PolygonGeographicArea ( const Api & api)
inline

Constructs a PolygonGeographicArea object from an existing API interface by copying.

Note
This constructor is typically used internally and may be hidden from external documentation.
Parameters
apiReference to an existing Api interface to associate with this polygon.

◆ PolygonGeographicArea() [5/6]

gem::PolygonGeographicArea::PolygonGeographicArea ( const PolygonGeographicArea & other)
default

Copy constructor.

Creates a copy of an existing PolygonGeographicArea object.

Parameters
otherThe object to copy.

◆ PolygonGeographicArea() [6/6]

gem::PolygonGeographicArea::PolygonGeographicArea ( PolygonGeographicArea && other)
inlinenoexcept

Move constructor.

Moves an existing PolygonGeographicArea object into a new instance.

Parameters
otherThe object to move into this new instance.

Member Function Documentation

◆ cast()

template<typename TSubclass>
TSubclass gem::GeographicArea::cast ( ) const
inlinenoexceptinherited

Attempts to cast the current geographic area object to a specified subclass.

This is a template method.

Template Parameters
TSubclassThe subclass type to cast to.
Returns
An object of type TSubclass if the cast is successful; otherwise, a default-constructed object of TSubclass.

◆ containsCoordinates()

bool gem::GeographicArea::containsCoordinates ( Coordinates const & point) const
inlineinherited

Checks if the specified point is contained within the geographic area.

Parameters
pointA Coordinates object representing the point to check.
Returns
True if the point is within the geographic area, false otherwise.

◆ convert()

int gem::GeographicArea::convert ( GeographicArea & area) const
inlinenoexceptinherited

Converts the geographic area to another type, if possible.

Parameters
areaA GeographicArea object to convert to.
Returns
An integer indicating the success or failure of the conversion.

◆ equals()

bool gem::GeographicArea::equals ( GeographicArea const & other) const
inlinenoexceptinherited

Checks if two geographic areas are considered equal.

Parameters
otherAnother GeographicArea object for comparison.
Returns
true if the areas are equal, false otherwise.

◆ getBoundingBox()

RectangleGeographicArea gem::GeographicArea::getBoundingBox ( ) const
inlinenoexceptinherited

Get the bounding box.

This is the smallest rectangle that can be drawn around the area such that it surrounds this geographic area completely.

If the area is bigger than what is allowed in the WGS 84 coordinate system, the rectangle is truncated to valid WGS 84 coordinate values. The RectangleGeographicArea is always aligned with parallels and meridians.

Returns
A RectangleGeographicArea object representing the bounding box.

◆ getCenterPoint()

Coordinates gem::GeographicArea::getCenterPoint ( ) const
inlinenoexceptinherited

Retrieves the center point of the geographic area.

Calculates and returns the geographic center of the area.

Returns
Coordinates object representing the center point of the area.

◆ getCoordinates()

CoordinatesList gem::PolygonGeographicArea::getCoordinates ( ) const
inlinenoexcept

Retrieves the coordinates that define the polygon.

Returns
A list of coordinates defining the polygon.

◆ isDefault()

bool gem::GeographicArea::isDefault ( ) const
inlineoverrideinherited

Determines if the current geographic area object is in its default state (unaltered since creation).

Returns
true if the object is default, false otherwise.

◆ isEmpty()

bool gem::GeographicArea::isEmpty ( ) const
inlinenoexceptinherited

Checks if the geographic area is empty.

Returns
true if the area is empty, false otherwise.

◆ operator bool()

gem::GeographicArea::operator bool ( ) const
inlineexplicitnoexceptinherited

Boolean conversion operator indicating if the geographic area is valid and not in its default state.

Returns
true if the object is valid and not default, false otherwise.

◆ operator!=()

bool gem::GeographicArea::operator!= ( const GeographicArea & area) const
inlinenoexceptinherited

Inequality comparison operator for geographic areas.

Parameters
areaAnother GeographicArea object to compare against.
Returns
true if the areas are not equal, false otherwise.

◆ operator=() [1/2]

PolygonGeographicArea & gem::PolygonGeographicArea::operator= ( const PolygonGeographicArea & other)
default

Copy assignment operator.

Replaces the contents of this object with a copy of another PolygonGeographicArea object.

Parameters
otherThe object to copy.
Returns
A reference to this updated instance.

◆ operator=() [2/2]

PolygonGeographicArea & gem::PolygonGeographicArea::operator= ( PolygonGeographicArea && other)
inlinenoexcept

Move assignment operator.

Moves another PolygonGeographicArea object into this instance.

Parameters
otherThe object to move into this instance.
Returns
A reference to this updated instance.

◆ operator==()

bool gem::GeographicArea::operator== ( const GeographicArea & area) const
inlinenoexceptinherited

Equality comparison operator for geographic areas.

Parameters
areaAnother GeographicArea object to compare against.
Returns
true if the areas are equal, false otherwise.

◆ setCoordinates()

PolygonGeographicArea & gem::PolygonGeographicArea::setCoordinates ( CoordinatesList const & list)
inlinenoexcept

Sets the coordinates that define the polygon.

Parameters
listA list of coordinates to define the polygon.
Returns
A reference to this PolygonGeographicArea instance.

◆ type() [1/2]

EGeographicAreaType gem::GeographicArea::type ( ) const
inlineinherited

Retrieves the specific type of the geographic area.

Returns
The type of the geographic area as an EGeographicAreaType enumeration.

◆ type() [2/2]

constexpr EGeographicAreaType gem::PolygonGeographicArea::type ( )
inlinestaticconstexprnoexcept

Retrieves the static type of the geographic area as a polygon.

Returns
The geographic area type as EGeographicAreaType.