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

Projection_BNG object. More...

Inheritance diagram for gem::Projection_BNG:
Collaboration diagram for gem::Projection_BNG:

Public Member Functions

 Projection_BNG ()
 Default constructor.
 Projection_BNG (const Projection_BNG &)=default
 Default copy constructor.
 Projection_BNG (Projection_BNG &&obj) noexcept
 Default move constructor.
Projection_BNGoperator= (const Projection_BNG &)=default
 Default copy assignment.
Projection_BNGoperator= (Projection_BNG &&obj) noexcept
 Default move assignment.
 Projection_BNG (double easting, double northing)
 Constructs using easting and northing of the point.
 Projection_BNG (const String &gridReference)
 Constructs the point by using British National Grid reference.
Projection_BNGset (double easting, double northing) noexcept
 Sets the horizontal and vertical axis of the point.
Projection_BNGset (const String &gridReference) noexcept
 Sets the grid reference of the point.
const StringRef getGridReference () const noexcept
 Retrieves the grid reference of the point.
double getEasting () const noexcept
 Retrieves the easting of the point.
double getNorthing () const noexcept
 Retrieves the northing of the point.
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_BNG object.

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

Constructor & Destructor Documentation

◆ Projection_BNG() [1/4]

gem::Projection_BNG::Projection_BNG ( const Projection_BNG & )
default

Default copy constructor.

Creates a copy of an existing Projection_BNG object.

◆ Projection_BNG() [2/4]

gem::Projection_BNG::Projection_BNG ( Projection_BNG && obj)
inlinenoexcept

Default move constructor.

Moves an existing Projection_BNG object into a new instance.

Parameters
objThe object to move into this new instance.

◆ Projection_BNG() [3/4]

gem::Projection_BNG::Projection_BNG ( double easting,
double northing )
inline

Constructs using easting and northing of the point.

Parameters
eastingHorizontal axis of the point.
northingVertical axis of the point.

◆ Projection_BNG() [4/4]

gem::Projection_BNG::Projection_BNG ( const String & gridReference)
inline

Constructs the point by using British National Grid reference.

Parameters
gridReferenceNaming reference from the British National Grid. Ensures that the gridReference form a valid point.

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()

double gem::Projection_BNG::getEasting ( ) const
inlinenoexcept

Retrieves the easting of the point.

Returns
The easting of the British National Grid point.

◆ getGridReference()

const StringRef gem::Projection_BNG::getGridReference ( ) const
inlinenoexcept

Retrieves the grid reference of the point.

Returns
The British National Grid name.

◆ getNorthing()

double gem::Projection_BNG::getNorthing ( ) const
inlinenoexcept

Retrieves the northing of the point.

Returns
The northing of the British National Grid point.

◆ 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_BNG & gem::Projection_BNG::operator= ( const Projection_BNG & )
default

Default copy assignment.

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

Returns
A reference to this updated instance.

◆ operator=() [2/2]

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

Default move assignment.

Moves another Projection_BNG 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() [1/2]

Projection_BNG & gem::Projection_BNG::set ( const String & gridReference)
inlinenoexcept

Sets the grid reference of the point.

Parameters
gridReferenceof the point.
Returns
Reference to the current Projection_BNG object.

◆ set() [2/2]

Projection_BNG & gem::Projection_BNG::set ( double easting,
double northing )
inlinenoexcept

Sets the horizontal and vertical axis of the point.

Parameters
eastingHorizontal axis of the point.
northingVertical axis of the point.
Returns
Reference to the current Projection_BNG 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_BNG::type ( )
inlinestaticconstexprnoexcept

Get the type of the projection.

Returns
The type of the projection as a projection type.