This is a singleton for managing edit repositories. More...
#include <RepositoryManager.h>
Public Member Functions | |
| void | addFeature (const std::string &source, Feature *f) |
| void | addGeometry (const std::string &source, te::gm::Geometry *geom) |
| void | addGeometry (const std::string &source, te::da::ObjectId *id, te::gm::Geometry *geom) |
| void | clear (const std::string &source) |
| void | clearAll () |
| Feature * | getFeature (const std::string &source, const te::gm::Envelope &e, int srid) const |
| Feature * | getFeature (const std::string &source, te::da::ObjectId *id) const |
| std::vector< Feature * > | getFeatures (const std::string &source, const te::gm::Envelope &e, int srid) const |
| const std::map< std::string, Repository * > & | getRepositories () const |
| Repository * | getRepository (const std::string &source) const |
| bool | hasIdentify (const std::string &source, te::da::ObjectId *id) |
| void | remove (const std::string &source) |
| void | removeAll () |
| void | removeFeature (const std::string &source, te::da::ObjectId *id) |
Static Public Member Functions | |
| static RepositoryManager & | getInstance () |
| It returns a reference to the singleton instance. More... | |
Protected Member Functions | |
| RepositoryManager () | |
| It initializes the singleton instance of the repository manager. More... | |
| ~RepositoryManager () | |
| Singleton destructor. More... | |
Private Attributes | |
| std::map< std::string, Repository * > | m_repositories |
Friends | |
| class | te::common::Singleton< RepositoryManager > |
This is a singleton for managing edit repositories.
Definition at line 64 of file RepositoryManager.h.
|
protecteddefault |
It initializes the singleton instance of the repository manager.
Referenced by removeFeature().
|
protected |
| void te::edit::RepositoryManager::addFeature | ( | const std::string & | source, |
| Feature * | f | ||
| ) |
Definition at line 77 of file RepositoryManager.cpp.
References te::edit::Repository::add(), getRepository(), and m_repositories.
Referenced by te::edit::AddCommand::draw().
| void te::edit::RepositoryManager::addGeometry | ( | const std::string & | source, |
| te::gm::Geometry * | geom | ||
| ) |
Definition at line 38 of file RepositoryManager.cpp.
References te::edit::Repository::add(), getRepository(), and m_repositories.
| void te::edit::RepositoryManager::addGeometry | ( | const std::string & | source, |
| te::da::ObjectId * | id, | ||
| te::gm::Geometry * | geom | ||
| ) |
Definition at line 58 of file RepositoryManager.cpp.
References te::edit::Repository::add(), getRepository(), and m_repositories.
| void te::edit::RepositoryManager::clear | ( | const std::string & | source | ) |
Definition at line 160 of file RepositoryManager.cpp.
References te::edit::Repository::clear(), and getRepository().
| void te::edit::RepositoryManager::clearAll | ( | ) |
Definition at line 153 of file RepositoryManager.cpp.
References m_repositories.
| te::edit::Feature * te::edit::RepositoryManager::getFeature | ( | const std::string & | source, |
| const te::gm::Envelope & | e, | ||
| int | srid | ||
| ) | const |
Definition at line 133 of file RepositoryManager.cpp.
References te::edit::Repository::getFeature(), and getRepository().
Referenced by te::edit::CreatePolygonTool::onCommandFeedback().
| te::edit::Feature * te::edit::RepositoryManager::getFeature | ( | const std::string & | source, |
| te::da::ObjectId * | id | ||
| ) | const |
Definition at line 143 of file RepositoryManager.cpp.
References te::edit::Repository::getFeature(), and getRepository().
| std::vector< te::edit::Feature * > te::edit::RepositoryManager::getFeatures | ( | const std::string & | source, |
| const te::gm::Envelope & | e, | ||
| int | srid | ||
| ) | const |
Definition at line 123 of file RepositoryManager.cpp.
References te::edit::Repository::getFeatures(), and getRepository().
|
staticinherited |
It returns a reference to the singleton instance.
Referenced by te::edit::AddCommand::draw(), te::edit::RotateGeometryTool::draw(), te::edit::MoveGeometryTool::draw(), te::edit::VertexTool::draw(), te::edit::Renderer::drawRepositories(), te::edit::Renderer::drawRepository(), te::edit::SplitPolygonTool::editingFinished(), te::edit::DeleteGeometryByAreaTool::executeSelection(), te::mnt::ProfileTools::mouseReleaseEvent(), te::edit::CreatePolygonTool::onCommandFeedback(), te::qt::plugins::edit::ToolBar::onEditActivated(), te::qt::plugins::edit::ToolBar::onResetVisualizationToolActivated(), te::qt::plugins::edit::ToolBar::onSaveActivated(), te::edit::SplitPolygonTool::pickFeatures(), te::mnt::ProfileDialog::release(), te::edit::SplitPolygonTool::resetVisualizationTool(), te::edit::SplitPolygonTool::splitPolygon(), te::edit::MergeGeometriesTool::storeFeature(), te::edit::EditInfoTool::storeFeature(), te::edit::SubtractAreaTool::storeFeature(), te::edit::AggregateAreaTool::storeFeature(), te::edit::DeleteGeometryTool::storeFeature(), te::edit::RotateGeometryTool::storeFeature(), te::edit::DeletePartTool::storeFeature(), te::edit::CreatePointTool::storeFeature(), te::edit::CreateLineTool::storeFeature(), te::edit::DeleteGeometryByAreaTool::storeFeature(), te::edit::MoveGeometryTool::storeFeature(), te::edit::CreatePolygonTool::storeFeature(), te::edit::VertexTool::storeFeature(), te::qt::plugins::edit::ToolBar::updateLayer(), te::mnt::ProfileTools::updateRepository(), and te::edit::MergeGeometriesTool::~MergeGeometriesTool().
| const std::map< std::string, te::edit::Repository * > & te::edit::RepositoryManager::getRepositories | ( | ) | const |
Definition at line 108 of file RepositoryManager.cpp.
References m_repositories.
| te::edit::Repository * te::edit::RepositoryManager::getRepository | ( | const std::string & | source | ) | const |
Definition at line 113 of file RepositoryManager.cpp.
References m_repositories.
Referenced by addFeature(), addGeometry(), clear(), getFeature(), getFeatures(), hasIdentify(), and removeFeature().
| bool te::edit::RepositoryManager::hasIdentify | ( | const std::string & | source, |
| te::da::ObjectId * | id | ||
| ) |
Definition at line 96 of file RepositoryManager.cpp.
References getRepository(), and te::edit::Repository::hasIdentifier().
Referenced by te::edit::AddCommand::draw(), and te::edit::CreatePolygonTool::onCommandFeedback().
| void te::edit::RepositoryManager::remove | ( | const std::string & | source | ) |
Definition at line 176 of file RepositoryManager.cpp.
References m_repositories.
| void te::edit::RepositoryManager::removeAll | ( | ) |
Definition at line 170 of file RepositoryManager.cpp.
References te::common::FreeContents(), and m_repositories.
Referenced by ~RepositoryManager().
| void te::edit::RepositoryManager::removeFeature | ( | const std::string & | source, |
| te::da::ObjectId * | id | ||
| ) |
Definition at line 188 of file RepositoryManager.cpp.
References getRepository(), m_repositories, te::edit::Repository::remove(), and RepositoryManager().
Referenced by te::edit::AddCommand::draw(), and te::edit::CreatePolygonTool::onCommandFeedback().
|
friend |
Definition at line 66 of file RepositoryManager.h.
|
private |
Definition at line 108 of file RepositoryManager.h.
Referenced by addFeature(), addGeometry(), clearAll(), getRepositories(), getRepository(), remove(), removeAll(), and removeFeature().