LayerList Class Reference

Manages layers associated with a raster data set. More...

#include <LayerList.h>

Inheritance diagram for LayerList:

Inheritance graph

List of all members.

Public Member Functions

virtual RasterElementgetPrimaryRasterElement () const =0
virtual bool containsLayer (Layer *pLayer) const =0
virtual LayergetLayer (const LayerType &layerType, const DataElement *pElement) const =0
virtual LayergetLayer (const LayerType &layerType, const DataElement *pElement, const std::string &layerName) const =0
virtual void getLayers (LayerType layerType, std::vector< Layer * > &layers) const =0
virtual void getLayers (std::vector< Layer * > &layers) const =0
virtual std::vector< Layer * > getLayers () const =0
virtual std::vector< Layer * > getLayers (const LocationType &worldCoord) const =0
virtual std::vector< Layer * > getLayers (LayerType layerType) const =0
virtual std::vector< Layer * > getLayers (LayerType layerType, const LocationType &worldCoord) const =0
virtual unsigned int getNumLayers (LayerType layerType) const =0
virtual unsigned int getNumLayers () const =0
virtual unsigned int getNumLayers (const LocationType &worldCoord) const =0
virtual unsigned int getNumLayers (LayerType layerType, const LocationType &worldCoord) const =0
virtual bool renameLayer (Layer *pLayer) const =0
virtual bool renameLayer (Layer *pLayer, const std::string &newName) const =0

Static Public Member Functions

static const std::string & signalLayerAdded ()
static const std::string & signalLayerDeleted ()

Protected Member Functions

virtual ~LayerList ()


Detailed Description

Manages layers associated with a raster data set.

The layer list manages layers associated with a data set. The layer list is contained within a spatial data view to provide access to draw the layers.

This subclass of Subject will notify upon the following conditions:

See also:
RasterElement, SpatialDataView

Definition at line 39 of file LayerList.h.


Constructor & Destructor Documentation

virtual LayerList::~LayerList (  )  [protected, virtual]

A plug-in cannot create this object, it can only retrieve an already existing object from SpatialDataView::getLayerList.

The SpatialDataView will manage any instances of this object.

Definition at line 310 of file LayerList.h.


Member Function Documentation

static const std::string& LayerList::signalLayerAdded (  )  [static]

Emitted with boost::any<Layer*> when a layer is added.

Definition at line 45 of file LayerList.h.

static const std::string& LayerList::signalLayerDeleted (  )  [static]

Emitted with boost::any<Layer*> when a layer is deleted from the list.

Definition at line 50 of file LayerList.h.

virtual RasterElement* LayerList::getPrimaryRasterElement (  )  const [pure virtual]

Returns the primary RasterElement associated with the list.

Returns:
The primary RasterElement associated with the list. NULL is returned if there is no primary RasterElement.
See also:
RasterElement

virtual bool LayerList::containsLayer ( Layer pLayer  )  const [pure virtual]

Queries whether the list contains a given layer.

Parameters:
pLayer The layer to query for its existence. Cannot be NULL.
Returns:
TRUE if the layer is contained in the list, otherwise FALSE.

virtual Layer* LayerList::getLayer ( const LayerType layerType,
const DataElement pElement 
) const [pure virtual]

Retrieves a layer in the list.

Parameters:
layerType The layer type.
pElement The data element used as the basis for drawing the layer.
Returns:
A pointer to the existing layer, which can be safely cast to a derived layer class according to its layer type. NULL is returned if a layer with the given parameters does not exist in the list.
See also:
getLayers()

virtual Layer* LayerList::getLayer ( const LayerType layerType,
const DataElement pElement,
const std::string &  layerName 
) const [pure virtual]

Retrieves a layer in the list.

Parameters:
layerType The layer type.
pElement The data element used as the basis for drawing the layer. If NULL is passed in, the layer with the given name and type is returned.
layerName The layer name. If the name is empty, the name of the data element is used.
Returns:
A pointer to the existing layer, which can be safely cast to a derived layer class according to its layer type. NULL is returned if a layer with the given parameters does not exist in the list.
See also:
getLayers()

virtual void LayerList::getLayers ( LayerType  layerType,
std::vector< Layer * > &  layers 
) const [pure virtual]

Retrieves all layers of a given type in the list.

Parameters:
layerType The layer type.
layers A vector that is populated with pointers to the layers of the given type contained in the list.
Deprecated:
This method is deprecated and may be removed in a future version. Use getLayers(LayerType) const instead, which returns a vector by value.

virtual void LayerList::getLayers ( std::vector< Layer * > &  layers  )  const [pure virtual]

Retrieves all layers in the list.

Parameters:
layers A vector that is populated with pointers to all layers contained in the list.
Deprecated:
This method is deprecated and may be removed in a future version. Use getLayers() const instead, which returns a vector by value.

virtual std::vector<Layer*> LayerList::getLayers (  )  const [pure virtual]

Retrieves all layers in the list.

Returns:
A vector containing pointers to all layers in the list.
See also:
getLayers(const LocationType&) const, getLayers(LayerType) const, getLayers(LayerType, const LocationType&) const

virtual std::vector<Layer*> LayerList::getLayers ( const LocationType worldCoord  )  const [pure virtual]

Retrieves all layers at a given pixel coordinate in the list.

Parameters:
worldCoord The pixel coordinate in world coordinates.
Returns:
A vector containing pointers to the layers in the list whose extents include the given pixel coordinate.
See also:
getLayers() const, getLayers(LayerType) const, getLayers(LayerType, const LocationType&) const, Layer::getExtents()

virtual std::vector<Layer*> LayerList::getLayers ( LayerType  layerType  )  const [pure virtual]

Retrieves all layers of a given type in the list.

Parameters:
layerType The layer type.
Returns:
A vector containing pointers to the layers of the given type in the list.
See also:
getLayers()const, getLayers(const LocationType&) const, getLayers(LayerType, const LocationType&) const

virtual std::vector<Layer*> LayerList::getLayers ( LayerType  layerType,
const LocationType worldCoord 
) const [pure virtual]

Retrieves all layers of a given type at a given pixel coordinate in the list.

Parameters:
layerType The layer type.
worldCoord The pixel coordinate in world coordinates.
Returns:
A vector containing pointers to the layers of the given type in the list whose extents include the given pixel coordinate.
See also:
getLayers() const, getLayers(LayerType) const, getLayers(const LocationType&) const, Layer::getExtents()

virtual unsigned int LayerList::getNumLayers ( LayerType  layerType  )  const [pure virtual]

Returns the number of layers in the list of a given type.

Parameters:
layerType The layer type for which to get the number of layers contained in the list.
Returns:
The number of layers contained in the list of the given type.
See also:
getNumLayers() const, getNumLayers(const LocationType&) const, getNumLayers(LayerType, const LocationType&) const

virtual unsigned int LayerList::getNumLayers (  )  const [pure virtual]

Returns the total number of layers in the list.

Returns:
The total number of layers contained in the list.
See also:
getNumLayers(LayerType) const, getNumLayers(const LocationType&) const, getNumLayers(LayerType, const LocationType&) const

virtual unsigned int LayerList::getNumLayers ( const LocationType worldCoord  )  const [pure virtual]

Returns the number of layers in the list at a given pixel coordinate.

Parameters:
worldCoord The pixel coordinate in world coordinates.
Returns:
The number of layers contained in the list whose extents include the given pixel coordinate.
See also:
getNumLayers() const, getNumLayers(LayerType) const, getNumLayers(LayerType, const LocationType&) const, Layer::getExtents()

virtual unsigned int LayerList::getNumLayers ( LayerType  layerType,
const LocationType worldCoord 
) const [pure virtual]

Returns the number of layers of a given type at a given pixel coordinate in the list.

Parameters:
layerType The layer type.
worldCoord The pixel coordinate in world coordinates.
Returns:
The number of layers contained in the list of the given type whose extents include the given pixel coordinate.
See also:
getNumLayers() const, getNumLayers(LayerType) const, getNumLayers(const LocationType&) const, Layer::getExtents()

virtual bool LayerList::renameLayer ( Layer pLayer  )  const [pure virtual]

Renames a layer to a user-defined name.

This method prompts the user to select a new layer name and renames the layer. The user selected name is guaranteed to be unique within the layer list for the layer type.

Parameters:
pLayer The layer to rename, which must be contained within the layer list. This method does nothing and returns false if NULL is passed in.
Returns:
Returns true if the layer was successfully renamed. Returns false if the layer does not exist in the layer list or if the user cancels the dialog to select a new name.
See also:
renameLayer(Layer*, const std::string&) const, Layer::rename()

virtual bool LayerList::renameLayer ( Layer pLayer,
const std::string &  newName 
) const [pure virtual]

Renames a layer to a given name.

Parameters:
pLayer The layer to rename, which must be contained within the layer list. This method does nothing and returns false if NULL is passed in.
newName The new name for the layer, which must be unique within the layer list for the layer type. This method does nothing and returns false if an empty string is passed in.
Returns:
Returns true if the layer was successfully renamed. Returns false if another layer of the same type in the layer list already has the given name.
See also:
renameLayer(Layer*) const, Layer::rename()


Software Development Kit - Opticks 4.9.0 Build 16218