te::map::AbstractLayer Class Referenceabstract

This is the base class for layers. More...

#include <AbstractLayer.h>

Inheritance diagram for te::map::AbstractLayer:
te::common::TreeItem te::common::Counted te::graph::Layer te::map::DataSetAdapterLayer te::map::DataSetLayer te::map::FolderLayer te::map::QueryLayer te::map::RasterLayer te::st::AbstractSTDataSetLayer te::ws::ogc::wms::WMSLayer

Public Types

typedef std::list< TreeItemPtr >::const_iterator const_iterator
 
typedef std::list< TreeItemPtr >::iterator iterator
 

Public Member Functions

 AbstractLayer (AbstractLayer *parent=0)
 It initializes a new layer. More...
 
 AbstractLayer (const std::string &id, AbstractLayer *parent=0)
 It initializes a new layer. More...
 
 AbstractLayer (const std::string &id, const std::string &title, AbstractLayer *parent=0)
 It initializes a new layer. More...
 
void add (const TreeItemPtr &childItem)
 It adds (appends) the item to the end of the children's list. More...
 
void attach ()
 Increases the number of references to this object. More...
 
const_iterator begin () const
 It returns the constant iterator associated to the first child of this item. More...
 
iterator begin ()
 It returns the iterator associated to the first child of this item. More...
 
virtual void clearSelected ()
 It clears the selected group of this Layer. More...
 
virtual void deselect (const te::da::ObjectIdSet *oids)
 It removes the given oids from the selected group of this Layer. More...
 
void detach ()
 Decreases the number of references to this object. Destroy it if there are no more references to it. More...
 
void disconnect ()
 It disconnects this item from its parent, if it has one. More...
 
virtual void draw (Canvas *canvas, const te::gm::Envelope &bbox, int srid, const double &scale, bool *cancel)=0
 It draws the layer geographic objects in the given canvas using the informed SRS. More...
 
const_iterator end () const
 It returns the constant iterator that refers to one past the end of the children of this item. More...
 
iterator end ()
 It returns the iterator that refers to one past the children of this item. More...
 
std::vector< te::map::AbstractLayer * > getAncestors ()
 It returns a list with the ancestors of this layer. More...
 
virtual te::map::ChartgetChart () const
 It returns the Chart associated to the Layer. More...
 
const TreeItemPtr & getChild (std::size_t i) const
 It returns the n-th child. More...
 
const std::list< TreeItemPtr > & getChildren () const
 It returns the children of this tree item. More...
 
std::size_t getChildrenCount () const
 It returns the number of children of this node. More...
 
te::map::CompositionMode getCompositionMode () const
 It returns the composition mode. More...
 
virtual std::auto_ptr< te::da::DataSetgetData (te::common::TraverseType travType=te::common::FORWARDONLY, const te::common::AccessPolicy accessPolicy=te::common::RAccess) const =0
 It gets the dataset identified by the layer name. More...
 
virtual std::auto_ptr< te::da::DataSetgetData (const std::string &propertyName, const te::gm::Envelope *e, te::gm::SpatialRelation r=te::gm::INTERSECTS, te::common::TraverseType travType=te::common::FORWARDONLY, const te::common::AccessPolicy accessPolicy=te::common::RAccess) const =0
 It gets the dataset identified by the layer name using a spatial filter over the specified property. More...
 
virtual std::auto_ptr< te::da::DataSetgetData (const std::string &propertyName, const te::gm::Geometry *g, te::gm::SpatialRelation r, te::common::TraverseType travType=te::common::FORWARDONLY, const te::common::AccessPolicy accessPolicy=te::common::RAccess) const =0
 It gets the dataset identified by the layer name using a spatial filter over the given geometric property. More...
 
virtual std::auto_ptr< te::da::DataSetgetData (te::da::Expression *restriction, te::common::TraverseType travType=te::common::FORWARDONLY, const te::common::AccessPolicy accessPolicy=te::common::RAccess) const =0
 It gets the dataset identified by the layer name using the given restriction. More...
 
virtual std::auto_ptr< te::da::DataSetgetData (const te::da::ObjectIdSet *oids, te::common::TraverseType travType=te::common::FORWARDONLY, const te::common::AccessPolicy accessPolicy=te::common::RAccess) const =0
 It gets the dataset from the given set of objects identification. More...
 
const std::string & getDataSetName () const
 
virtual const std::string & getDataSourceId () const
 
std::vector< te::map::AbstractLayer * > getDescendants ()
 It returns a list with the descendants of this layer. More...
 
void getDescendantsCount (std::size_t &count) const
 It returns the number of nodes that descends from this node. More...
 
te::core::EncodingType getEncoding () const
 It returns the encoding type. More...
 
virtual const te::gm::EnvelopegetExtent () const
 It returns the Layer extent (or minimum bounding box). More...
 
virtual const std::string & getGeomPropertyName () const
 
virtual te::map::GroupinggetGrouping () const
 It returns the Grouping associated to the Layer. More...
 
virtual const std::string & getId () const
 It returns the layer id. More...
 
std::size_t getIndex () const
 It returns the index of this item in the list of children of its parent item. More...
 
TreeItemgetParent () const
 It returns a pointer to the parent of this node. More...
 
virtual std::auto_ptr< LayerSchemagetSchema () const =0
 It returns the layer schema. More...
 
virtual const te::da::ObjectIdSetgetSelected () const
 It returns the selected group of this Layer. More...
 
virtual te::se::StylegetSelectionStyle () const
 It returns the selection Style associated to the layer. More...
 
virtual int getSRID () const
 It returns the Spatial Reference System ID associated to the Layer. More...
 
virtual te::se::StylegetStyle () const
 It returns the Style associated to the layer. More...
 
virtual const std::string & getTitle () const
 It returns the layer title. More...
 
virtual const std::string & getType () const =0
 It returns the layer type. More...
 
virtual Visibility getVisibility () const
 It returns the layer visibility. More...
 
bool hasChildren () const
 It returns true if the item has descendants. More...
 
bool hasVisibilityChanged ()
 It gets the flag that indicates if the layer visibility has changed. More...
 
void insert (std::size_t i, const TreeItemPtr &childItem)
 It inserts an item in the informed position. More...
 
bool isSibling (const TreeItem *item) const
 It checks if the given layer is sibling of this one. More...
 
virtual bool isValid () const =0
 It returns true if the layer can be used for instance to draw, otherwise, it returns false. More...
 
const TreeItemPtr & operator[] (std::size_t i) const
 It returns the n-th child. More...
 
int refCount ()
 Returns the number of references to this object. More...
 
TreeItemPtr remove (std::size_t i)
 It removes the i-th child. More...
 
std::list< TreeItemPtr > remove (std::size_t i, std::size_t count)
 It removes from the given position a certain number of items as children of this item. The items to be removed will be disconnected from this item. More...
 
TreeItemPtr replace (std::size_t i, const TreeItemPtr &childItem)
 It replaces the child item at the given position by the new one. The replaced item will be disconnected from this item. More...
 
virtual void select (te::da::ObjectIdSet *oids)
 It adds the given oids to the selected group of this Layer. More...
 
virtual void setChart (te::map::Chart *chart)
 It sets the Chart associated to the Layer. More...
 
void setCompositionMode (te::map::CompositionMode mode)
 It sets the composition mode. More...
 
void setDataSetName (const std::string &name)
 
virtual void setDataSourceId (const std::string &id)
 
void setEncoding (te::core::EncodingType et)
 It set the encoding type. More...
 
virtual void setExtent (const te::gm::Envelope &mbr)
 It sets the Layer extent (or minimum bounding box). More...
 
virtual void setGeomPropertytName (const std::string &name)
 
virtual void setGrouping (te::map::Grouping *grouping)
 It sets the Grouping associated to the Layer. More...
 
virtual void setId (const std::string &id)
 It sets the layer id. More...
 
virtual void setOutOfDate ()
 Its indicate that the layer schema is out of date. More...
 
virtual void setSelectionStyle (te::se::Style *style)
 It sets the selection Style associated to the layer. More...
 
virtual void setSRID (int srid)
 It sets the Spatial Reference System ID associated to the Layer. More...
 
virtual void setStyle (te::se::Style *style)
 It sets the Style associated to the layer. More...
 
virtual void setTitle (const std::string &title)
 It sets the layer title. More...
 
virtual void setVisibility (Visibility v)
 It sets the layer visibility. More...
 
void setVisibilityAsChanged (bool visChanged)
 It sets that the status of the layer visibility is to be changed or not.. More...
 
void swap (const TreeItemPtr &firstChild, const TreeItemPtr &secondChild)
 It swaps the position of the given children. More...
 
void swap (const TreeItemPtr &sibling)
 It swaps this item with its sibling in their parent node. More...
 
virtual void updateVisibility ()
 It updates the visibility of this layer. More...
 
void updateVisibilityOfAncestors ()
 It updates the visibility of the ancestors of this layer, if any. More...
 
virtual ~AbstractLayer ()
 Virtual destructor. More...
 

Static Public Attributes

static const std::size_t npos
 A value to indicate no match. More...
 

Protected Member Functions

void setParent (TreeItem *parent)
 It sets the parent of this item to the specified one. Don't use this method if you are not sure how to handle all the pointers involved in this operation. More...
 

Protected Attributes

te::map::Chartm_chart
 The chart information. More...
 
std::list< TreeItemPtr > m_children
 Pointers to the items that are children. More...
 
te::map::CompositionMode m_compositionMode
 The composition mode used to merged the canvas. More...
 
std::string m_datasetName
 The dataset name where we will retrieve the layer objects. More...
 
std::string m_datasourceId
 DataSource id. More...
 
te::core::EncodingType m_encoding
 The char encoding of the layer;. More...
 
std::string m_geomPropertyName
 The name of the referenced geometry property. More...
 
te::map::Groupingm_grouping
 The grouping information. More...
 
std::string m_id
 Layer id. More...
 
te::gm::Envelope m_mbr
 The layer bounding box. More...
 
TreeItemm_parent
 A pointer to the parent node. More...
 
te::da::ObjectIdSetm_selected
 The selected group of the layer. More...
 
te::se::Stylem_selectionStyle
 The selection style to be applied to the geographic objects in the layer. More...
 
int m_srid
 The identifier of the layer spatial reference system. More...
 
te::se::Stylem_style
 The style to be applied to the geographic objects in the layer. More...
 
std::string m_title
 A brief description of this Layer that can be used by applications to show a text identifying this layer. More...
 
Visibility m_visibility
 It indicates the layer visibility. More...
 
bool m_visibilityChanged
 It indicates if the layer visibility has changed. More...
 

Detailed Description

This is the base class for layers.

See also
TreeItem, DataSetLayer, QueryLayer, FolderLayer, RasterLayer

Definition at line 76 of file AbstractLayer.h.

Member Typedef Documentation

typedef std::list<TreeItemPtr>::const_iterator te::common::TreeItem::const_iterator
inherited

Definition at line 67 of file TreeItem.h.

typedef std::list<TreeItemPtr>::iterator te::common::TreeItem::iterator
inherited

Definition at line 66 of file TreeItem.h.

Constructor & Destructor Documentation

te::map::AbstractLayer::AbstractLayer ( AbstractLayer parent = 0)

It initializes a new layer.

Parameters
parentThe parent layer (NULL if it has no parent).
te::map::AbstractLayer::AbstractLayer ( const std::string &  id,
AbstractLayer parent = 0 
)

It initializes a new layer.

Parameters
idThe layer id.
parentThe parent layer (NULL if it has no parent).
te::map::AbstractLayer::AbstractLayer ( const std::string &  id,
const std::string &  title,
AbstractLayer parent = 0 
)

It initializes a new layer.

Parameters
idThe layer id.
titleThe title is a brief description about the layer.
parentThe parent layer (NULL if it has no parent).
virtual te::map::AbstractLayer::~AbstractLayer ( )
virtual

Virtual destructor.

Member Function Documentation

void te::common::TreeItem::add ( const TreeItemPtr childItem)
inherited

It adds (appends) the item to the end of the children's list.

If the child item already has a parent, it will be disconnected from it and will be attached to this one.

Parameters
childItemThe item to be added as a child of this item.

The children's list will be increased with one element.

void te::common::Counted::attach ( )
inlineinherited

Increases the number of references to this object.

Definition at line 88 of file Counted.h.

References te::common::Counted::m_refCount.

Referenced by te::common::intrusive_ptr_add_ref().

const_iterator te::common::TreeItem::begin ( ) const
inherited

It returns the constant iterator associated to the first child of this item.

Returns
The constant iterator associated to the first child of this item.
iterator te::common::TreeItem::begin ( )
inherited

It returns the iterator associated to the first child of this item.

Returns
The iterator associated to the first child of this item.
virtual void te::map::AbstractLayer::clearSelected ( )
virtual

It clears the selected group of this Layer.

virtual void te::map::AbstractLayer::deselect ( const te::da::ObjectIdSet oids)
virtual

It removes the given oids from the selected group of this Layer.

Parameters
oidsThe oids that will be removed.
Note
The layer will NOT take the ownership of the given pointer.
void te::common::Counted::detach ( )
inlineinherited

Decreases the number of references to this object. Destroy it if there are no more references to it.

Definition at line 93 of file Counted.h.

References te::common::Counted::m_refCount.

Referenced by te::common::intrusive_ptr_release().

void te::common::TreeItem::disconnect ( )
inherited

It disconnects this item from its parent, if it has one.

virtual void te::map::AbstractLayer::draw ( Canvas canvas,
const te::gm::Envelope bbox,
int  srid,
const double &  scale,
bool *  cancel 
)
pure virtual

It draws the layer geographic objects in the given canvas using the informed SRS.

The informed bounding box can be used to constraint the layer objects to be drawn.

The bbox coordinates must be in the same Spatial Reference System given by srid.

Parameters
canvasThe canvas were the layer objects will be drawn.
bboxThe interest area to render the map.
sridThe SRS to be used to draw the layer objects.
scaleThe current scale of display.

Implemented in te::graph::Layer, te::st::TrajectoryDataSetLayer, te::st::TimeSeriesDataSetLayer, te::st::ObservationDataSetLayer, te::map::RasterLayer, te::map::DataSetLayer, te::ws::ogc::wms::WMSLayer, te::map::DataSetAdapterLayer, te::map::QueryLayer, and te::map::FolderLayer.

const_iterator te::common::TreeItem::end ( ) const
inherited

It returns the constant iterator that refers to one past the end of the children of this item.

Returns
The constant iterator that refers to one past the end of the children of this item.
iterator te::common::TreeItem::end ( )
inherited

It returns the iterator that refers to one past the children of this item.

Returns
The iterator that refers to one past the children of this item.
std::vector<te::map::AbstractLayer*> te::map::AbstractLayer::getAncestors ( )

It returns a list with the ancestors of this layer.

Returns
A list containing the ancestors of this layer.
virtual te::map::Chart* te::map::AbstractLayer::getChart ( ) const
virtual

It returns the Chart associated to the Layer.

Returns
The Chart associated to the Layer.
Note
The caller will NOT take the ownership of the given pointer.
const TreeItemPtr& te::common::TreeItem::getChild ( std::size_t  i) const
inherited

It returns the n-th child.

Parameters
iThe child index.
Returns
It returns a pointer to the specified child node.
const std::list<TreeItemPtr>& te::common::TreeItem::getChildren ( ) const
inherited

It returns the children of this tree item.

Returns
It returns the children list of this tree item.
std::size_t te::common::TreeItem::getChildrenCount ( ) const
inherited

It returns the number of children of this node.

Returns
The number of direct descendants of this node.
te::map::CompositionMode te::map::AbstractLayer::getCompositionMode ( ) const

It returns the composition mode.

Composition modes are used to specify how the pixels in one image, the source, are merged with the pixel in another image, the destination.

Returns
The composition mode enum.
virtual std::auto_ptr<te::da::DataSet> te::map::AbstractLayer::getData ( te::common::TraverseType  travType = te::common::FORWARDONLY,
const te::common::AccessPolicy  accessPolicy = te::common::RAccess 
) const
pure virtual

It gets the dataset identified by the layer name.

Parameters
travTypeThe traverse type associated to the returned dataset.
accessPolicyAccess policy.
Returns
The caller of this method will take the ownership of the returned dataset.
Exceptions
ExceptionIt can throws an exception if:
  • something goes wrong during the data retrieval
  • if the data source driver doesn't support the traversal type
  • if the data source driver doesn't support the access policy
Note
Not thread-safe!

Implemented in te::st::TrajectoryDataSetLayer, te::graph::Layer, te::st::TimeSeriesDataSetLayer, te::st::ObservationDataSetLayer, te::map::DataSetLayer, te::map::RasterLayer, te::ws::ogc::wms::WMSLayer, te::map::DataSetAdapterLayer, te::map::QueryLayer, and te::map::FolderLayer.

virtual std::auto_ptr<te::da::DataSet> te::map::AbstractLayer::getData ( const std::string &  propertyName,
const te::gm::Envelope e,
te::gm::SpatialRelation  r = te::gm::INTERSECTS,
te::common::TraverseType  travType = te::common::FORWARDONLY,
const te::common::AccessPolicy  accessPolicy = te::common::RAccess 
) const
pure virtual

It gets the dataset identified by the layer name using a spatial filter over the specified property.

Parameters
propertyNameThe name of the spatial property used to apply the spatial filter.
eA rectangle to be used as a spatial filter when retrieving datasets.
rThe spatial relation to be used during the filter.
travTypeThe traverse type associated to the returned dataset.
accessPolicyAccess policy.
Returns
The caller of this method will take the ownership of the returned DataSet.
Exceptions
ExceptionIt can throws an exception if:
  • something goes wrong during data retrieval
  • if the data source driver doesn't support the traversal type
  • if the data source driver doesn't support the access policy
Note
Transactor will not take the ownership of the given envelope.
The envelope coordinates should be in the same coordinate system as the dataset.
Not thread-safe!

Implemented in te::graph::Layer, te::st::TrajectoryDataSetLayer, te::st::TimeSeriesDataSetLayer, te::st::ObservationDataSetLayer, te::map::DataSetLayer, te::map::RasterLayer, te::ws::ogc::wms::WMSLayer, te::map::DataSetAdapterLayer, te::map::QueryLayer, and te::map::FolderLayer.

virtual std::auto_ptr<te::da::DataSet> te::map::AbstractLayer::getData ( const std::string &  propertyName,
const te::gm::Geometry g,
te::gm::SpatialRelation  r,
te::common::TraverseType  travType = te::common::FORWARDONLY,
const te::common::AccessPolicy  accessPolicy = te::common::RAccess 
) const
pure virtual

It gets the dataset identified by the layer name using a spatial filter over the given geometric property.

Parameters
propertyNameThe name of the spatial property used to apply the spatial filter.
gA geometry to be used as a spatial filter when retrieving datasets.
rThe spatial relation to be used during the filter.
travTypeThe traverse type associated to the returned dataset.
accessPolicyAccess policy.
Returns
The caller of this method will take the ownership of the returned DataSet.
Exceptions
ExceptionIt can throws an exception if:
  • something goes wrong during data retrieval
  • if the data source driver doesn't support the traversal type
  • if the data source driver doesn't support the access policy
Note
Transactor will not take the ownership of the given geometry.
The geometry coordinates should be in the same coordinate system as the dataset.
Not thread-safe!

Implemented in te::graph::Layer, te::st::TrajectoryDataSetLayer, te::st::TimeSeriesDataSetLayer, te::st::ObservationDataSetLayer, te::map::DataSetLayer, te::map::RasterLayer, te::ws::ogc::wms::WMSLayer, te::map::DataSetAdapterLayer, te::map::QueryLayer, and te::map::FolderLayer.

virtual std::auto_ptr<te::da::DataSet> te::map::AbstractLayer::getData ( te::da::Expression restriction,
te::common::TraverseType  travType = te::common::FORWARDONLY,
const te::common::AccessPolicy  accessPolicy = te::common::RAccess 
) const
pure virtual

It gets the dataset identified by the layer name using the given restriction.

Parameters
restrictionThe restriction expression that will be used.
travTypeThe traverse type associated to the returned dataset.
accessPolicyAccess policy.
Returns
The caller of this method will take the ownership of the returned DataSet.
Exceptions
ExceptionIt can throws an exception if:
  • something goes wrong during data retrieval
  • if the data source driver doesn't support the traversal type
  • if the data source driver doesn't support the access policy
Note
Not thread-safe!

Implemented in te::graph::Layer, te::st::TrajectoryDataSetLayer, te::st::TimeSeriesDataSetLayer, te::st::ObservationDataSetLayer, te::map::DataSetLayer, te::map::RasterLayer, te::ws::ogc::wms::WMSLayer, te::map::DataSetAdapterLayer, te::map::QueryLayer, and te::map::FolderLayer.

virtual std::auto_ptr<te::da::DataSet> te::map::AbstractLayer::getData ( const te::da::ObjectIdSet oids,
te::common::TraverseType  travType = te::common::FORWARDONLY,
const te::common::AccessPolicy  accessPolicy = te::common::RAccess 
) const
pure virtual

It gets the dataset from the given set of objects identification.

Parameters
oidsThe set of object ids.
travTypeThe traverse type associated to the returned dataset.
accessPolicyAccess policy.
Returns
The caller of this method will take the ownership of the returned dataset.
Exceptions
ExceptionIt can throws an exception if:
  • something goes wrong during the data retrieval
  • if the data source driver doesn't support the traversal type
  • if the data source driver doesn't support the access policy
Note
Not thread-safe!

Implemented in te::graph::Layer, te::st::TrajectoryDataSetLayer, te::st::TimeSeriesDataSetLayer, te::st::ObservationDataSetLayer, te::map::DataSetLayer, te::map::RasterLayer, te::ws::ogc::wms::WMSLayer, te::map::DataSetAdapterLayer, te::map::QueryLayer, and te::map::FolderLayer.

const std::string& te::map::AbstractLayer::getDataSetName ( ) const
Returns
virtual const std::string& te::map::AbstractLayer::getDataSourceId ( ) const
virtual
std::vector<te::map::AbstractLayer*> te::map::AbstractLayer::getDescendants ( )

It returns a list with the descendants of this layer.

Returns
A list containing the descendants of this layer.
void te::common::TreeItem::getDescendantsCount ( std::size_t &  count) const
inherited

It returns the number of nodes that descends from this node.

Parameters
countThe number of nodes that descends from this node.
Note
It will return the number of nodes in a sub-tree. So, if you want to count how many elements there are in a tree, just call this method for the root item.
The count parameter must be initialized with zero.
te::core::EncodingType te::map::AbstractLayer::getEncoding ( ) const

It returns the encoding type.

Char enconding is used to inform to data source how to load string information from data.

Returns
The encoding type.
virtual const te::gm::Envelope& te::map::AbstractLayer::getExtent ( ) const
virtual

It returns the Layer extent (or minimum bounding box).

Returns
The Layer extent (or minimum bounding box) with coordinates in the same SRS as the layer.
virtual const std::string& te::map::AbstractLayer::getGeomPropertyName ( ) const
virtual
Returns
virtual te::map::Grouping* te::map::AbstractLayer::getGrouping ( ) const
virtual

It returns the Grouping associated to the Layer.

Returns
The Grouping associated to the Layer.
Note
The caller will NOT take the ownership of the given pointer.
virtual const std::string& te::map::AbstractLayer::getId ( ) const
virtual

It returns the layer id.

Returns
The layer id.
std::size_t te::common::TreeItem::getIndex ( ) const
inherited

It returns the index of this item in the list of children of its parent item.

Returns
The index of this item in the list of children of its parent item. It returns npos, if it has no parent.
TreeItem* te::common::TreeItem::getParent ( ) const
inherited

It returns a pointer to the parent of this node.

Returns
It returns a pointer to the parent node.
Note
You canīt free the memory pointed by the returned pointer; otherwise, the result will be unpredictable.
virtual std::auto_ptr<LayerSchema> te::map::AbstractLayer::getSchema ( ) const
pure virtual

It returns the layer schema.

Returns
The Layer schema.
Note
The caller will take the ownership of the returned layer schema.

Implemented in te::st::TrajectoryDataSetLayer, te::st::TimeSeriesDataSetLayer, te::st::ObservationDataSetLayer, te::graph::Layer, te::map::DataSetLayer, te::map::RasterLayer, te::ws::ogc::wms::WMSLayer, te::map::DataSetAdapterLayer, te::map::QueryLayer, and te::map::FolderLayer.

virtual const te::da::ObjectIdSet* te::map::AbstractLayer::getSelected ( ) const
virtual

It returns the selected group of this Layer.

The selected group of this Layer.

Note
The caller will NOT take the ownership of the given pointer.
virtual te::se::Style* te::map::AbstractLayer::getSelectionStyle ( ) const
virtual

It returns the selection Style associated to the layer.

Returns
The Style associated to the layer.
Note
The caller will NOT take the ownership of the given pointer.
virtual int te::map::AbstractLayer::getSRID ( ) const
virtual

It returns the Spatial Reference System ID associated to the Layer.

Returns
The Spatial Reference System ID associated to the Layer.
virtual te::se::Style* te::map::AbstractLayer::getStyle ( ) const
virtual

It returns the Style associated to the layer.

Returns
The Style associated to the layer.
Note
The caller will NOT take the ownership of the given pointer.
virtual const std::string& te::map::AbstractLayer::getTitle ( ) const
virtual

It returns the layer title.

Returns
The layer title.
virtual const std::string& te::map::AbstractLayer::getType ( ) const
pure virtual
virtual Visibility te::map::AbstractLayer::getVisibility ( ) const
virtual

It returns the layer visibility.

This information can be used, for instance, to know if the layer must be drawn.

Returns
The layer visibility.
bool te::common::TreeItem::hasChildren ( ) const
inherited

It returns true if the item has descendants.

Returns
True if the item has descendants.
bool te::map::AbstractLayer::hasVisibilityChanged ( )

It gets the flag that indicates if the layer visibility has changed.

Returns
If true, the layer visibility has changed.
void te::common::TreeItem::insert ( std::size_t  i,
const TreeItemPtr childItem 
)
inherited

It inserts an item in the informed position.

If the item has a parent, it will be disconnected from it and will be attached to this one.

Parameters
iThe position where the item will be inserted.
itemThe item to be inserted.

The children's list will be increased with one element.

bool te::common::TreeItem::isSibling ( const TreeItem item) const
inherited

It checks if the given layer is sibling of this one.

Parameters
layerThe layer to be compared to.
Returns
It returns true if the layers are siblings.
virtual bool te::map::AbstractLayer::isValid ( ) const
pure virtual

It returns true if the layer can be used for instance to draw, otherwise, it returns false.

This method can be used to check if the data referenced by the layer is available (accessible), or not.

Returns
True, if the layer is valid, otherwise, it returns false.

Implemented in te::graph::Layer, te::st::TrajectoryDataSetLayer, te::st::TimeSeriesDataSetLayer, te::st::ObservationDataSetLayer, te::map::RasterLayer, te::map::DataSetLayer, te::ws::ogc::wms::WMSLayer, te::map::DataSetAdapterLayer, te::map::QueryLayer, and te::map::FolderLayer.

const TreeItemPtr& te::common::TreeItem::operator[] ( std::size_t  i) const
inherited

It returns the n-th child.

Parameters
iThe child index.
Returns
It returns a pointer to the specified child node.
int te::common::Counted::refCount ( )
inlineinherited

Returns the number of references to this object.

Definition at line 99 of file Counted.h.

References te::common::Counted::m_refCount.

TreeItemPtr te::common::TreeItem::remove ( std::size_t  i)
inherited

It removes the i-th child.

Parameters
iThe position of the item to be removed.
Returns
The removed item.

The children's list will be decreased by one element.

std::list<TreeItemPtr> te::common::TreeItem::remove ( std::size_t  i,
std::size_t  count 
)
inherited

It removes from the given position a certain number of items as children of this item. The items to be removed will be disconnected from this item.

Parameters
iThe position from where the items will be removed.
countThe number of items to be removed (> 0).
Returns
The list of removed items.
TreeItemPtr te::common::TreeItem::replace ( std::size_t  i,
const TreeItemPtr childItem 
)
inherited

It replaces the child item at the given position by the new one. The replaced item will be disconnected from this item.

Parameters
iThe item position where the replace operation will be taken.
childItemThe new child item that will replace the item in the i-th position.
Returns
The item that was replaced.
virtual void te::map::AbstractLayer::select ( te::da::ObjectIdSet oids)
virtual

It adds the given oids to the selected group of this Layer.

Parameters
oidsThe oids that will be added.
Note
The layer will take the ownership of the given pointer.
virtual void te::map::AbstractLayer::setChart ( te::map::Chart chart)
virtual

It sets the Chart associated to the Layer.

Parameters
chartThe Chart to be associated to the Layer.
Note
The layer will take the ownership of the given pointer.
void te::map::AbstractLayer::setCompositionMode ( te::map::CompositionMode  mode)

It sets the composition mode.

Composition modes are used to specify how the pixels in one image, the source, are merged with the pixel in another image, the destination.

Parameters
modeThe composition mode enum.
void te::map::AbstractLayer::setDataSetName ( const std::string &  name)
Parameters
name
virtual void te::map::AbstractLayer::setDataSourceId ( const std::string &  id)
virtual
Parameters
id

Reimplemented in te::ws::ogc::wms::WMSLayer.

void te::map::AbstractLayer::setEncoding ( te::core::EncodingType  et)

It set the encoding type.

Char enconding is used to inform to data source how to load string information from data.

Parameters
Theencoding type.
virtual void te::map::AbstractLayer::setExtent ( const te::gm::Envelope mbr)
virtual

It sets the Layer extent (or minimum bounding box).

Parameters
mbrThe Layer extent (or minimum bounding box).
Precondition
The mbr coordinates must be in the same SRS as the layer.
virtual void te::map::AbstractLayer::setGeomPropertytName ( const std::string &  name)
virtual
Parameters
name
virtual void te::map::AbstractLayer::setGrouping ( te::map::Grouping grouping)
virtual

It sets the Grouping associated to the Layer.

Parameters
groupingThe Grouping to be associated to the Layer.
Note
The layer will take the ownership of the given pointer.
virtual void te::map::AbstractLayer::setId ( const std::string &  id)
virtual

It sets the layer id.

Parameters
idThe layer id.
virtual void te::map::AbstractLayer::setOutOfDate ( )
virtual

Its indicate that the layer schema is out of date.

Reimplemented in te::map::DataSetLayer.

void te::common::TreeItem::setParent ( TreeItem parent)
protectedinherited

It sets the parent of this item to the specified one. Don't use this method if you are not sure how to handle all the pointers involved in this operation.

Parameters
parentThe item to be set as parent of this item.
Note
Avoid calling this method; instead, use add or the constructors.
virtual void te::map::AbstractLayer::setSelectionStyle ( te::se::Style style)
virtual

It sets the selection Style associated to the layer.

Parameters
styleThe Style associated to the layer.
Note
The layer will take the ownership of the given pointer.
virtual void te::map::AbstractLayer::setSRID ( int  srid)
virtual

It sets the Spatial Reference System ID associated to the Layer.

Parameters
sridThe Spatial Reference System ID to be associated to the Layer.

Reimplemented in te::map::DataSetLayer.

virtual void te::map::AbstractLayer::setStyle ( te::se::Style style)
virtual

It sets the Style associated to the layer.

Parameters
styleThe Style associated to the layer.
Note
The layer will take the ownership of the given pointer.
virtual void te::map::AbstractLayer::setTitle ( const std::string &  title)
virtual

It sets the layer title.

Parameters
titleThe layer title.
virtual void te::map::AbstractLayer::setVisibility ( Visibility  v)
virtual

It sets the layer visibility.

This information can be used, for instance, to know if the layer must be drawn.

Parameters
vThe layer visibility.

Reimplemented in te::map::FolderLayer.

void te::map::AbstractLayer::setVisibilityAsChanged ( bool  visChanged)

It sets that the status of the layer visibility is to be changed or not..

Parameters
visChangedIf true, the status of the layer visibility is to be changed; otherwise, it returns false.
void te::common::TreeItem::swap ( const TreeItemPtr firstChild,
const TreeItemPtr secondChild 
)
inherited

It swaps the position of the given children.

Parameters
firstChildOne of the children.
secondChildThe other child.
void te::common::TreeItem::swap ( const TreeItemPtr sibling)
inherited

It swaps this item with its sibling in their parent node.

Parameters
siblingThe sibling to swap.
virtual void te::map::AbstractLayer::updateVisibility ( )
virtual

It updates the visibility of this layer.

Reimplemented in te::map::FolderLayer.

void te::map::AbstractLayer::updateVisibilityOfAncestors ( )

It updates the visibility of the ancestors of this layer, if any.

Member Data Documentation

te::map::Chart* te::map::AbstractLayer::m_chart
protected

The chart information.

Definition at line 583 of file AbstractLayer.h.

std::list<TreeItemPtr> te::common::TreeItem::m_children
protectedinherited

Pointers to the items that are children.

Definition at line 290 of file TreeItem.h.

te::map::CompositionMode te::map::AbstractLayer::m_compositionMode
protected

The composition mode used to merged the canvas.

Definition at line 585 of file AbstractLayer.h.

std::string te::map::AbstractLayer::m_datasetName
protected

The dataset name where we will retrieve the layer objects.

Definition at line 586 of file AbstractLayer.h.

std::string te::map::AbstractLayer::m_datasourceId
protected

DataSource id.

Definition at line 587 of file AbstractLayer.h.

te::core::EncodingType te::map::AbstractLayer::m_encoding
protected

The char encoding of the layer;.

Definition at line 588 of file AbstractLayer.h.

std::string te::map::AbstractLayer::m_geomPropertyName
protected

The name of the referenced geometry property.

Definition at line 584 of file AbstractLayer.h.

te::map::Grouping* te::map::AbstractLayer::m_grouping
protected

The grouping information.

Definition at line 582 of file AbstractLayer.h.

std::string te::map::AbstractLayer::m_id
protected

Layer id.

Definition at line 573 of file AbstractLayer.h.

te::gm::Envelope te::map::AbstractLayer::m_mbr
protected

The layer bounding box.

Definition at line 575 of file AbstractLayer.h.

TreeItem* te::common::TreeItem::m_parent
protectedinherited

A pointer to the parent node.

Definition at line 289 of file TreeItem.h.

te::da::ObjectIdSet* te::map::AbstractLayer::m_selected
protected

The selected group of the layer.

Definition at line 579 of file AbstractLayer.h.

te::se::Style* te::map::AbstractLayer::m_selectionStyle
protected

The selection style to be applied to the geographic objects in the layer.

Definition at line 581 of file AbstractLayer.h.

int te::map::AbstractLayer::m_srid
protected

The identifier of the layer spatial reference system.

Definition at line 576 of file AbstractLayer.h.

te::se::Style* te::map::AbstractLayer::m_style
protected

The style to be applied to the geographic objects in the layer.

Definition at line 580 of file AbstractLayer.h.

std::string te::map::AbstractLayer::m_title
protected

A brief description of this Layer that can be used by applications to show a text identifying this layer.

Definition at line 574 of file AbstractLayer.h.

Visibility te::map::AbstractLayer::m_visibility
protected

It indicates the layer visibility.

Definition at line 577 of file AbstractLayer.h.

bool te::map::AbstractLayer::m_visibilityChanged
protected

It indicates if the layer visibility has changed.

Definition at line 578 of file AbstractLayer.h.

const std::size_t te::common::TreeItem::npos
staticinherited

A value to indicate no match.

Definition at line 285 of file TreeItem.h.


The documentation for this class was generated from the following file: