27 #include "../../common/STLUtils.h" 28 #include "../../core/translator/Translator.h" 29 #include "../../datatype/Enums.h" 30 #include "../../geometry/Envelope.h" 31 #include "../query/And.h" 32 #include "../query/Expression.h" 33 #include "../query/Field.h" 34 #include "../query/In.h" 35 #include "../query/Literal.h" 36 #include "../query/LiteralEnvelope.h" 37 #include "../query/LiteralString.h" 38 #include "../query/ST_Intersects.h" 39 #include "../Exception.h" 62 std::set<ObjectId*, te::common::LessCmp<ObjectId*> >::const_iterator it;
63 for(it = rhs.
m_oids.begin(); it != rhs.
m_oids.end(); ++it)
64 m_oids.insert((*it)->clone());
77 assert(!name.empty());
115 for(std::size_t i = 0; i <
m_pnames.size(); ++i)
124 std::set<ObjectId*, te::common::LessCmp<ObjectId*> >::const_iterator it;
127 const boost::ptr_vector<te::dt::AbstractData>& data = (*it)->getValue();
163 for(std::size_t i = 0; i <
m_pnames.size(); ++i)
172 std::set<ObjectId*, te::common::LessCmp<ObjectId*> >::const_iterator it;
175 const boost::ptr_vector<te::dt::AbstractData>& data = (*it)->getValue();
245 std::set<te::da::ObjectId*, te::common::LessCmp<te::da::ObjectId*> >::iterator it =
m_oids.find(oid);
255 std::set<te::da::ObjectId*, te::common::LessCmp<te::da::ObjectId*> >& newOids = rhs->
m_oids;
257 std::set<te::da::ObjectId*, te::common::LessCmp<te::da::ObjectId*> >::iterator it;
258 for(it = newOids.begin(); it != newOids.end(); ++it)
276 const std::set<te::da::ObjectId*, te::common::LessCmp<te::da::ObjectId*> >& oidsToRemove = rhs->
m_oids;
278 if(oidsToRemove.empty())
281 std::set<te::da::ObjectId*, te::common::LessCmp<te::da::ObjectId*> >::const_iterator it;
282 for(it = oidsToRemove.begin(); it != oidsToRemove.end(); ++it)
284 std::set<te::da::ObjectId*, te::common::LessCmp<te::da::ObjectId*> >::iterator itSearch =
m_oids.find(*it);
286 if(itSearch ==
m_oids.end())
300 const std::set<te::da::ObjectId*, te::common::LessCmp<te::da::ObjectId*> >& oidsToInsert = rhs->
m_oids;
302 std::set<te::da::ObjectId*, te::common::LessCmp<te::da::ObjectId*> >::const_iterator it;
303 for(it = oidsToInsert.begin(); it != oidsToInsert.end(); ++it)
305 std::set<te::da::ObjectId*, te::common::LessCmp<te::da::ObjectId*> >::iterator itSearch =
m_oids.find(*it);
307 if(itSearch !=
m_oids.end())
313 m_oids.insert((*it)->clone());
const std::vector< int > & getPropertyTypes() const
It returns the property types used to generated the oids.
void add(Expression *arg)
It adds the argument to the function list of arguments.
bool isExpressionClauseIn() const
The Field class can be used to model an expression that takes part of the output items of a SELECT...
Spatial intersects operator.
te::da::Expression * m_expression
The expression that can be used to retrieve the data set that contains the all indentified elements...
Expression * getExpression() const
It returns the expression set for an output select query.
virtual Expression * clone() const =0
It creates a new copy of this expression.
This class represents an unique id for a data set element.
std::vector< std::string > m_pnames
The list of property names used to generate the unique ids.
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.
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 ele...
This is an abstract class that models a query expression.
This class represents a set of unique ids created in the same context. i.e. from the same data set...
An Envelope defines a 2D rectangular region.
This class models a literal value.
This class represents a set of unique ids created in the same context. i.e. from the same data set...
This class represents an unique id for a data set element.
void setExpressionByInClause(const std::string source="")
std::size_t size() const
It returns the object id set size.
ObjectIdSet()
Constructor.
std::set< ObjectId *, te::common::LessCmp< ObjectId * > > m_oids
The set of unique ids.
void setExpressionByIntersection(std::string geomAttrName, te::gm::Envelope env, int srid)
std::vector< std::size_t > m_ppos
The list of property positions used to generate the unique ids.
std::vector< int > m_ptypes
The list of property types used to generate the unique ids.
void symDifference(const ObjectIdSet *rhs)
It performs the symmetric difference operation between this ObjectIdSet and the given ObjectIdSet...
void remove(ObjectId *oid)
Removes the object id from set.
std::set< ObjectId *, te::common::LessCmp< ObjectId * > >::const_iterator end() const
Returns an iterator for the object ids in container.
void Union(ObjectIdSet *rhs)
It performs the union operation between this ObjectIdSet and the given ObjectIdSet.
void clear()
It clears this object id set.
bool contains(ObjectId *oid) const
It returns if the object id set contains the given oid.
A class that models a literal for Envelope values.
const std::vector< std::string > & getPropertyNames() const
It returns the property names used to generated the oids.
Expression * getExpressionByInClause(const std::string source="") const
void add(ObjectId *oid)
It adds an object id to this object id set.
A class that represents the IN operator.
const std::vector< std::size_t > & getPropertyPos() const
It returns the property positions used to generated the oids.
std::set< ObjectId *, te::common::LessCmp< ObjectId * > >::const_iterator begin() const
Returns an iterator for the object ids in container.
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...
ObjectIdSet * clone() const
Expression * getExpression() const
It returns the expression that can be used to retrieve the data set that contains the all indentified...
std::size_t getNumArgs() const
It returns the number of arguments informed to the function.
void difference(const ObjectIdSet *rhs)
It performs the difference operation between this ObjectIdSet and the given ObjectIdSet.
~ObjectIdSet()
Destructor.
This class models a string Literal value.