Ql_operation Class Reference

#include <Ql_operation.hxx>

Inherited by Ql_otherops, and Ql_varop.

Inheritance diagram for Ql_operation:

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

Public Member Functions

 Ql_operation (int)
virtual ~Ql_operation ()
int name ()
int nb_depends_on ()
Ql_varop * depends_on (int i)
Ql_varop ** depends_on ()
Ql_iterop * nested_in ()
Ql_kind kind ()
TypeList * type ()
Ql_type * p_type ()
void kind (Ql_kind k)
void type (TypeList *t)
Ql_res * result ()
void update_inverse_links (Ql_operation *)
int is_union ()
void is_union (int t)
int is_pushable ()
void is_pushable (int t)
Ql_operation * referenced_by (int i)
Ql_operation ** referenced_by ()
int nb_referenced_by ()
void referenced_by (Ql_operation **r)
void nb_referenced_by (int n)
int new_utype ()
void new_utype (int e)
Ql_baseop1 * exists_op1 (int)
Ql_baseop2 * exists_op2 (int, Ql_operation *)
Ql_baseop2 * exists_op2_com (int, Ql_operation *)
Ql_baseopn * exists_opn (int, Ql_operation **, int)
Ql_baseopn * exists_opn_com (int, Ql_operation **, int)
virtual int is_equiv (Ql_operation *, Ql_renaming *, Ql_iterop *)=0
virtual int evaluate ()=0
void nb_depends_on (int i)
void nb_depends_on_inc ()
void depends_on (Ql_varop *dep, int i)
void depends_on (Ql_varop **deps)
void free_depends_on ()
void nested_in (Ql_iterop *iter)
void result (Ql_res *r)
void result (ResultSet *r)
void result (char *r)
void result (long long r)
void result (int r)
void result (double r)
void result (char r)

Protected Attributes

Ql_type * v_type
Ql_res * v_result

Detailed Description

Class Ql_operation contains the informations that are common to all the nodes in the graph : the name of the operation it represents, its type (kind, structure, type handle), its result, its semantics (the address of a function), the edges whose destination is the node, the iterator (the circle) in which the operation is located, and the variable dependency zone to which the node belongs (darkened oval). This class has no direct instances.

Author:
Grigoris Karvounarakis
Version:
1.0


Constructor & Destructor Documentation

Ql_operation::Ql_operation ( int  n  ) 

Construction of an operation

Parameters:
n the name of this operation (see include/ql_tree.h)

Ql_operation::~Ql_operation (  )  [virtual]

Destruction of an operation


Member Function Documentation

int Ql_operation::name (  )  [inline]

Returns:
the name (code - see include/ql_tree.h) of the operation

int Ql_operation::nb_depends_on (  )  [inline]

Returns:
the number of variables that this operation depends on

Ql_varop* Ql_operation::depends_on ( int  i  )  [inline]

Parameters:
i 
Returns:
the ith variable from those that this operation depends on or NULL

Ql_varop** Ql_operation::depends_on (  )  [inline]

Returns:
an array with the variables that this operation depends on or NULL

Ql_iterop* Ql_operation::nested_in (  )  [inline]

Returns:
the iterator in which this operation is nested

Ql_kind Ql_operation::kind (  )  [inline]

Returns:
the kind of this operation

TypeList* Ql_operation::type (  )  [inline]

Returns:
the type of the members of this operation, if it is a collection of any kind

Ql_type* Ql_operation::p_type (  )  [inline]

for internal use only

void Ql_operation::kind ( Ql_kind  k  )  [inline]

Set the kind of this operation

Parameters:
k the kind to set

void Ql_operation::type ( TypeList *  t  )  [inline]

Set the type of this operation

Parameters:
t the type to set

Ql_res* Ql_operation::result (  )  [inline]

Returns:
an object containing the result of the evaluation this operation

void Ql_operation::update_inverse_links ( Ql_operation *  op  ) 

Update of the attributes referenced_by & nb_referenced_by of this operation. Allocations are done 8 by 8.

Parameters:
op the operation that references "this" operation.

int Ql_operation::is_union (  )  [inline]

Returns:
true (1) if the type of this operation is a union of types

void Ql_operation::is_union ( int  t  )  [inline]

Set indicator of union type

Parameters:
t true (1) if the type of this operation should be set to a union of types, false (0) otherwise

int Ql_operation::is_pushable (  )  [inline]

Returns:
true (1) if the type of this operation can be translated to SQL

void Ql_operation::is_pushable ( int  t  )  [inline]

Set indicator of operations that can be translated to SQL

Parameters:
t true (1) if the type of this operation can be translated, false (0) otherwise

Ql_operation* Ql_operation::referenced_by ( int  i  )  [inline]

Returns:
the ith operation from those that reference "this" operation

Ql_operation** Ql_operation::referenced_by (  )  [inline]

Returns:
an array containing the operations that reference "this" operation

int Ql_operation::nb_referenced_by (  )  [inline]

Returns:
the number of operations that reference "this" operation

void Ql_operation::referenced_by ( Ql_operation **  r  )  [inline]

Set the array of operations that reference "this" operation

void Ql_operation::nb_referenced_by ( int  n  )  [inline]

Set the number of operations that reference "this" operation

int Ql_operation::new_utype (  )  [inline]

Returns:
true (1) if the evaluation of this operation (which has union type) returned a value of a new type, that should be added in the list of actual types of the values of this operation. Used to also update the list of types of operations that depend on "this" operation.

void Ql_operation::new_utype ( int  e  )  [inline]

Set to true (1) when a value of a new type is returned by the evaluation, or to false (0) otherwise.

Ql_baseop1 * Ql_operation::exists_op1 ( int  op_name  ) 

Search for an existing operation of arity 1. "this" represents the parameter.

Parameters:
op_name the name of the operation we are looking for
Returns:
the operation or NULL if not found

Ql_baseop2 * Ql_operation::exists_op2 ( int  op_name,
Ql_operation *  par2 
)

Search for an existing operation of arity 2. "this" represents the first parameter.

Parameters:
op_name the name of the operation we are looking for
par2 the second parameter of the operation
Returns:
the operation or NULL if not found

Ql_baseop2 * Ql_operation::exists_op2_com ( int  op_name,
Ql_operation *  par2 
)

Search for an existing commutative operation of arity 2. "this" represents the first parameter.

Parameters:
op_name the name of the operation we are looking for
par2 the second parameter of the operation
Returns:
the operation or NULL if not found

Ql_baseopn * Ql_operation::exists_opn ( int  op_name,
Ql_operation **  params,
int  arity 
)

Search for an existing operation of arity n. "this" represents the first parameter.

Parameters:
op_name the name of the operation we are looking for
params an array containing the other parameters of the operation
arity the number of parameters of the operation
Returns:
the operation or NULL if not found

Ql_baseopn * Ql_operation::exists_opn_com ( int  op_name,
Ql_operation **  params,
int  arity 
)

Search for an existing commutative operation of arity n. "this" represents the first parameter.

Parameters:
op_name the name of the operation we are looking for
params an array containing the other parameters of the operation
arity the number of parameters of the operation
Returns:
the operation or NULL if not found

virtual int Ql_operation::is_equiv ( Ql_operation *  ,
Ql_renaming *  ,
Ql_iterop *   
) [pure virtual]

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

Implemented in Ql_algiterop, Ql_baseop0, Ql_baseop1, Ql_baseop2, Ql_baseopn, Ql_nameop, Ql_quantiterop, and Ql_scanop.

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

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

Implemented in Ql_baseop0, Ql_baseop1, Ql_baseop2, Ql_baseopn, Ql_class_scanop, Ql_iterop, Ql_multiple_scanop, Ql_nameop, Ql_property_scanop, Ql_scanop, Ql_static_scanop, and Ql_variable_scanop.

void Ql_operation::nb_depends_on ( int  i  )  [inline]

Set the number of variables on which "this" operation depends

void Ql_operation::nb_depends_on_inc (  )  [inline]

Increase the number of variables on which "this" operation depends by one

void Ql_operation::depends_on ( Ql_varop *  dep,
int  i 
) [inline]

Set the ith variables on which "this" operation depends to dep

void Ql_operation::depends_on ( Ql_varop **  deps  )  [inline]

Set the array of variables on which "this" operation depends to deps

void Ql_operation::free_depends_on (  )  [inline]

Free the array of variables on which "this" operation depends

void Ql_operation::nested_in ( Ql_iterop *  iter  )  [inline]

Set the iterator in which "this" operation is nested to iter

void Ql_operation::result ( Ql_res *  r  )  [inline]

Set the result of this operation according to the given result object and its kind

void Ql_operation::result ( ResultSet *  r  )  [inline]

Set the result of this operation according to the given ResultSet (for operation of complex types, i.e. sequences)

void Ql_operation::result ( char *  r  )  [inline]

Set the result of this operation according to the given string value (used to represent strings, resource URIs and metaclass names)

void Ql_operation::result ( long long  r  )  [inline]

Set the result of this operation according to the given long long value (used to represent dates)

void Ql_operation::result ( int  r  )  [inline]

Set the result of this operation according to the given integer value (used to represent integers, class ids, property ids and bag ids)

void Ql_operation::result ( double  r  )  [inline]

Set the result of this operation according to the given double value (used to represent floating point values)

void Ql_operation::result ( char  r  )  [inline]

Set the result of this operation according to the given char value (used to represent characters or boolean values)


Member Data Documentation

Ql_type* Ql_operation::v_type [protected]

The type of this operation

Ql_res* Ql_operation::v_result [protected]

An object for storing the result of this operation at each step of the evaluation of a query


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