All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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
 
std::vector< Feature * > getFeatures (const te::gm::Envelope &e, int srid) const
 
std::vector< Feature * > getNewFeatures () 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, int srid=TE_UNKNOWN_SRS)
 
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...
 
int m_srid
 The SRS of the features. More...
 

Detailed Description

This class represents a repository of geometries and features.

Definition at line 62 of file Repository.h.

Constructor & Destructor Documentation

te::edit::Repository::Repository ( const std::string &  source,
int  srid = TE_UNKNOWN_SRS 
)

Definition at line 45 of file Repository.cpp.

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

Definition at line 51 of file Repository.cpp.

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 67 of file Repository.cpp.

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

Definition at line 77 of file Repository.cpp.

References te::edit::Feature::getGeometry(), and te::edit::Feature::getId().

void te::edit::Repository::buildIndex ( )
private

Definition at line 259 of file Repository.cpp.

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

Definition at line 267 of file Repository.cpp.

References te::gm::Geometry::getMBR().

void te::edit::Repository::clear ( )
void te::edit::Repository::clearIndex ( )
private

Definition at line 254 of file Repository.cpp.

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

Definition at line 161 of file Repository.cpp.

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

std::vector< te::edit::Feature * > te::edit::Repository::getFeatures ( const te::gm::Envelope e,
int  srid 
) const
std::vector< te::edit::Feature * > te::edit::Repository::getNewFeatures ( ) const
std::size_t te::edit::Repository::getPosition ( te::da::ObjectId id)

Definition at line 140 of file Repository.cpp.

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

Definition at line 156 of file Repository.cpp.

bool te::edit::Repository::hasIdentifier ( te::da::ObjectId id)

Definition at line 151 of file Repository.cpp.

Referenced by te::edit::RepositoryManager::hasIdentify().

void te::edit::Repository::remove ( te::da::ObjectId id)

Definition at line 120 of file Repository.cpp.

References TE_TR.

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(), and TE_TR.

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

Definition at line 238 of file Repository.cpp.

Member Data Documentation

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

The repository features.

Definition at line 112 of file Repository.h.

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.

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

The source of the features.

Definition at line 110 of file Repository.h.

int te::edit::Repository::m_srid
private

The SRS of the features.

Definition at line 111 of file Repository.h.


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