All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | List of all members
cudf::ast::tree Class Reference

An AST expression tree. It owns and contains multiple dependent expressions. All the expressions are destroyed when the tree is destroyed. More...

#include <expressions.hpp>

Public Member Functions

 tree ()=default
 construct an empty ast tree
 
 tree (tree &&)=default
 Moves the ast tree.
 
treeoperator= (tree &&)=default
 move-assigns the AST tree More...
 
 tree (tree const &)=delete
 
treeoperator= (tree const &)=delete
 
template<typename Expr , typename... Args>
std::enable_if_t< std::is_base_of_v< expression, Expr >, Expr const & > emplace (Args &&... args)
 Add an expression to the AST tree. More...
 
template<typename Expr >
decltype(auto) push (Expr expr)
 Add an expression to the AST tree. More...
 
expression const & front () const
 get the first expression in the tree More...
 
expression const & back () const
 get the last expression in the tree More...
 
size_t size () const
 get the number of expressions added to the tree More...
 
expression const & at (size_t index)
 get the expression at an index in the tree. Index is checked. More...
 
expression const & operator[] (size_t index) const
 get the expression at an index in the tree. Index is unchecked. More...
 

Detailed Description

An AST expression tree. It owns and contains multiple dependent expressions. All the expressions are destroyed when the tree is destroyed.

Definition at line 561 of file expressions.hpp.

Member Function Documentation

◆ at()

expression const& cudf::ast::tree::at ( size_t  index)
inline

get the expression at an index in the tree. Index is checked.

Parameters
indexindex of expression in the ast tree
Returns
the expression at the specified index

Definition at line 633 of file expressions.hpp.

◆ back()

expression const& cudf::ast::tree::back ( ) const
inline

get the last expression in the tree

Returns
the last inserted expression into the tree

Definition at line 620 of file expressions.hpp.

◆ emplace()

template<typename Expr , typename... Args>
std::enable_if_t<std::is_base_of_v<expression, Expr>, Expr const&> cudf::ast::tree::emplace ( Args &&...  args)
inline

Add an expression to the AST tree.

Parameters
argsArguments to use to construct the ast expression
Returns
a reference to the added expression

Definition at line 591 of file expressions.hpp.

◆ front()

expression const& cudf::ast::tree::front ( ) const
inline

get the first expression in the tree

Returns
the first inserted expression into the tree

Definition at line 614 of file expressions.hpp.

◆ operator=()

tree& cudf::ast::tree::operator= ( tree &&  )
default

move-assigns the AST tree

Returns
a reference to the move-assigned tree

◆ operator[]()

expression const& cudf::ast::tree::operator[] ( size_t  index) const
inline

get the expression at an index in the tree. Index is unchecked.

Parameters
indexindex of expression in the ast tree
Returns
the expression at the specified index

Definition at line 640 of file expressions.hpp.

◆ push()

template<typename Expr >
decltype(auto) cudf::ast::tree::push ( Expr  expr)
inline

Add an expression to the AST tree.

Parameters
exprAST expression to be added
Returns
a reference to the added expression

Definition at line 605 of file expressions.hpp.

◆ size()

size_t cudf::ast::tree::size ( ) const
inline

get the number of expressions added to the tree

Returns
the number of expressions added to the tree

Definition at line 626 of file expressions.hpp.


The documentation for this class was generated from the following file: