souffle  2.0.2-371-g6315b36
Public Member Functions | Protected Member Functions
souffle::ram::Break Class Reference

Breaks out of the loop if a condition holds. More...

#include <Break.h>

Inheritance diagram for souffle::ram::Break:
Inheritance graph
Collaboration diagram for souffle::ram::Break:
Collaboration graph

Public Member Functions

 Break (Own< Condition > cond, Own< Operation > nested, std::string profileText="")
 
Breakclone () const override
 Create a clone (i.e. More...
 
- Public Member Functions inherited from souffle::ram::AbstractConditional
 AbstractConditional (Own< Condition > cond, Own< Operation > nested, std::string profileText="")
 
void apply (const NodeMapper &map) override
 Apply the mapper to all child nodes. More...
 
std::vector< const Node * > getChildNodes () const override
 Obtain list of all embedded child nodes. More...
 
const ConditiongetCondition () const
 Get condition that must be satisfied. More...
 
- Public Member Functions inherited from souffle::ram::NestedOperation
void apply (const NodeMapper &map) override
 Apply the mapper to all child nodes. More...
 
std::vector< const Node * > getChildNodes () const override
 Obtain list of all embedded child nodes. More...
 
OperationgetOperation () const
 Get nested operation. More...
 
const std::string & getProfileText () const
 Get profile text. More...
 
 NestedOperation (Own< Operation > nested, std::string profileText="")
 
- Public Member Functions inherited from souffle::ram::Node
bool operator!= (const Node &other) const
 Inequality check for two RAM nodes. More...
 
bool operator== (const Node &other) const
 Equivalence check for two RAM nodes. More...
 
virtual void rewrite (const Node *oldNode, Own< Node > newNode)
 Rewrite a child node. More...
 
virtual ~Node ()=default
 

Protected Member Functions

void print (std::ostream &os, int tabpos) const override
 Pretty print with indentation. More...
 
- Protected Member Functions inherited from souffle::ram::AbstractConditional
bool equal (const Node &node) const override
 Equality check for two RAM nodes. More...
 
- Protected Member Functions inherited from souffle::ram::NestedOperation
bool equal (const Node &node) const override
 Equality check for two RAM nodes. More...
 
void print (std::ostream &os, int tabpos) const override
 Pretty print with indentation. More...
 
- Protected Member Functions inherited from souffle::ram::Operation
void print (std::ostream &os) const override
 Print RAM node. More...
 

Additional Inherited Members

- Static Protected Member Functions inherited from souffle::ram::Operation
static void print (const Operation *operation, std::ostream &os, int tabpos)
 Pretty print jump-bed. More...
 
- Protected Attributes inherited from souffle::ram::AbstractConditional
Own< Conditioncondition
 Condition. More...
 
- Protected Attributes inherited from souffle::ram::NestedOperation
Own< OperationnestedOperation
 Nested operation. More...
 
const std::string profileText
 Text used by the profiler. More...
 

Detailed Description

Breaks out of the loop if a condition holds.

The following example will break out of the inner-most loop if the condition (t1.1 = 4) holds:

FOR t0 in A
FOR t1 in B
IF t0.1 = 4 BREAK
...

Definition at line 49 of file Break.h.

Constructor & Destructor Documentation

◆ Break()

souffle::ram::Break::Break ( Own< Condition cond,
Own< Operation nested,
std::string  profileText = "" 
)
inline

Definition at line 51 of file Break.h.

54  :
55  void print(std::ostream& os, int tabpos) const override {

Member Function Documentation

◆ clone()

Break* souffle::ram::Break::clone ( ) const
inlineoverridevirtual

Create a clone (i.e.

deep copy) of this node

Implements souffle::ram::AbstractConditional.

Definition at line 54 of file Break.h.

54  :
55  void print(std::ostream& os, int tabpos) const override {
56  os << times(" ", tabpos);

References souffle::ram::AbstractConditional::getCondition(), souffle::ram::NestedOperation::print(), and souffle::times().

Here is the call graph for this function:

◆ print()

void souffle::ram::Break::print ( std::ostream &  os,
int  tabpos 
) const
inlineoverrideprotectedvirtual

Pretty print with indentation.

Implements souffle::ram::Operation.

Definition at line 59 of file Break.h.


The documentation for this class was generated from the following file:
souffle::ram::Break::print
void print(std::ostream &os, int tabpos) const override
Pretty print with indentation.
Definition: Break.h:59
souffle::times
detail::multiplying_printer< T > times(const T &value, unsigned num)
A utility printing a given value multiple times.
Definition: StreamUtil.h:322