Zen
A cross-platform functional programming language

QueryExpr Class Reference

Concrete class for AST Node representing a query. More...

#include <Ast.hpp>

Inheritance diagram for QueryExpr:
Expr Node

List of all members.

Public Member Functions

 QueryExpr (const QualifiedType &type, const Expr &expr)
 Default constructor.
const ExprgetExpr () const
 Returns the query expression.

Private Member Functions

virtual void visit (Expr::Visitor &visitor) const
 Abstract visitor function.

Private Attributes

const Expr_expr

Detailed Description

Concrete class for AST Node representing a query.

A query is used to extract data from certain data structures such as trees and databases. For example:

        local y = { @name::(true) && @age::((val > 25) && (val < 35))};

Here, y is a query that returns the age value if between 25 and 35, and the name value unconditionally.


Constructor & Destructor Documentation

QueryExpr ( const QualifiedType type,
const Expr expr 
) [inline]

Default constructor.

Parameters:
typeExpression type
exprThe root node of the query expression, usually consisting of query expression parts.

Member Function Documentation

const Expr& getExpr ( ) const [inline]

Returns the query expression.

Returns:
The query expression
void visit ( Expr::Visitor visitor) const [private, virtual]

Abstract visitor function.

Parameters:
visitorThe visitor object.

Implements Expr.


Member Data Documentation

const Expr& _expr [private]
Returns:
The query expression

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines