All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
te::fe::Filter Class Reference

A filter is any valid predicate expression. More...

#include <Filter.h>

Public Member Functions

Initializer Methods

Methods related to instantiation and destruction.

 Filter ()
 It initializes a new Filter. More...
 
 ~Filter ()
 Destructor. More...
 
Accessor methods

Methods used to get or set properties.

void setOp (AbstractOp *o)
 It sets the filter main operation (expression). More...
 
AbstractOpgetOp () const
 It returns main filter operation. More...
 
void add (ObjectId *id)
 It adds the object identifier to the list of identifiers. More...
 
ObjectIdoperator[] (size_t i) const
 It returns a specified object identifier. More...
 
ObjectIdgetOid (size_t i) const
 It returns a specified object identifier. More...
 
size_t getNumberOfOids () const
 It returns the size of the list of object identifiers. More...
 
void clear ()
 It clears the object identifier list and drop it off. More...
 

Private Member Functions

Not Allowed Methods

No copy allowed.

 Filter (const Filter &rhs)
 No copy constructor allowed. More...
 
Filteroperator= (const Filter &rhs)
 No assignment operator allowed. More...
 

Private Attributes

std::vector< ObjectId * > * m_ids
 Object identifiers. (NULL if m_op is informed) More...
 
AbstractOpm_op
 May be: SpatialOp, ComparisonOp or LogicOp. (NULL if m_ids is informed) More...
 

Detailed Description

A filter is any valid predicate expression.

A Filter contains a expression which is created by combining other expressions.

See also
AbstractOp, ObjectId

Definition at line 52 of file Filter.h.

Constructor & Destructor Documentation

Filter::Filter ( )

It initializes a new Filter.

Definition at line 33 of file Filter.cpp.

Filter::~Filter ( )

Destructor.

Definition at line 39 of file Filter.cpp.

References te::common::FreeContents().

te::fe::Filter::Filter ( const Filter rhs)
private

No copy constructor allowed.

Parameters
rhsThe other instance.

Member Function Documentation

void Filter::add ( ObjectId id)

It adds the object identifier to the list of identifiers.

Parameters
idThe object identifier to be added to the list of identifiers.
Note
The Filter object will take the ownership of the object identifier. So, you must not free it.

Definition at line 61 of file Filter.cpp.

void Filter::clear ( )

It clears the object identifier list and drop it off.

Note
After calling this method it will be safe to set an operator.

Definition at line 86 of file Filter.cpp.

References te::common::FreeContents().

size_t Filter::getNumberOfOids ( ) const

It returns the size of the list of object identifiers.

Returns
The size of the list of object identifiers.

Definition at line 81 of file Filter.cpp.

Referenced by te::map::QueryEncoder::getExpression().

te::fe::ObjectId * Filter::getOid ( size_t  i) const

It returns a specified object identifier.

Parameters
iThe index of desired object identifier.
Returns
A specified object identifier.
Note
You must not clear the returned object identifier.
The method will not check the index range.

Definition at line 75 of file Filter.cpp.

Referenced by te::map::QueryEncoder::getExpression().

te::fe::AbstractOp * Filter::getOp ( ) const

It returns main filter operation.

Returns
The main filter operation.

Definition at line 56 of file Filter.cpp.

Referenced by te::map::QueryEncoder::getExpression(), and te::fe::serialize::Save().

Filter& te::fe::Filter::operator= ( const Filter rhs)
private

No assignment operator allowed.

Parameters
rhsThe other instance.
Returns
A reference for this.
te::fe::ObjectId * Filter::operator[] ( size_t  i) const

It returns a specified object identifier.

Parameters
iThe index of desired object identifier.
Returns
A specified object identifier.
Note
You must not clear the returned object identifier.
The method will not check the index range.

Definition at line 69 of file Filter.cpp.

void Filter::setOp ( AbstractOp o)

It sets the filter main operation (expression).

Parameters
oThe main operation (also called an expression).
Note
The Filter object will take the ownership of the given operation.

Definition at line 50 of file Filter.cpp.

Member Data Documentation

std::vector<ObjectId*>* te::fe::Filter::m_ids
private

Object identifiers. (NULL if m_op is informed)

Definition at line 169 of file Filter.h.

AbstractOp* te::fe::Filter::m_op
private

May be: SpatialOp, ComparisonOp or LogicOp. (NULL if m_ids is informed)

Definition at line 168 of file Filter.h.


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