Ql_query Class Reference

#include <Ql_query.hxx>

Collaboration diagram for Ql_query:

[legend]
List of all members.

Public Member Functions

 Ql_query (int)
void add_cst_base_root (Ql_baseop0 *)
void add_cst_iter_op (Ql_iterop *)
void add_cst_base_op (Ql_operation *)
Ql_baseop0 * exists_cst_base_root (int, char *, Ql_baseop0 *)
Ql_iterop * test_add_cst_iter_op (Ql_iterop *)
Ql_nameop * exists_namespace (char *)
Ql_baseop0 * exists_nsop (char *)
Ql_operation * construct_graph (Ql_tree_node *, Ql_iterop *, Ql_dup_cell *, Ql_argument *, int *)
Ql_operation * result_operation ()
int stands_alone ()
int defined_namespaces ()
void result_operation (Ql_operation *res)
int evaluate ()
 ~Ql_query ()

Detailed Description

This file contains the definition of class Ql_query. This class has only one occurence which represents the main query. See the interpreter specifications for details.

Author:
Grigoris Karvounarakis
Version:
1.0


Constructor & Destructor Documentation

Ql_query::Ql_query ( int  stands_alone  ) 

To constuct a query

Ql_query::~Ql_query (  ) 

To free the space allocated for a query


Member Function Documentation

void Ql_query::add_cst_base_root ( Ql_baseop0 *  cst  ) 

To add a constant operation of class Ql_baseop0. Space is allocated 8 by 8

Parameters:
cst the constant operation to be added

void Ql_query::add_cst_iter_op ( Ql_iterop *  cst  ) 

To add a constant operation of class Ql_iterop. Space is allocated 8 by 8

Parameters:
cst The constant iterator to be added

void Ql_query::add_cst_base_op ( Ql_operation *  op  ) 

To add a constant operation that is not an iteration or a baseop0(root). Space is allocated 8 by 8

Parameters:
op The constant operation to be added

Ql_baseop0 * Ql_query::exists_cst_base_root ( int  op_name,
char *  op_value,
Ql_baseop0 *  op_ns 
)

Function that tests the existence of a constant operation

Parameters:
op_name the name (kind) of the constant operation (i.e. id_n) we are looking for
op_value the value of the operation
Returns:
returns the operation or NULL, if not found

Ql_iterop * Ql_query::test_add_cst_iter_op ( Ql_iterop *  op  ) 

Function that tests the existence of a constant iteration.

Parameters:
op the constant iteration to be added
Returns:
the operation that was stored if it finds one, else it stores the new one and returns NULL

Ql_nameop * Ql_query::exists_namespace ( char *  ns  ) 

Function that tests if the given string corresponds to an already defined namespace variable

Parameters:
ns the namespace URI
Returns:
the namespace variable to which the name or NULL, if not found

Ql_baseop0 * Ql_query::exists_nsop ( char *  ns  ) 

Function that tests if the given namespace URI has already been used in a namespace definition

Parameters:
ns the namespace URI
Returns:
the namespace operation used as a value of the namespace definition or NULL, if not found

Ql_operation * Ql_query::construct_graph ( Ql_tree_node *  query_tree,
Ql_iterop *  current_iter,
Ql_dup_cell *  cnf_dup_table,
Ql_argument *  ql_arguments,
int *  error_code 
)

Construction of a query graph. One treatment for each type of query (see specifications). Each operation that is created is 'inserted' properly into the graph (i.e. type inference and factorization are performed and dependencies and nesting links are updated).

Parameters:
query_tree the node in the parse tree pointing to the part of the query to be constructed
current_iter the iterator within which this operation is created
cnf_dup_table 
ql_arguments 
error_code placeholder where an appropriate error code is put, in case of an error, so that it can be processed by the caller
Returns:
Recursive function that returns the graph or NULL if some problem occured

WILD GUESS: Back to v1.5 one_variable_scan_var_n, 0, cnf_dup_table, error_code));

WILD GUESS: Back to v1.5 one_variable_scan_var_n, 0, cnf_dup_table, error_code));

WILD GUESS: Back to v1.5 one_variable_scan_var_n, 0, cnf_dup_table, error_code));

Ql_operation* Ql_query::result_operation (  )  [inline]

Returns:
result operation for this query

int Ql_query::stands_alone (  )  [inline]

Returns:
1 if the query stands alone, 0 otherwise

int Ql_query::defined_namespaces (  )  [inline]

Returns:
1 if there are namespaces defined in the query

void Ql_query::result_operation ( Ql_operation *  res  )  [inline]

Set result operation for this query

int Ql_query::evaluate (  ) 

Evaluate the query and store result if needed


The documentation for this class was generated from the following files:
Generated on Thu Oct 26 16:42:11 2006 for rul by  doxygen 1.5.0