LuciadCPillar 2023.1.05
luciad::MgrsGridLayer Class Referencefinal

Military Grid Reference System (MGRS) grid layer that can be added to a map. More...

#include <luciad/layers/grids/mgrs/MgrsGridLayer.h>

Inheritance diagram for luciad::MgrsGridLayer:
luciad::GridLayer luciad::Layer

Classes

class  Builder
 Builder for creating a luciad::MgrsGridLayer. More...
 

Public Member Functions

 ~MgrsGridLayer () override
 
void addObserver (std::shared_ptr< ILayerObserver > layerObserver) override
 Adds an observer that allows to receive change events from this layer. More...
 
const std::string & getTitle () const override
 Returns the layer's title. More...
 
bool isLabeled () const override
 Returns whether this layer displays labels. More...
 
bool isVisible () const override
 Returns whether this layer is visible. More...
 
void removeObserver (const std::shared_ptr< ILayerObserver > &layerObserver) override
 Removes the given observer. More...
 
void setLabeled (bool labeled) override
 Sets whether this layer displays labels. More...
 
void setTitle (std::string title) override
 Sets the layer's title. More...
 
void setVisible (bool visible) override
 Sets whether this layer is visible. More...
 
virtual bool isLabeled () const =0
 Returns whether this layer displays labels. More...
 
virtual void setLabeled (bool labeled)=0
 Sets whether this layer displays labels. More...
 
- Public Member Functions inherited from luciad::Layer
 Layer ()
 Default constructor. More...
 
virtual ~Layer ()=default
 
virtual void addObserver (std::shared_ptr< ILayerObserver > layerObserver)=0
 Adds an observer that allows to receive change events from this layer. More...
 
virtual LayerId getId () const
 Returns the layer's unique id. More...
 
virtual const std::string & getTitle () const =0
 Returns the layer's title. More...
 
virtual bool isVisible () const =0
 Returns whether this layer is visible. More...
 
virtual void removeObserver (const std::shared_ptr< ILayerObserver > &layerObserver)=0
 Removes the given observer. More...
 
virtual void setTitle (std::string title)=0
 Sets the layer's title. More...
 
virtual void setVisible (bool visible)=0
 Sets whether this layer is visible. More...
 

Static Public Member Functions

static Builder newBuilder ()
 Returns a new builder for creating a MgrsGridLayer. More...
 
- Static Public Member Functions inherited from luciad::GridLayer
static const std::string & propertyLabeled ()
 Property name for the LayerEvent that is fired as a result of changing the layer's labeled flag. More...
 
- Static Public Member Functions inherited from luciad::Layer
static const std::string & propertyTitle ()
 Property name for the LayerEvent that is fired as a result of changing the layer's title. More...
 
static const std::string & propertyVisible ()
 Property name for the LayerEvent that is fired as a result of changing the layer's visible flag. More...
 

Additional Inherited Members

- Protected Member Functions inherited from luciad::GridLayer
 GridLayer ()
 Default constructor. More...
 

Detailed Description

Military Grid Reference System (MGRS) grid layer that can be added to a map.

Since
2023.1

Constructor & Destructor Documentation

◆ ~MgrsGridLayer()

luciad::MgrsGridLayer::~MgrsGridLayer ( )
override

Member Function Documentation

◆ addObserver()

void luciad::MgrsGridLayer::addObserver ( std::shared_ptr< ILayerObserver layerObserver)
overridevirtual

Adds an observer that allows to receive change events from this layer.

Adding the same observer twice is forbidden, and will cause an exception to be thrown.

Parameters
layerObserveran observer.
Exceptions
luciad::InvalidArgumentExceptionwhen the observer was already added.
luciad::NullArgumentExceptionwhen the observer is nullptr.

Implements luciad::Layer.

◆ getTitle()

const std::string & luciad::MgrsGridLayer::getTitle ( ) const
overridevirtual

Returns the layer's title.

Should be suitable for presenting to the user.

Returns
the layer's title, should be suitable for presenting to the user.

Implements luciad::Layer.

◆ isLabeled()

bool luciad::MgrsGridLayer::isLabeled ( ) const
overridevirtual

Returns whether this layer displays labels.

Returns
whether this layer displays labels.

Implements luciad::GridLayer.

◆ isVisible()

bool luciad::MgrsGridLayer::isVisible ( ) const
overridevirtual

Returns whether this layer is visible.

Returns
whether this layer is visible.

Implements luciad::Layer.

◆ newBuilder()

static Builder luciad::MgrsGridLayer::newBuilder ( )
static

Returns a new builder for creating a MgrsGridLayer.

Returns
a new builder for creating a MgrsGridLayer.

◆ removeObserver()

void luciad::MgrsGridLayer::removeObserver ( const std::shared_ptr< ILayerObserver > &  layerObserver)
overridevirtual

Removes the given observer.

If the given observer was never added, an exception is thrown.

Parameters
layerObserveran observer.
Exceptions
luciad::InvalidArgumentExceptionwhen the observer is not known.
luciad::NullArgumentExceptionwhen the observer is nullptr.

Implements luciad::Layer.

◆ setLabeled()

void luciad::MgrsGridLayer::setLabeled ( bool  labeled)
overridevirtual

Sets whether this layer displays labels.

Parameters
labeledtrue to enable labels.

Implements luciad::GridLayer.

◆ setTitle()

void luciad::MgrsGridLayer::setTitle ( std::string  title)
overridevirtual

Sets the layer's title.

Should be suitable for presenting to the user.

If the new title is indeed different from the old one, a LayerEvent is delivered to the observers with the property name PropertyTitle.

Parameters
titlethe new title.

Implements luciad::Layer.

◆ setVisible()

void luciad::MgrsGridLayer::setVisible ( bool  visible)
overridevirtual

Sets whether this layer is visible.

Changes this layer's visibility. If the new visibility is different from the old one, a LayerEvent is delivered to the observers with the property name PropertyVisible.

Parameters
visiblethe new visibility.

Implements luciad::Layer.