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

Projection_MGRS object. More...

Inheritance diagram for gem::Projection_MGRS:
Collaboration diagram for gem::Projection_MGRS:

Public Member Functions

 Projection_MGRS ()
 Default constructor.
 Projection_MGRS (const Projection_MGRS &)=default
 Default copy constructor.
 Projection_MGRS (Projection_MGRS &&obj) noexcept
 Default move constructor.
Projection_MGRSoperator= (const Projection_MGRS &)=default
 Default copy assignment.
Projection_MGRSoperator= (Projection_MGRS &&obj) noexcept
 Default move assignment.
 Projection_MGRS (int easting, int northing, const String &zone, const String &sq100kIdentifier)
 Constructs a Projection_MGRS object from easting, northing, zone and hundred square identifier.
Projection_MGRSset (int easting, int northing, const String &zone, const String &sq100kIdentifier) noexcept
 Sets the easting, northing, zone and hundred square identifier of the point.
int getEasting () const noexcept
 Retrieves the easting of the point.
int getNorthing () const noexcept
 Retrieves the northing of the point.
const StringRef getZone () const noexcept
 Retrieves the zone of the point.
const StringRef getSq100kIdentifier () const noexcept
 Retrieves an identifier unique for each one hundred square kilometers.
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.

Static Public Member Functions

static constexpr EProjectionType type () noexcept
 Get the type of the projection.

Detailed Description

Projection_MGRS object.

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

Constructor & Destructor Documentation

◆ Projection_MGRS() [1/3]

gem::Projection_MGRS::Projection_MGRS ( const Projection_MGRS & )
default

Default copy constructor.

Creates a copy of an existing Projection_MGRS object.

◆ Projection_MGRS() [2/3]

gem::Projection_MGRS::Projection_MGRS ( Projection_MGRS && obj)
inlinenoexcept

Default move constructor.

Moves an existing Projection_MGRS object into a new instance.

Parameters
objThe object to move into this new instance.

◆ Projection_MGRS() [3/3]

gem::Projection_MGRS::Projection_MGRS ( int easting,
int northing,
const String & zone,
const String & sq100kIdentifier )
inline

Constructs a Projection_MGRS object from easting, northing, zone and hundred square identifier.

Parameters
eastingRepresents the easting of the point.
northingRepresents the northing of the point.
zoneIdentifier of the point.
sq100kIdentifierHundred square kilometer identifier of the point. Two letters.

Member Function Documentation

◆ cast()

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

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
inlinenoexceptinherited

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.

◆ getEasting()

int gem::Projection_MGRS::getEasting ( ) const
inlinenoexcept

Retrieves the easting of the point.

Returns
x representing the easting of the point.

◆ getNorthing()

int gem::Projection_MGRS::getNorthing ( ) const
inlinenoexcept

Retrieves the northing of the point.

Returns
y representing the northing of the point.

◆ getSq100kIdentifier()

const StringRef gem::Projection_MGRS::getSq100kIdentifier ( ) const
inlinenoexcept

Retrieves an identifier unique for each one hundred square kilometers.

Returns
hundred square identifier in a string format.

◆ getZone()

const StringRef gem::Projection_MGRS::getZone ( ) const
inlinenoexcept

Retrieves the zone of the point.

Returns
zone of the point in a string format.

◆ isDefault()

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

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
inlinenoexceptinherited

Checks if the projection is empty.

Returns
true if the projection is empty, false otherwise.

◆ operator bool()

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

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
inlinenoexceptinherited

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_MGRS & gem::Projection_MGRS::operator= ( const Projection_MGRS & )
default

Default copy assignment.

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

Returns
A reference to this updated instance.

◆ operator=() [2/2]

Projection_MGRS & gem::Projection_MGRS::operator= ( Projection_MGRS && obj)
inlinenoexcept

Default move assignment.

Moves another Projection_MGRS object into this instance.

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

◆ operator==()

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

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.

◆ set()

Projection_MGRS & gem::Projection_MGRS::set ( int easting,
int northing,
const String & zone,
const String & sq100kIdentifier )
inlinenoexcept

Sets the easting, northing, zone and hundred square identifier of the point.

Parameters
eastingRepresents the easting of the point.
northingRepresents the northing of the point.
zoneIdentifier of the point.
sq100kIdentifierHundred square kilometer identifier of the point. Two letters.
Returns
Reference to the current Projection_MGRS object.

◆ type() [1/2]

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

Retrieves the specific type of the projection.

Returns
The type of the projection as an EProjectionType enumeration.

◆ type() [2/2]

constexpr EProjectionType gem::Projection_MGRS::type ( )
inlinestaticconstexprnoexcept

Get the type of the projection.

Returns
The type of the projection as a projection type.