te::edit::Repository Class Reference

This class represents a repository of geometries and features. More...

#include <Repository.h>

Public Member Functions

void add (te::gm::Geometry *geom)
 
void add (te::da::ObjectId *id, te::gm::Geometry *geom)
 
void add (Feature *f)
 
void clear ()
 
const std::vector< Feature * > & getAllFeatures () const
 
FeaturegetFeature (const te::gm::Envelope &e, int srid) const
 
FeaturegetFeature (te::da::ObjectId *id) const
 
std::vector< Feature * > getFeatures (const te::gm::Envelope &e, int srid) const
 
std::size_t getPosition (te::da::ObjectId *id)
 
const std::string & getSource () const
 
bool hasIdentifier (te::da::ObjectId *id)
 
void remove (te::da::ObjectId *id)
 
 Repository (const std::string &source)
 
void set (te::da::ObjectId *id, te::gm::Geometry *geom)
 
void set (Feature *f)
 
 ~Repository ()
 

Private Member Functions

void buildIndex ()
 
void buildIndex (const std::size_t &pos, te::gm::Geometry *geom)
 
void clearIndex ()
 
void set (const std::size_t &pos, Feature *f)
 

Private Attributes

std::vector< Feature * > m_features
 The repository features. More...
 
te::sam::rtree::Index< std::size_t, 8 > m_rtree
 Internal index used to retrieve geometries spatially. More...
 
std::string m_source
 The source of the features. More...
 

Detailed Description

This class represents a repository of geometries and features.

Definition at line 63 of file Repository.h.

Constructor & Destructor Documentation

te::edit::Repository::Repository ( const std::string &  source)

Definition at line 44 of file Repository.cpp.

te::edit::Repository::~Repository ( )

Definition at line 49 of file Repository.cpp.

References clear().

Member Function Documentation

void te::edit::Repository::add ( te::gm::Geometry geom)
void te::edit::Repository::add ( te::da::ObjectId id,
te::gm::Geometry geom 
)

Definition at line 66 of file Repository.cpp.

References add().

Referenced by add().

void te::edit::Repository::add ( Feature f)
void te::edit::Repository::buildIndex ( )
private

Definition at line 259 of file Repository.cpp.

References clearIndex(), and m_features.

Referenced by add(), remove(), and set().

void te::edit::Repository::buildIndex ( const std::size_t &  pos,
te::gm::Geometry geom 
)
private
void te::edit::Repository::clearIndex ( )
private

Definition at line 254 of file Repository.cpp.

References te::sam::rtree::Index< DATATYPE, MAXNODES, MINNODES >::clear(), and m_rtree.

Referenced by buildIndex(), and clear().

const std::vector< te::edit::Feature * > & te::edit::Repository::getAllFeatures ( ) const

Definition at line 177 of file Repository.cpp.

References m_features.

Referenced by te::qt::plugins::edit::ToolBar::onSaveActivated().

te::edit::Feature * te::edit::Repository::getFeature ( te::da::ObjectId id) const

Definition at line 204 of file Repository.cpp.

References m_features.

std::size_t te::edit::Repository::getPosition ( te::da::ObjectId id)

Definition at line 156 of file Repository.cpp.

References m_features.

Referenced by add(), hasIdentifier(), remove(), and set().

const std::string & te::edit::Repository::getSource ( ) const

Definition at line 172 of file Repository.cpp.

References m_source.

bool te::edit::Repository::hasIdentifier ( te::da::ObjectId id)
void te::edit::Repository::remove ( te::da::ObjectId id)
void te::edit::Repository::set ( te::da::ObjectId id,
te::gm::Geometry geom 
)

Definition at line 97 of file Repository.cpp.

void te::edit::Repository::set ( Feature f)

Definition at line 107 of file Repository.cpp.

References te::edit::Feature::getId(), getPosition(), and TE_TR.

void te::edit::Repository::set ( const std::size_t &  pos,
Feature f 
)
private

Definition at line 120 of file Repository.cpp.

References buildIndex(), and m_features.

Member Data Documentation

std::vector<Feature*> te::edit::Repository::m_features
private

The repository features.

Definition at line 112 of file Repository.h.

Referenced by add(), buildIndex(), clear(), getAllFeatures(), getFeature(), getFeatures(), getPosition(), remove(), and set().

te::sam::rtree::Index<std::size_t, 8> te::edit::Repository::m_rtree
private

Internal index used to retrieve geometries spatially.

Definition at line 113 of file Repository.h.

Referenced by buildIndex(), clearIndex(), and getFeatures().

std::string te::edit::Repository::m_source
private

The source of the features.

Definition at line 111 of file Repository.h.

Referenced by getSource().


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