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

Swap operation with respect to two relations. More...

#include <Swap.h>

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

Public Member Functions

Swapclone () const override
 Create a clone (i.e. More...
 
 Swap (std::string f, std::string s)
 
- Public Member Functions inherited from souffle::ram::BinRelationStatement
 BinRelationStatement (std::string f, std::string s)
 
const std::string & getFirstRelation () const
 Get first relation. More...
 
const std::string & getSecondRelation () const
 Get second relation. More...
 
- Public Member Functions inherited from souffle::ram::Node
virtual void apply (const NodeMapper &)
 Apply the mapper to all child nodes. More...
 
virtual std::vector< const Node * > getChildNodes () const
 Obtain list of all embedded child nodes. More...
 
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::BinRelationStatement
bool equal (const Node &node) const override
 Equality check for two RAM nodes. More...
 
- Protected Member Functions inherited from souffle::ram::Statement
void print (std::ostream &os) const override
 Print RAM node. More...
 

Additional Inherited Members

- Static Protected Member Functions inherited from souffle::ram::Statement
static void print (const Statement *statement, std::ostream &os, int tabpos)
 Pretty print jump-bed. More...
 
- Protected Attributes inherited from souffle::ram::BinRelationStatement
const std::string first
 First relation. More...
 
const std::string second
 Second relation. More...
 

Detailed Description

Swap operation with respect to two relations.

Swaps the contents of the two relations

For example:

SWAP(A, B)

Definition at line 43 of file Swap.h.

Constructor & Destructor Documentation

◆ Swap()

souffle::ram::Swap::Swap ( std::string  f,
std::string  s 
)
inline

Definition at line 45 of file Swap.h.

47 :
48  void print(std::ostream& os, int tabpos) const override {

Member Function Documentation

◆ clone()

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

Create a clone (i.e.

deep copy) of this node

Implements souffle::ram::Statement.

Definition at line 47 of file Swap.h.

47  :
48  void print(std::ostream& os, int tabpos) const override {
49  os << times(" ", tabpos);

References souffle::ram::BinRelationStatement::getFirstRelation(), souffle::ram::BinRelationStatement::getSecondRelation(), and souffle::times().

Here is the call graph for this function:

◆ print()

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

Pretty print with indentation.

Implements souffle::ram::Statement.

Definition at line 52 of file Swap.h.


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