Ql_iterop Class Reference

#include <Ql_iterop.hxx>

Inherits Ql_otherops.

Inherited by Ql_algiterop, and Ql_quantiterop.

Inheritance diagram for Ql_iterop:

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

Public Member Functions

 Ql_iterop (int, Ql_iterop *, int)
virtual ~Ql_iterop ()
int level_of_inclusion ()
virtual Ql_operation * exists_var (char *)=0
Ql_iterop * test_add_nested_iter (Ql_iterop *)
void add_nested_op (Ql_operation *)
void update_nesting_links (Ql_varop **, int, Ql_iterop *)
Ql_iterop * included_in ()
int evaluate ()
void name_vars (Ql_nameop **v)
void nb_name_vars (int n)
Ql_nameop * name_vars (int i)
Ql_nameop ** name_vars ()
int nb_name_vars ()
void inc_nb_name_vars ()

Protected Attributes

int(Ql_iterop::* v_code )()

Detailed Description

Class Ql_iterop groups the information common to all iterators. This information mainly concerns the notion of nesting (for evaluation) and inclusion (for construction). This class has no direct instances.

Author:
Grigoris Karvounarakis
Version:
1.0


Constructor & Destructor Documentation

Ql_iterop::Ql_iterop ( int  n,
Ql_iterop *  i,
int  li 
)

Construction of an iterator

Parameters:
n the name of this operation
i the nesting iterator (i.e. the one "this" is nested in)
li the depth in which "this" iterator is nested

Ql_iterop::~Ql_iterop (  )  [virtual]

Destruction of an iterator and of its embedded operations


Member Function Documentation

int Ql_iterop::level_of_inclusion (  )  [inline]

Returns:
the depth in which this iterator is nested

virtual Ql_operation* Ql_iterop::exists_var ( char *   )  [pure virtual]

Virtual method, implemented in Ql_algiterop

Implemented in Ql_algiterop, and Ql_quantiterop.

Ql_iterop * Ql_iterop::test_add_nested_iter ( Ql_iterop *  iter  ) 

Search for an equivalent iterator in the list of nested iterators of one iterator.

Returns:
if we find one, we return it, otherwise we add the new one to the list and return NULL

void Ql_iterop::add_nested_op ( Ql_operation *  op  ) 

Function that adds a pointer to the list of pointers allocated in the circle corresponding to this iterator. Space is allocated 32 by 32

Parameters:
op the operation to be added

void Ql_iterop::update_nesting_links ( Ql_varop **  vars,
int  nb_vars,
Ql_iterop *  iter 
)

Function that updates the attribute nested_in and depends_on of an iterator. It is called on "this" everytime a var or an iterator is accessed for an operation included in "this". It is a recursive function

Parameters:
vars the vars on which "this" depends (directly or transitively) the number of variables the iterator to which these variables belong

Ql_iterop* Ql_iterop::included_in (  )  [inline]

Returns:
the iterator in which "this" iterator is nested

int Ql_iterop::evaluate (  )  [virtual]

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

Implements Ql_operation.

void Ql_iterop::name_vars ( Ql_nameop **  v  )  [inline]

Set the array of named variables defined in this iterator to v

void Ql_iterop::nb_name_vars ( int  n  )  [inline]

Set the number of named variables defined in this iterator to n

Ql_nameop* Ql_iterop::name_vars ( int  i  )  [inline]

Returns:
the ith named variable defined in this iterator

Ql_nameop** Ql_iterop::name_vars (  )  [inline]

Returns:
the array of named variables defined in this iterator

int Ql_iterop::nb_name_vars (  )  [inline]

Returns:
the number of named variables defined in this iterator

void Ql_iterop::inc_nb_name_vars (  )  [inline]

Increase the number of named variables defined in this iterator by 1


Member Data Documentation

int(Ql_iterop::* Ql_iterop::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:13:00 2006 for rql by  doxygen 1.5.0