Ql_baseop1 Class Reference

#include <Ql_baseop1.hxx>

Inherits Ql_otherops.

Inheritance diagram for Ql_baseop1:

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

Public Member Functions

 Ql_baseop1 (int, Ql_operation *)
 ~Ql_baseop1 ()
Ql_operation * parameter ()
int is_equiv (Ql_operation *, Ql_renaming *, Ql_iterop *)
void update_nesting_links ()
int type_infer (int *)
int type_infer (char *, int *)
int evaluate ()
int set_to_true ()

Protected Attributes

int(Ql_baseop1::* v_code )()

Detailed Description

Class Ql_baseop1 concerns the base operation of arity 1 (domain, range, subclassof, count, etc.). They are characterized by their unique parameter

Author:
Grigoris Karvounarakis
Version:
1.0


Constructor & Destructor Documentation

Ql_baseop1::Ql_baseop1 ( int  n,
Ql_operation *  p 
)

Construction of a baseop1 operation

Ql_baseop1::~Ql_baseop1 (  ) 

Destruction of a baseop1


Member Function Documentation

Ql_operation* Ql_baseop1::parameter (  )  [inline]

Returns:
the parameter of this operation

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

Used when testing the equivalence of two iterators. (see Ql_algiterop::is_equiv(Ql_operation *, Ql_renaming *, Ql_iterop *) Checks the equivalence of two operations inside the main query (circle=NULL) or inside an iterator (circle<>NULL) according to a variable renaming. The rule says that outside the circle the operations must be strictly equal and that inside they must be equivalent (variables renaming).

Parameters:
op the operation to check equivalence with
renaming a variable renaming
circle the iterator in which we check the equivalence
Returns:
true (1) if they are equivalent, false (0) otherwise

Implements Ql_operation.

void Ql_baseop1::update_nesting_links (  ) 

Update of the dependency links. A unary operation depends on the variables on which its parameter depends and is nested in the iterator its parameter is nested in

int Ql_baseop1::type_infer ( int *  error_code  ) 

This function performs type inference and assigns evaluation functions for baseop1s

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_baseop1::type_infer ( char *  ,
int *   
) [inline]

Dummy method ... always returns OK

int Ql_baseop1::evaluate (  )  [virtual]

Check if the stored result is outdated. If yes, execute the proper evaluation function.

Returns:
KO (1) if there was a runtime error, OK otherwise

Implements Ql_operation.

int Ql_baseop1::set_to_true (  )  [inline]

In case this operation can be pushed to the underlying database, this field contains the equivalent query string which is appended to the appropriate scan query


Member Data Documentation

int(Ql_baseop1::* Ql_baseop1::v_code)() [protected]

A pointer to the evaluation function for this operation, assigned at type inference


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