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

Marker. More...

Inheritance diagram for gem::Marker:
Collaboration diagram for gem::Marker:

Public Member Functions

 Marker ()=default
 Default constructor.
 Marker (const Marker &v)
 Default copy constructor.
 Marker (Marker &&marker)=default
 Default move constructor noexcept is deduced.
 Marker (std::initializer_list< double > ilist)
 Construct from initializer list.
 Marker (CoordinatesList const &coords)
 Construct from a list of coordinates.
 Marker (const Coordinates &center, int radius)
 Construct a circle shape marker.
 Marker (const Coordinates &center, int horizRadius, int vertRadius)
 Construct a rectangle shape marker.
 Marker (const Coordinates &pt1, const Coordinates &pt2)
 Construct a rectangle shape marker.
 Marker (const GeographicArea &area)
 Construct a marker from a geographic area.
 Marker (const Coordinates &coordinates, const String &name)
 Construct a marker from coordinates and name.
Markeroperator= (const Marker &v)
 Default copy assignment.
Markeroperator= (Marker &&marker)=default
 Default move assignment noexcept is deduced.
bool operator== (const Marker &marker) const
 Comparison operator equal.
bool operator!= (const Marker &marker) const
 Comparison operator not equal.
LargeInteger getId () const noexcept
 Get marker unique id.
int getPartCount () const noexcept
 Get marker parts count.
int getCoordinatesCount (int part=0) const noexcept
 Get marker coordinates count.
MarkerdelPart (int part) noexcept
 Delete a part from marker.
CoordinatesList getCoordinates (int part=0) const noexcept
 Get marker coordinates list.
RectangleGeographicArea getArea () const noexcept
 Get marker enclosing area.
RectangleGeographicArea getPartArea (int part) const noexcept
 Get marker part enclosing area.
MarkersetCoordinates (const CoordinatesList &coords, int part=0) noexcept
 Set marker part coordinates.
Coordinates getCoordinate (int index, int part) const noexcept
 Get coordinate from the given part, at the given index.
Markeradd (const Coordinates &coord, int index=-1, int part=0) noexcept
 Add a new coordinate to the marker.
Markeradd (const CoordinatesList &coords, int index=-1, int part=0) noexcept
 Add coordinate list to the marker.
Markerdel (int index, int part=0) noexcept
 Delete a coordinate from the marker.
MarkerdelRange (int from, int to=-1, int part=0) noexcept
 Delete a range of coordinates from the marker between given indexes.
Markerupdate (const Coordinates &coord, int index, int part=0) noexcept
 Update a coordinate in the marker.
MarkersetName (const String &name) noexcept
 Set marker name.
MarkersetName (const char *name) noexcept
 Set marker name from a null terminated UTF-8 string.
const StringRef getName () const noexcept
 Get marker name.

Detailed Description

Marker.

Implements share-read / share-write Api object over IMarker

Constructor & Destructor Documentation

◆ Marker() [1/9]

gem::Marker::Marker ( const Marker & v)
inline

Default copy constructor.

Parameters
vMarker

◆ Marker() [2/9]

gem::Marker::Marker ( Marker && marker)
default

Default move constructor noexcept is deduced.

Parameters
markerMarker

◆ Marker() [3/9]

gem::Marker::Marker ( std::initializer_list< double > ilist)
inline

Construct from initializer list.

Parameters
[in]ilistInitializer list

◆ Marker() [4/9]

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

Construct from a list of coordinates.

Parameters
[in]coordsCoordinates list

◆ Marker() [5/9]

gem::Marker::Marker ( const Coordinates & center,
int radius )
inline

Construct a circle shape marker.

Parameters
[in]centerCircle center
[in]radiusCircle radius in meters

◆ Marker() [6/9]

gem::Marker::Marker ( const Coordinates & center,
int horizRadius,
int vertRadius )
inline

Construct a rectangle shape marker.

Parameters
[in]centerRectangle center
[in]horizRadiusHorizontal rectangle radius in meters
[in]vertRadiusVertical rectangle radius in meters

◆ Marker() [7/9]

gem::Marker::Marker ( const Coordinates & pt1,
const Coordinates & pt2 )
inline

Construct a rectangle shape marker.

Parameters
[in]pt1First corner
[in]pt2Second corner

◆ Marker() [8/9]

gem::Marker::Marker ( const GeographicArea & area)
inline

Construct a marker from a geographic area.

Parameters
[in]areaThe geographic area which shape will be converted to marker

◆ Marker() [9/9]

gem::Marker::Marker ( const Coordinates & coordinates,
const String & name )
inline

Construct a marker from coordinates and name.

Parameters
[in]coordinatesThe coordinates of the marker.
[in]nameThe name of the marker.

Member Function Documentation

◆ add() [1/2]

Marker & gem::Marker::add ( const Coordinates & coord,
int index = -1,
int part = 0 )
inlinenoexcept

Add a new coordinate to the marker.

Parameters
[in]coordThe coordinate to be added
[in]indexThe position where the coordinate is added, default -1 ( append at the end )
[in]partThe marker part index to which the function applies, default 0 ( first part )

If part == getPartCount(), a new part is automatically added to the marker and the coordinate is assigned to it

Returns
Marker reference

◆ add() [2/2]

Marker & gem::Marker::add ( const CoordinatesList & coords,
int index = -1,
int part = 0 )
inlinenoexcept

Add coordinate list to the marker.

Parameters
[in]coordsThe coordinates list to be added
[in]indexThe position where the coordinates is added, default -1 ( append at the end )
[in]partThe marker part index to which the function applies, default 0 ( first part )

If part == getPartCount(), a new part is automatically added to the marker and the coordinate is assigned to it

Returns
Marker reference

◆ del()

Marker & gem::Marker::del ( int index,
int part = 0 )
inlinenoexcept

Delete a coordinate from the marker.

Parameters
[in]indexThe position of the deleted coordinate
[in]partThe marker part index to which the function applies, default 0 ( first part )
Returns
Marker reference

◆ delPart()

Marker & gem::Marker::delPart ( int part)
inlinenoexcept

Delete a part from marker.

Parameters
[in]partThe marker part index to be deleted
Returns
Marker reference

◆ delRange()

Marker & gem::Marker::delRange ( int from,
int to = -1,
int part = 0 )
inlinenoexcept

Delete a range of coordinates from the marker between given indexes.

Parameters
[in]fromThe start index of the deleted coordinates list
[in]toThe last index of the deleted coordinates list ( excluding ). If -1, the delete will perform until the end of the coordinates list
[in]partThe marker part index to which the function applies, default 0 ( first part )
Returns
Marker reference

◆ getArea()

RectangleGeographicArea gem::Marker::getArea ( ) const
inlinenoexcept

Get marker enclosing area.

Returns
Marker rectangle geographic area

◆ getCoordinate()

Coordinates gem::Marker::getCoordinate ( int index,
int part ) const
inlinenoexcept

Get coordinate from the given part, at the given index.

Parameters
[in]indexThe coordinate index in the part
[in]partThe marker part index to which the function applies, default 0 ( first part )
Returns
Coordinates object.

◆ getCoordinates()

CoordinatesList gem::Marker::getCoordinates ( int part = 0) const
inlinenoexcept

Get marker coordinates list.

Parameters
[in]partThe marker part index to which the function applies, default 0 ( first part )
Returns
Coordinates list

◆ getCoordinatesCount()

int gem::Marker::getCoordinatesCount ( int part = 0) const
inlinenoexcept

Get marker coordinates count.

Parameters
[in]partThe marker part index to which the function applies, default 0 ( first part )
Returns
Coordinates count if part is valid otherwise error::KInvalidInput

◆ getId()

LargeInteger gem::Marker::getId ( ) const
inlinenoexcept

Get marker unique id.

Returns
Marker id

◆ getName()

const StringRef gem::Marker::getName ( ) const
inlinenoexcept

Get marker name.

Returns
Marker name

◆ getPartArea()

RectangleGeographicArea gem::Marker::getPartArea ( int part) const
inlinenoexcept

Get marker part enclosing area.

Parameters
[in]partThe marker part index to which the function applies
Returns
Marker rectangle geographic area

◆ getPartCount()

int gem::Marker::getPartCount ( ) const
inlinenoexcept

Get marker parts count.

Returns
Marker parts count

◆ operator!=()

bool gem::Marker::operator!= ( const Marker & marker) const
inline

Comparison operator not equal.

Parameters
[in]markerMarker
Returns
true if not equal

◆ operator=() [1/2]

Marker & gem::Marker::operator= ( const Marker & v)
inline

Default copy assignment.

Parameters
[in]vMarker
Returns
Marker reference

◆ operator=() [2/2]

Marker & gem::Marker::operator= ( Marker && marker)
default

Default move assignment noexcept is deduced.

Parameters
markerMarker
Returns
Marker reference

◆ operator==()

bool gem::Marker::operator== ( const Marker & marker) const
inline

Comparison operator equal.

Parameters
[in]markerMarker
Returns
true if equal

◆ setCoordinates()

Marker & gem::Marker::setCoordinates ( const CoordinatesList & coords,
int part = 0 )
inlinenoexcept

Set marker part coordinates.

Parameters
[in]coordsThe coordinates list to be set as marker part
[in]partThe marker part index to which the function applies, default 0 ( first part )

If part == getPartCount(), a new part is automatically added to the marker and the coordinate is assigned to it

Returns
Marker reference

◆ setName() [1/2]

Marker & gem::Marker::setName ( const char * name)
inlinenoexcept

Set marker name from a null terminated UTF-8 string.

Provided for speed reasons as the SDK keeps the name in UTF8 format

Parameters
[in]nameMarker name
Returns
Marker reference

◆ setName() [2/2]

Marker & gem::Marker::setName ( const String & name)
inlinenoexcept

Set marker name.

Parameters
[in]nameMarker name
Returns
Marker reference

◆ update()

Marker & gem::Marker::update ( const Coordinates & coord,
int index,
int part = 0 )
inlinenoexcept

Update a coordinate in the marker.

Parameters
[in]coordThe new coordinate value
[in]indexThe position of the updated coordinate
[in]partThe marker part index to which the function applies, default 0 ( first part )
Returns
Marker reference