This class represents a set of unique ids created in the same context. i.e. from the same data set. More...
#include <ObjectIdSet.h>
Public Member Functions | |
| void | add (ObjectId *oid) |
| It adds an object id to this object id set. More... | |
| void | addProperty (const std::string &name, std::size_t pos, int type) |
| It adds a property that will be used to generate the unique ids. More... | |
| std::set< ObjectId *, te::common::LessCmp< ObjectId * > >::const_iterator | begin () const |
| Returns an iterator for the object ids in container. More... | |
| void | clear () |
| It clears this object id set. More... | |
| ObjectIdSet * | clone () const |
| bool | contains (ObjectId *oid) const |
| It returns if the object id set contains the given oid. More... | |
| void | difference (const ObjectIdSet *rhs) |
| It performs the difference operation between this ObjectIdSet and the given ObjectIdSet. More... | |
| std::set< ObjectId *, te::common::LessCmp< ObjectId * > >::const_iterator | end () const |
| Returns an iterator for the object ids in container. More... | |
| Expression * | getExpression () const |
| It returns the expression that can be used to retrieve the data set that contains the all indentified elements. More... | |
| Expression * | getExpressionByInClause (const std::string source="") const |
| const std::vector< std::string > & | getPropertyNames () const |
| It returns the property names used to generated the oids. More... | |
| const std::vector< std::size_t > & | getPropertyPos () const |
| It returns the property positions used to generated the oids. More... | |
| const std::vector< int > & | getPropertyTypes () const |
| It returns the property types used to generated the oids. More... | |
| bool | isExpressionClauseIn () const |
| ObjectIdSet () | |
| Constructor. More... | |
| ObjectIdSet (const ObjectIdSet &rhs, bool copyOids=true) | |
| Copy Constructor. More... | |
| void | remove (ObjectId *oid) |
| Removes the object id from set. More... | |
| void | setExpression (te::da::Expression *expression, bool isClauseIn) |
| It set the expression that can be used to retrieve the data set that contains the all indentified elements. More... | |
| void | setExpressionByInClause (const std::string source="") |
| void | setExpressionByIntersection (std::string geomAttrName, te::gm::Envelope env, int srid) |
| std::size_t | size () const |
| It returns the object id set size. More... | |
| void | symDifference (const ObjectIdSet *rhs) |
| It performs the symmetric difference operation between this ObjectIdSet and the given ObjectIdSet. More... | |
| void | Union (ObjectIdSet *rhs) |
| It performs the union operation between this ObjectIdSet and the given ObjectIdSet. More... | |
| ~ObjectIdSet () | |
| Destructor. More... | |
Private Attributes | |
| bool | m_expByClauseIn |
| te::da::Expression * | m_expression |
| The expression that can be used to retrieve the data set that contains the all indentified elements. More... | |
| std::set< ObjectId *, te::common::LessCmp< ObjectId * > > | m_oids |
| The set of unique ids. More... | |
| std::vector< std::string > | m_pnames |
| The list of property names used to generate the unique ids. More... | |
| std::vector< std::size_t > | m_ppos |
| The list of property positions used to generate the unique ids. More... | |
| std::vector< int > | m_ptypes |
| The list of property types used to generate the unique ids. More... | |
This class represents a set of unique ids created in the same context. i.e. from the same data set.
Definition at line 55 of file ObjectIdSet.h.
| te::da::ObjectIdSet::ObjectIdSet | ( | ) |
| te::da::ObjectIdSet::ObjectIdSet | ( | const ObjectIdSet & | rhs, |
| bool | copyOids = true |
||
| ) |
Copy Constructor.
Definition at line 50 of file ObjectIdSet.cpp.
References te::da::Expression::clone(), getExpression(), m_expression, and m_oids.
| te::da::ObjectIdSet::~ObjectIdSet | ( | ) |
Destructor.
Definition at line 68 of file ObjectIdSet.cpp.
References te::common::FreeContents(), m_expression, and m_oids.
| void te::da::ObjectIdSet::add | ( | ObjectId * | oid | ) |
It adds an object id to this object id set.
| The | object id that will be added. |
Definition at line 83 of file ObjectIdSet.cpp.
References m_oids.
Referenced by te::qt::widgets::Histogram::find(), te::qt::widgets::Scatter::find(), te::edit::MergeGeometriesTool::getBaseOID(), te::qt::widgets::DataSetTableModel::getObjectIdSet(), te::vp::MakeGeometryValid::makeValidMemory(), te::qt::af::ChartDisplayDockWidget::selectionChanged(), te::edit::SplitPolygonTool::splitPolygon(), and Union().
| void te::da::ObjectIdSet::addProperty | ( | const std::string & | name, |
| std::size_t | pos, | ||
| int | type | ||
| ) |
It adds a property that will be used to generate the unique ids.
| name | A property name that will be used to generate the unique ids. |
| name | The property position. |
| type | The property data type. |
Definition at line 75 of file ObjectIdSet.cpp.
References m_pnames, m_ppos, and m_ptypes.
Referenced by te::qt::widgets::DataSetTableModel::getObjectIdSet(), te::vp::MakeGeometryValid::makeValidMemory(), and te::qt::af::ChartDisplayDockWidget::selectionChanged().
| std::set< te::da::ObjectId *, te::common::LessCmp< te::da::ObjectId * > >::const_iterator te::da::ObjectIdSet::begin | ( | ) | const |
Returns an iterator for the object ids in container.
Definition at line 319 of file ObjectIdSet.cpp.
References m_oids.
Referenced by te::qt::af::MapDisplay::drawLayerSelection(), te::edit::MergeGeometriesTool::editingFinished(), te::edit::MergeGeometriesTool::getBaseOID(), GetOidsAsString(), te::qt::widgets::ScatterChart::highlight(), te::qt::widgets::HistogramChart::highlight(), te::qt::widgets::DataSetTableView::highlightOIds(), te::qt::widgets::DataSetTableView::highlightRow(), te::qt::widgets::Promoter::promote(), te::gpkg::Transactor::remove(), te::ogr::Transactor::remove(), te::edit::SplitPolygonTool::resetVisualizationTool(), te::qt::af::ChartDisplayDockWidget::selectionChanged(), te::edit::MergeGeometriesTool::storeFeature(), and te::edit::MergeGeometriesTool::~MergeGeometriesTool().
| void te::da::ObjectIdSet::clear | ( | ) |
It clears this object id set.
Definition at line 211 of file ObjectIdSet.cpp.
References te::common::FreeContents(), and m_oids.
Referenced by te::map::AbstractLayer::clearSelected(), te::vp::MakeGeometryValid::makeValidMemory(), and te::qt::af::ChartDisplayDockWidget::selectionChanged().
| te::da::ObjectIdSet * te::da::ObjectIdSet::clone | ( | ) | const |
Definition at line 329 of file ObjectIdSet.cpp.
References ObjectIdSet().
Referenced by te::qt::widgets::Selection::executeSelection(), te::qt::af::ChartDisplayDockWidget::selectionChanged(), and te::qt::widgets::HighlightDelegate::setObjectIdSet().
It returns if the object id set contains the given oid.
| oid | The object id that will be searched. |
Definition at line 237 of file ObjectIdSet.cpp.
References m_oids.
Referenced by te::qt::widgets::DataSetTableView::highlightRow(), te::vp::MultipartToSinglepart::runSelected(), te::qt::af::ChartDisplayDockWidget::selectionChanged(), and ToHighlight().
| void te::da::ObjectIdSet::difference | ( | const ObjectIdSet * | rhs | ) |
It performs the difference operation between this ObjectIdSet and the given ObjectIdSet.
| rhs | A valid ObjectIdSet that will be used on difference operation. Do not pass NULL! |
Definition at line 269 of file ObjectIdSet.cpp.
References m_oids, and setExpressionByInClause().
Referenced by te::map::AbstractLayer::deselect(), and te::qt::af::BaseApplication::onLayerInvertSelectionTriggered().
| std::set< te::da::ObjectId *, te::common::LessCmp< te::da::ObjectId * > >::const_iterator te::da::ObjectIdSet::end | ( | ) | const |
Returns an iterator for the object ids in container.
Definition at line 324 of file ObjectIdSet.cpp.
References m_oids.
Referenced by te::qt::af::MapDisplay::drawLayerSelection(), te::edit::MergeGeometriesTool::editingFinished(), te::edit::MergeGeometriesTool::getBaseOID(), GetOidsAsString(), te::qt::widgets::ScatterChart::highlight(), te::qt::widgets::HistogramChart::highlight(), te::qt::widgets::Promoter::promote(), te::gpkg::Transactor::remove(), te::ogr::Transactor::remove(), te::edit::SplitPolygonTool::resetVisualizationTool(), te::qt::af::ChartDisplayDockWidget::selectionChanged(), te::edit::MergeGeometriesTool::storeFeature(), and te::edit::MergeGeometriesTool::~MergeGeometriesTool().
| te::da::Expression * te::da::ObjectIdSet::getExpression | ( | ) | const |
It returns the expression that can be used to retrieve the data set that contains the all indentified elements.
Definition at line 203 of file ObjectIdSet.cpp.
References te::da::Expression::clone(), getExpressionByInClause(), and m_expression.
Referenced by te::da::BuildSelect(), te::qt::af::MapDisplay::drawLayerSelection(), te::map::QueryLayer::getData(), te::da::DataSourceTransactor::getDataSet(), te::vp::LineToPolygonQuery::getSelectQueryClosedLines(), te::vp::LineToPolygonQuery::getSelectQueryForceCloseLines(), te::vp::GetSelectQueryFromLayer(), ObjectIdSet(), te::vp::PolygonToLineQuery::run(), and te::vp::BufferQuery::run().
| te::da::Expression * te::da::ObjectIdSet::getExpressionByInClause | ( | const std::string | source = "" | ) | const |
Definition at line 155 of file ObjectIdSet.cpp.
References te::da::Function::add(), te::da::Function::getNumArgs(), m_oids, m_pnames, m_ptypes, and te::dt::STRING_TYPE.
Referenced by te::qt::widgets::DataSetTableView::changeColumnData(), getExpression(), isExpressionClauseIn(), te::vp::IntersectionDialog::onOkPushButtonClicked(), te::pgis::Transactor::remove(), te::vp::IntersectionQuery::run(), and te::qt::widgets::SaveSelectedObjectsWidget::setParameters().
| const std::vector< std::string > & te::da::ObjectIdSet::getPropertyNames | ( | ) | const |
It returns the property names used to generated the oids.
Definition at line 222 of file ObjectIdSet.cpp.
References m_pnames.
Referenced by te::da::BuildSelect(), te::qt::widgets::DataSetTableView::changeColumnData(), te::qt::widgets::DataSetTableModel::getObjectIdSet(), te::vp::MultipartToSinglepart::runSelected(), and ToHighlight().
| const std::vector< std::size_t > & te::da::ObjectIdSet::getPropertyPos | ( | ) | const |
It returns the property positions used to generated the oids.
Definition at line 227 of file ObjectIdSet.cpp.
References m_ppos.
Referenced by IsPrimaryKey(), te::qt::widgets::HighlightDelegate::paint(), te::qt::widgets::DataSetTableView::setAutoScrollEnabled(), te::qt::widgets::DataSetTableView::setPromotionEnabled(), and te::qt::widgets::DataSetTableView::sortByColumns().
| const std::vector< int > & te::da::ObjectIdSet::getPropertyTypes | ( | ) | const |
It returns the property types used to generated the oids.
Definition at line 232 of file ObjectIdSet.cpp.
References m_ptypes.
| bool te::da::ObjectIdSet::isExpressionClauseIn | ( | ) | const |
Definition at line 334 of file ObjectIdSet.cpp.
References getExpressionByInClause(), m_expByClauseIn, and m_expression.
| void te::da::ObjectIdSet::remove | ( | ObjectId * | oid | ) |
Removes the object id from set.
| oid | Object id to be removed. |
Definition at line 243 of file ObjectIdSet.cpp.
References m_oids.
Referenced by te::qt::af::ChartDisplayDockWidget::selectionChanged().
| void te::da::ObjectIdSet::setExpression | ( | te::da::Expression * | expression, |
| bool | isClauseIn | ||
| ) |
It set the expression that can be used to retrieve the data set that contains the all indentified elements.
| expression | The expression that can be used to retrieve the data set that contains the all indentified elements. |
Definition at line 89 of file ObjectIdSet.cpp.
References m_expByClauseIn, and m_expression.
Referenced by te::qt::widgets::QueryDialog::onApplyPushButtonClicked(), setExpressionByInClause(), setExpressionByIntersection(), and te::qt::widgets::SaveSelectedObjectsWidget::setParameters().
| void te::da::ObjectIdSet::setExpressionByInClause | ( | const std::string | source = "" | ) |
Definition at line 107 of file ObjectIdSet.cpp.
References te::da::Function::add(), te::da::Function::getNumArgs(), m_oids, m_pnames, m_ptypes, setExpression(), and te::dt::STRING_TYPE.
Referenced by difference(), te::qt::widgets::DataSetTableModel::getObjectIdSet(), te::qt::widgets::QueryDataSourceDialog::onApplySelToolButtonClicked(), symDifference(), and Union().
| void te::da::ObjectIdSet::setExpressionByIntersection | ( | std::string | geomAttrName, |
| te::gm::Envelope | env, | ||
| int | srid | ||
| ) |
Definition at line 98 of file ObjectIdSet.cpp.
References te::da::Field::getExpression(), and setExpression().
| std::size_t te::da::ObjectIdSet::size | ( | ) | const |
It returns the object id set size.
Definition at line 217 of file ObjectIdSet.cpp.
References m_oids.
Referenced by te::map::AbstractLayer::deselect(), te::qt::af::MapDisplay::drawLayerSelection(), te::edit::SplitPolygonTool::editingFinished(), te::da::DataSourceTransactor::getDataSet(), te::qt::widgets::DataSetTableView::highlightOIds(), te::vp::MakeGeometryValid::makeValidMemory(), te::edit::MoveGeometryTool::mousePressEvent(), te::qt::widgets::WhereClauseWidget::onAddWhereClausePushButtonClicked(), te::edit::SplitPolygonTool::pickFeatures(), te::map::AbstractLayer::select(), te::qt::af::ChartDisplayDockWidget::selectionChanged(), TablePopupFilter::showStatistics(), te::edit::SplitPolygonTool::splitPolygon(), and te::qt::widgets::SaveSelectedObjectsWidget::updateWindowComponents().
| void te::da::ObjectIdSet::symDifference | ( | const ObjectIdSet * | rhs | ) |
It performs the symmetric difference operation between this ObjectIdSet and the given ObjectIdSet.
| rhs | A valid ObjectIdSet that will be used on difference operation. Do not pass NULL! |
Definition at line 296 of file ObjectIdSet.cpp.
References m_oids, and setExpressionByInClause().
Referenced by te::qt::widgets::Selection::executeSelection().
| void te::da::ObjectIdSet::Union | ( | ObjectIdSet * | rhs | ) |
It performs the union operation between this ObjectIdSet and the given ObjectIdSet.
| rhs | A valid ObjectIdSet that will be used on union operation. Do not pass NULL! |
Definition at line 251 of file ObjectIdSet.cpp.
References add(), m_oids, and setExpressionByInClause().
Referenced by te::da::SpatialQueryProcessor::getOIDSet(), and te::map::AbstractLayer::select().
|
private |
Definition at line 222 of file ObjectIdSet.h.
Referenced by isExpressionClauseIn(), and setExpression().
|
private |
The expression that can be used to retrieve the data set that contains the all indentified elements.
Definition at line 220 of file ObjectIdSet.h.
Referenced by getExpression(), isExpressionClauseIn(), ObjectIdSet(), setExpression(), and ~ObjectIdSet().
|
private |
The set of unique ids.
Definition at line 219 of file ObjectIdSet.h.
Referenced by add(), begin(), clear(), contains(), difference(), end(), getExpressionByInClause(), ObjectIdSet(), remove(), setExpressionByInClause(), size(), symDifference(), Union(), and ~ObjectIdSet().
|
private |
The list of property names used to generate the unique ids.
Definition at line 216 of file ObjectIdSet.h.
Referenced by addProperty(), getExpressionByInClause(), getPropertyNames(), and setExpressionByInClause().
|
private |
The list of property positions used to generate the unique ids.
Definition at line 217 of file ObjectIdSet.h.
Referenced by addProperty(), and getPropertyPos().
|
private |
The list of property types used to generate the unique ids.
Definition at line 218 of file ObjectIdSet.h.
Referenced by addProperty(), getExpressionByInClause(), getPropertyTypes(), and setExpressionByInClause().