Ql_property_scanop Class Reference

#include <Ql_property_scanop.hxx>

Inherits Ql_schema_scanop.

Inheritance diagram for Ql_property_scanop:

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

Public Member Functions

 Ql_property_scanop (int, char *, Ql_operation *, int, Ql_iterop *)
 ~Ql_property_scanop ()
int evaluate ()
int type_infer (int *)
int union_type_infer (int *)
int scan_open ()
int scan_next ()
void scan_close ()

Detailed Description

Class Ql_property_scanop is a subclass of Ql_schema_scanop, representing scan variables on collections of properties, e.g. the subproperties of a property or the metaclass "Property". Since properties may have resources or atomic values as their to-values, static type inference creates appropriate union types while the real type of the to-values is determined by performing runtime type inference, for each value of this scan operation

Author:
Grigoris Karvounarakis
Version:
1.0


Constructor & Destructor Documentation

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

Construction of a property scan operation. For parameters see Ql_scanop::Ql_scanop()

Ql_property_scanop::~Ql_property_scanop (  ) 

Destruction of a property scan operation


Member Function Documentation

int Ql_property_scanop::evaluate (  )  [inline, virtual]

Dummy function - the evaluation is performed by scan_next and the result is stored

Implements Ql_scanop.

int Ql_property_scanop::type_infer ( int *  error_code  )  [virtual]

Checks if the scan variable is defined on a valid schema collection with elements that represent binary collections (properties). Assigns to the type of the property scan operation, a copy of the type of the elements of the collection, i.e. a sequence of the domain and range types of the property

Parameters:
error_code a placeholder, where an error code is put, in case of error
Returns:
KO (1) if an error occured, OK (1) otherwise

Implements Ql_schema_scanop.

int Ql_property_scanop::union_type_infer ( int *  error_code  ) 

Runtime type inference for property scans. Determines the "real" types for the "from" and "to" values of the property, for the current value of the property and updates the union types if a new type is encountered.

Parameters:
error_code a placeholder, where an error code is put, in case of error
Returns:
KO (1) if an error occured, OK (1) otherwise

int Ql_property_scanop::scan_open (  )  [virtual]

Open a property scan on the collection specified by the domain of definition of this scan variable

Returns:
OK (0) or error code

Implements Ql_schema_scanop.

int Ql_property_scanop::scan_next (  )  [virtual]

Get the next value of the scanned collection. Stores the value in the result of this scan operation. Calls union_type_infer() to perform runtime type inference for each new value

Returns:
OK or SCAN_END, if the scan reached the end of the collection

Implements Ql_schema_scanop.

void Ql_property_scanop::scan_close (  )  [virtual]

Close an open static scan

Implements Ql_schema_scanop.


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