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

Access element from the current tuple in a tuple environment. More...

#include <TupleElement.h>

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

Public Member Functions

TupleElementclone () const override
 Create a clone (i.e. More...
 
size_t getElement () const
 Get element. More...
 
int getTupleId () const
 Get identifier. More...
 
 TupleElement (size_t ident, size_t elem)
 
- 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

bool equal (const Node &node) const override
 Equality check for two RAM nodes. More...
 
void print (std::ostream &os) const override
 Print RAM node. More...
 

Protected Attributes

const size_t element
 Element number. More...
 
const size_t identifier
 Identifier for the tuple. More...
 

Detailed Description

Access element from the current tuple in a tuple environment.

In the following example, the tuple element t0.1 is accessed:

IF t0.1 in A
...

Definition at line 42 of file TupleElement.h.

Constructor & Destructor Documentation

◆ TupleElement()

souffle::ram::TupleElement::TupleElement ( size_t  ident,
size_t  elem 
)
inline

Definition at line 44 of file TupleElement.h.

45 {

Member Function Documentation

◆ clone()

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

Create a clone (i.e.

deep copy) of this node

Implements souffle::ram::Expression.

Definition at line 55 of file TupleElement.h.

58  {

◆ equal()

bool souffle::ram::TupleElement::equal ( const Node ) const
inlineoverrideprotectedvirtual

Equality check for two RAM nodes.

Default action is that nothing needs to be checked.

Reimplemented from souffle::ram::Node.

Definition at line 64 of file TupleElement.h.

◆ getElement()

size_t souffle::ram::TupleElement::getElement ( ) const
inline

Get element.

Definition at line 51 of file TupleElement.h.

53  :
54  void print(std::ostream& os) const override {

◆ getTupleId()

int souffle::ram::TupleElement::getTupleId ( ) const
inline

◆ print()

void souffle::ram::TupleElement::print ( std::ostream &  out) const
inlineoverrideprotectedvirtual

Print RAM node.

Implements souffle::ram::Node.

Definition at line 60 of file TupleElement.h.

Field Documentation

◆ element

const size_t souffle::ram::TupleElement::element
protected

Element number.

Definition at line 73 of file TupleElement.h.

◆ identifier

const size_t souffle::ram::TupleElement::identifier
protected

Identifier for the tuple.

Definition at line 70 of file TupleElement.h.


The documentation for this class was generated from the following file:
souffle::ram::TupleElement::print
void print(std::ostream &os) const override
Print RAM node.
Definition: TupleElement.h:60