27 #include "../common/STLUtils.h" 28 #include "../core/translator/Translator.h" 33 #include <boost/format.hpp> 42 if (repository ==
nullptr)
48 repository->
add(geom);
55 repository->
add(geom);
62 if (repository ==
nullptr)
68 repository->
add(
id, geom);
74 repository->
add(
id, geom);
81 if (repository ==
nullptr)
102 if (repository ==
nullptr)
115 std::map<std::string, Repository*>::const_iterator it =
m_repositories.find(source);
127 if (repository ==
nullptr)
128 return std::vector<te::edit::Feature*>();
137 if (repository ==
nullptr)
147 if (repository ==
nullptr)
155 std::map<std::string, Repository*>::const_iterator it;
164 if (repository ==
nullptr)
178 std::map<std::string, Repository*>::iterator it =
m_repositories.find(source);
192 if (repository ==
nullptr)
void addGeometry(const std::string &source, te::gm::Geometry *geom)
Feature * getFeature(const te::gm::Envelope &e, int srid) const
This is a singleton for managing edit repositories.
bool hasIdentifier(te::da::ObjectId *id)
const std::map< std::string, Repository * > & getRepositories() const
std::map< std::string, Repository * > m_repositories
std::vector< Feature * > getFeatures(const std::string &source, const te::gm::Envelope &e, int srid) const
void clear(const std::string &source)
An Envelope defines a 2D rectangular region.
void add(te::gm::Geometry *geom)
void remove(te::da::ObjectId *id)
This class represents an unique id for a data set element.
This class represents a repository of geometries and features.
Feature * getFeature(const std::string &source, const te::gm::Envelope &e, int srid) const
Geometry is the root class of the geometries hierarchy, it follows OGC and ISO standards.
void removeFeature(const std::string &source, te::da::ObjectId *id)
bool hasIdentify(const std::string &source, te::da::ObjectId *id)
std::vector< Feature * > getFeatures(const te::gm::Envelope &e, int srid) const
void remove(const std::string &source)
Repository * getRepository(const std::string &source) const
This class represents a repository of geometries and features.
void addFeature(const std::string &source, Feature *f)
~RepositoryManager()
Singleton destructor.
void FreeContents(boost::unordered_map< K, V * > &m)
This function can be applied to a map of pointers. It will delete each pointer in the map...
RepositoryManager()
It initializes the singleton instance of the repository manager.