souffle
2.0.2-371-g6315b36
|
Go to the documentation of this file.
44 class Loop :
public Statement {
47 assert(
body !=
nullptr &&
"Loop body is a null-pointer");
68 void print(std::ostream& os,
int tabpos)
const override {
69 os <<
times(
" ", tabpos) <<
"LOOP" << std::endl;
71 os <<
times(
" ", tabpos) <<
"END LOOP" << std::endl;
74 bool equal(
const Node& node)
const override {
75 const auto& other =
static_cast<const Loop&
>(node);
void apply(const NodeMapper &map) override
Apply the mapper to all child nodes.
Execute statement until statement terminates loop via an exit statement.
bool equal(const Node &node) const override
Equality check for two RAM nodes.
auto map(const std::vector< A > &xs, F &&f)
Applies a function to each element of a vector and returns the results.
std::vector< const Node * > getChildNodes() const override
Obtain list of all embedded child nodes.
Node is a superclass for all RAM IR classes.
auto clone(const std::vector< A * > &xs)
An abstract class for manipulating RAM Nodes by substitution.
detail::multiplying_printer< T > times(const T &value, unsigned num)
A utility printing a given value multiple times.
Loop * clone() const override
Create a clone (i.e.
void print(std::ostream &os) const override
Print RAM node.
bool equal_ptr(const T *a, const T *b)
Compares two values referenced by a pointer where the case where both pointers are null is also consi...
void print(std::ostream &os, int tabpos) const override
Pretty print with indentation.
Own< Statement > body
Loop body.
Abstract class for RAM statements.
l j a showGridBackground &&c b raw series this eventEmitter b
const Statement & getBody() const
Get loop body.