AmpGen 2.1
Loading...
Searching...
No Matches
AmpGen::Array Class Reference

Detailed Description

Expression for an array, i.e. a set of values with an index. Can be used to return an expression from the array, which is resolved at (second) compile time.

Definition at line 24 of file Array.h.

Public Member Functions

 Array (const Expression &top, const int &size, const Expression &address=0)
 
std::string to_string (const ASTResolver *resolver=nullptr) const override
 Called to convert the Expression tree into source code.
 
void resolve (ASTResolver &resolver) const override
 Resolve the dependencies of a tree using an ASTResolver, which keeps track of parameters, dependent sub-trees, etc.
 
 operator Expression ()
 
complex_t operator() () const override
 Evaluate the expression using the tree, will generally be very slow but ocassionally useful for debugging.
 
Expression operator[] (const Expression &address) const
 
Expression top () const
 
int size () const
 
Inheritance diagram for AmpGen::Array:
AmpGen::IExpression

Constructor & Destructor Documentation

◆ Array()

AmpGen::Array::Array ( const Expression & top,
const int & size,
const Expression & address = 0 )

Member Function Documentation

◆ operator Expression()

AmpGen::Array::operator Expression ( )

◆ operator()()

complex_t AmpGen::Array::operator() ( ) const
overridevirtual

Implements AmpGen::IExpression.

◆ operator[]()

Expression AmpGen::Array::operator[] ( const Expression & address) const

◆ resolve()

void AmpGen::Array::resolve ( ASTResolver & resolver) const
overridevirtual
Parameters
resolverresolver object to use

Implements AmpGen::IExpression.

◆ size()

int AmpGen::Array::size ( ) const
inline

Definition at line 34 of file Array.h.

◆ to_string()

std::string AmpGen::Array::to_string ( const ASTResolver * resolver = nullptr) const
overridevirtual
Returns
The source code as a string

Implements AmpGen::IExpression.

◆ top()

Expression AmpGen::Array::top ( ) const
inline

Definition at line 33 of file Array.h.


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