Ql_baseopn Class Reference

#include <Ql_baseopn.hxx>

Inherits Ql_otherops.

Inheritance diagram for Ql_baseopn:

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

Public Member Functions

 Ql_baseopn (int n, Ql_operation **p, int a)
virtual ~Ql_baseopn ()
int arity ()
void arity (int i)
Ql_operation * parameters (int i)
Ql_operation ** parameters ()
void parameters (Ql_operation **p)
void update_nesting_links ()
int has_params (Ql_operation **, int)
int has_params_com (Ql_operation **, int)
virtual int is_equiv (Ql_operation *, Ql_renaming *, Ql_iterop *)
int type_infer (int *)
int evaluate ()

Detailed Description

Class Ql_baseopn concerns the base operation of variable arity (set, tuple, ...). They are characterized by their parameters and arity.

Author:
Grigoris Karvounarakis
Version:
1.0


Constructor & Destructor Documentation

Ql_baseopn::Ql_baseopn ( int  n,
Ql_operation **  p,
int  a 
)

Construction of a baseopn operation

Ql_baseopn::~Ql_baseopn (  )  [virtual]

Destruction of a baseopn operation


Member Function Documentation

int Ql_baseopn::arity (  )  [inline]

Returns:
the number of parameters of this operation

void Ql_baseopn::arity ( int  i  )  [inline]

Set the number of parameters of this operation to i

Ql_operation* Ql_baseopn::parameters ( int  i  )  [inline]

Returns:
the ith parameter of this operation

Ql_operation** Ql_baseopn::parameters (  )  [inline]

Returns:
an array with the parameters of this operation

void Ql_baseopn::parameters ( Ql_operation **  p  )  [inline]

Set the array with the parameters of this operation to p

void Ql_baseopn::update_nesting_links (  ) 

Update of the dependency links. A baseopn operation is nested in the most embedded iterator its parameters are nested in and depends on the variables belonging to this iterator and on which its parameters depend

int Ql_baseopn::has_params ( Ql_operation **  params,
int  nb_params 
)

Checks if "this" baseopn has the given parameters

Parameters:
params the array of parameters to compare with
nb_params the size of the given array
Returns:
true (1) if the parameters of "this" baseopn are exactly equal (pointer equality) and in the same order with the contents of the given array, false (0) otherwise

int Ql_baseopn::has_params_com ( Ql_operation **  params,
int  nb_params 
)

Checks if "this" baseopn has the given parameters

Parameters:
params the array of parameters to compare with
nb_params the size of the given array
Returns:
true (1) if the parameters of "this" baseopn are exactly equal (pointer equality), possibly in different order with the contents of the given array, false (0) otherwise

int Ql_baseopn::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.

int Ql_baseopn::type_infer ( int *  error_code  ) 

This function performs type inference and assigns evaluation functions for baseopns

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_baseopn::evaluate (  )  [virtual]

Baseopn evaluation differs from other baseop: we do not evaluate all the parameters because it is not always necessary (and, or)

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

Implements Ql_operation.


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