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

Handles coordinate system conversions. More...

Inheritance diagram for gem::Projection:
Collaboration diagram for gem::Projection:

Public Member Functions

 Projection (const Projection &)=default
 Default copy constructor.
 Projection (Projection &&)=default
 Default move constructor noexcept is deduced.
Projectionoperator= (const Projection &)=default
 Copy assignment operator.
Projectionoperator= (Projection &&)=default
 Move assignment operator.
EProjectionType type () const
 Retrieves the specific type of the projection.
bool equals (Projection const &other) const noexcept
 Compares two Projection objects for equality.
bool operator== (const Projection &projection) const noexcept
 Compares two Projection objects for equality.
bool operator!= (const Projection &projection) const noexcept
 Inequality comparison operator for projections.
template<typename TSubclass>
TSubclass cast () const noexcept
 Attempts to cast the current projection object to a specified subclass.
bool isDefault () const override
 Determines if the current projection object is in its default state (unaltered since creation).
 operator bool () const noexcept
 Boolean conversion operator indicating if the projection is valid and not in its default state.
bool isEmpty () const noexcept
 Checks if the projection is empty.
void reset () noexcept
 Reset the projection object to its default state.

Detailed Description

Handles coordinate system conversions.

Implements share-read / copy-on-write ApiType object over IProjection.

Transforms between geographic coordinates (lat/long) and map projection coordinates, enabling accurate placement of objects.

Member Function Documentation

◆ cast()

template<typename TSubclass>
TSubclass gem::Projection::cast ( ) const
inlinenoexcept

Attempts to cast the current projection 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.

◆ equals()

bool gem::Projection::equals ( Projection const & other) const
inlinenoexcept

Compares two Projection objects for equality.

Parameters
otherAnother Projection object to compare against.
Returns
True if both Projection objects represent the same data, false otherwise.

◆ isDefault()

bool gem::Projection::isDefault ( ) const
inlineoverride

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

Returns
true if the object is default, false otherwise.

◆ isEmpty()

bool gem::Projection::isEmpty ( ) const
inlinenoexcept

Checks if the projection is empty.

Returns
true if the projection is empty, false otherwise.

◆ operator bool()

gem::Projection::operator bool ( ) const
inlineexplicitnoexcept

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

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

◆ operator!=()

bool gem::Projection::operator!= ( const Projection & projection) const
inlinenoexcept

Inequality comparison operator for projections.

Parameters
projectionAnother Projection object to compare against.
Returns
true if the projections are not equal, false otherwise.

◆ operator=() [1/2]

Projection & gem::Projection::operator= ( const Projection & )
default

Copy assignment operator.

Replaces the current object's contents with another Projection object's contents.

Returns
A reference to the current object after assignment.

◆ operator=() [2/2]

Projection & gem::Projection::operator= ( Projection && )
default

Move assignment operator.

Transfers the contents of another Projection object to this one.

Returns
A reference to the current object after assignment.

◆ operator==()

bool gem::Projection::operator== ( const Projection & projection) const
inlinenoexcept

Compares two Projection objects for equality.

Parameters
projectionAnother Projection object to compare against.
Returns
True if both Projection objects represent the same data, false otherwise.

◆ type()

EProjectionType gem::Projection::type ( ) const
inline

Retrieves the specific type of the projection.

Returns
The type of the projection as an EProjectionType enumeration.