Ql_scanop Class Reference

#include <Ql_scanop.hxx>

Inherits Ql_varop.

Inherited by Ql_data_scanop, Ql_multiple_scanop, and Ql_schema_scanop.

Inheritance diagram for Ql_scanop:

[legend]
Collaboration diagram for Ql_scanop:
[legend]
List of all members.

Public Member Functions

 Ql_scanop (int, char *, Ql_operation *, int, Ql_iterop *)
 ~Ql_scanop ()
int is_equiv (Ql_operation *, Ql_renaming *, Ql_iterop *)
virtual int evaluate ()=0
virtual int type_infer (int *)=0
Ql_operation * domain ()
void domain (Ql_operation *domain)
int pos ()
void pos (int p)
int ev ()
void ev (int e)
virtual int scan_open ()=0
virtual int scan_next ()=0
int scan_next_sfw (int)
virtual void scan_close ()=0

Protected Attributes

Ql_operation * v_domain
char * v_scan
int v_pos
int v_ev

Detailed Description

Class Ql_scanop is a subclass of Ql_varop and concerns the scan variables. They are characterized by a domain of definition a scan, an index descriptor and an indicator whether "this" represents an existential variable (in which case we are only interested in one value satisfying the where clause). It is an abstract class (cannot be instantiated). All scan variables should be instances of one of its subclasses.

Author:
Grigoris Karvounarakis
Version:
1.0


Constructor & Destructor Documentation

Ql_scanop::Ql_scanop ( int  n,
char *  v,
Ql_operation *  dom,
int  pos,
Ql_iterop *  nest 
)

Construction of a scan operation

Parameters:
n the name (code) of the operation
v the name of the variable
dom the domain of definition of this variable
pos the position of this variable in the list of variables of the iterator in which it is defined
nest the iterator in which this variable is defined

Ql_scanop::~Ql_scanop (  ) 

Destruction of a scan operation


Member Function Documentation

int Ql_scanop::is_equiv ( Ql_operation *  op,
Ql_renaming *  renaming,
Ql_iterop *  circle 
) [virtual]

Used when testing the equivalence of two iterators. Checks the equivalence of two operations the first of which is a scanop. Applied inside an iterator (circle) in which the scan vars are possibly renamed

Parameters:
op the operation to check equivalence with
renaming a variable renaming
circle the iterator in which we check the equivalence

Implements Ql_operation.

virtual int Ql_scanop::evaluate (  )  [pure virtual]

Virtual method, implemented for each of the more specific subclasses of Ql_scanop

Implements Ql_operation.

Implemented in Ql_class_scanop, Ql_multiple_scanop, Ql_property_scanop, Ql_static_scanop, and Ql_variable_scanop.

virtual int Ql_scanop::type_infer ( int *   )  [pure virtual]

Virtual method, implemented for each of the more specific subclasses of Ql_scanop

Implemented in Ql_class_scanop, Ql_data_scanop, Ql_multiple_scanop, Ql_property_scanop, Ql_schema_scanop, Ql_static_scanop, and Ql_variable_scanop.

Ql_operation* Ql_scanop::domain (  )  [inline]

Returns:
the domain of definition of "this" scan variable

void Ql_scanop::domain ( Ql_operation *  domain  )  [inline]

Set the domain of definition of "this" scan variable to domain

int Ql_scanop::pos (  )  [inline]

Returns:
the position of this variable in the list of variables of the iterator where it is defined

void Ql_scanop::pos ( int  p  )  [inline]

Set the position of this variable in the list of variables of the iterator where it is defined to p

int Ql_scanop::ev (  )  [inline]

Returns:
true (1) if "this" is an existential variable

void Ql_scanop::ev ( int  e  )  [inline]

Set the "existential variable" indicator to e

virtual int Ql_scanop::scan_open (  )  [pure virtual]

Virtual method, implemented for each of the more specific subclasses of Ql_scanop

Implemented in Ql_class_scanop, Ql_data_scanop, Ql_multiple_scanop, Ql_property_scanop, Ql_schema_scanop, Ql_static_scanop, and Ql_variable_scanop.

virtual int Ql_scanop::scan_next (  )  [pure virtual]

Virtual method, implemented for each of the more specific subclasses of Ql_scanop

Implemented in Ql_class_scanop, Ql_data_scanop, Ql_multiple_scanop, Ql_property_scanop, Ql_schema_scanop, Ql_static_scanop, and Ql_variable_scanop.

int Ql_scanop::scan_next_sfw ( int  where_satisfied  ) 

Used only for sf or sfw scans: if existential var and the where clause has been satisfied scan_end else check the condition on the variable if there is one. Scan until the condition is true

Parameters:
where_satisfied indicates if the conditions on this scan have already been satisfied (so that if "this" is an existential variable, we do not need to scan any more values)
Returns:
OK, error_code or SCAN_END, if the scan reached the end of the collection

Reimplemented in Ql_multiple_scanop.

virtual void Ql_scanop::scan_close (  )  [pure virtual]

Virtual method, implemented for each of the more specific subclasses of Ql_scanop

Implemented in Ql_class_scanop, Ql_data_scanop, Ql_multiple_scanop, Ql_property_scanop, Ql_schema_scanop, Ql_static_scanop, and Ql_variable_scanop.


Member Data Documentation

Ql_operation* Ql_scanop::v_domain [protected]

The domain of definition, which determines the collection on which this scan should be performed

char* Ql_scanop::v_scan [protected]

The DB cursor for the scan query, when the scan is open

int Ql_scanop::v_pos [protected]

The position of "this" scanop in the list of scan variables of the iterator

int Ql_scanop::v_ev [protected]

Indicates whether "this" is an "existential variable" or not


The documentation for this class was generated from the following files:
Generated on Thu Oct 26 17:13:04 2006 for rql by  doxygen 1.5.0