souffle  2.0.2-371-g6315b36
Data Structures | Public Member Functions | Private Attributes
souffle::interpreter::RelInterface Class Reference

Wrapper class for interpreter relations. More...

#include <ProgInterface.h>

Inheritance diagram for souffle::interpreter::RelInterface:
Inheritance graph
Collaboration diagram for souffle::interpreter::RelInterface:
Collaboration graph

Data Structures

class  iterator_base
 Iterator wrapper class. More...
 

Public Member Functions

iterator begin () const override
 Iterator to first tuple. More...
 
bool contains (const tuple &t) const override
 Check whether tuple exists. More...
 
iterator end () const override
 Iterator to last tuple. More...
 
arity_type getArity () const override
 Get arity. More...
 
const char * getAttrName (size_t idx) const override
 Get attribute name. More...
 
const char * getAttrType (size_t idx) const override
 Get attribute type. More...
 
arity_type getAuxiliaryArity () const override
 Get arity. More...
 
std::string getName () const override
 Get name. More...
 
SymbolTablegetSymbolTable () const override
 Get symbol table. More...
 
void insert (const tuple &t) override
 Insert tuple. More...
 
void purge () override
 Eliminate all the tuples in relation. More...
 
 RelInterface (RelationWrapper &r, SymbolTable &s, std::string n, std::vector< std::string > t, std::vector< std::string > an, uint32_t i)
 
size_t size () const override
 Get number of tuples in relation. More...
 
 ~RelInterface () override=default
 
- Public Member Functions inherited from souffle::Relation
arity_type getPrimaryArity () const
 Return the number of non-auxiliary attributes. More...
 
std::string getSignature ()
 Get the signature of a relation. More...
 
virtual ~Relation ()=default
 Destructor. More...
 

Private Attributes

std::vector< std::string > attrNames
 Attribute Names. More...
 
uint32_t id
 Unique id for wrapper. More...
 
std::string name
 Name of relation. More...
 
RelationWrapperrelation
 Wrapped interpreter relation. More...
 
SymbolTablesymTable
 Symbol table. More...
 
std::vector< std::string > types
 Attribute type. More...
 

Additional Inherited Members

- Public Types inherited from souffle::Relation
using arity_type = uint32_t
 

Detailed Description

Wrapper class for interpreter relations.

Definition at line 53 of file ProgInterface.h.

Constructor & Destructor Documentation

◆ RelInterface()

souffle::interpreter::RelInterface::RelInterface ( RelationWrapper r,
SymbolTable s,
std::string  n,
std::vector< std::string >  t,
std::vector< std::string >  an,
uint32_t  i 
)
inline

Definition at line 61 of file ProgInterface.h.

61  {
62  return relation.contains(t.data);
63  }
64 

References souffle::interpreter::RelationWrapper::contains(), souffle::tuple::data, and relation.

Here is the call graph for this function:

◆ ~RelInterface()

souffle::interpreter::RelInterface::~RelInterface ( )
overridedefault

Member Function Documentation

◆ begin()

iterator souffle::interpreter::RelInterface::begin ( ) const
inlineoverridevirtual

Iterator to first tuple.

Implements souffle::Relation.

Definition at line 78 of file ProgInterface.h.

81  {

◆ contains()

bool souffle::interpreter::RelInterface::contains ( const tuple t) const
inlineoverridevirtual

Check whether tuple exists.

Implements souffle::Relation.

Definition at line 73 of file ProgInterface.h.

◆ end()

iterator souffle::interpreter::RelInterface::end ( ) const
inlineoverridevirtual

Iterator to last tuple.

Implements souffle::Relation.

Definition at line 83 of file ProgInterface.h.

86  {

◆ getArity()

arity_type souffle::interpreter::RelInterface::getArity ( ) const
inlineoverridevirtual

Get arity.

Implements souffle::Relation.

Definition at line 93 of file ProgInterface.h.

96  {

◆ getAttrName()

const char* souffle::interpreter::RelInterface::getAttrName ( size_t  idx) const
inlineoverridevirtual

Get attribute name.

Implements souffle::Relation.

Definition at line 114 of file ProgInterface.h.

117  :
118  /**

◆ getAttrType()

const char* souffle::interpreter::RelInterface::getAttrType ( size_t  idx) const
inlineoverridevirtual

Get attribute type.

Implements souffle::Relation.

Definition at line 108 of file ProgInterface.h.

108  {
109  return relation.size();
110  }
111 

References relation, and souffle::interpreter::RelationWrapper::size().

Referenced by souffle::interpreter::RelInterface::iterator_base::iterator_base().

Here is the call graph for this function:

◆ getAuxiliaryArity()

arity_type souffle::interpreter::RelInterface::getAuxiliaryArity ( ) const
inlineoverridevirtual

Get arity.

Implements souffle::Relation.

Definition at line 98 of file ProgInterface.h.

102  {

◆ getName()

std::string souffle::interpreter::RelInterface::getName ( ) const
inlineoverridevirtual

Get name.

Implements souffle::Relation.

Definition at line 88 of file ProgInterface.h.

91  {

◆ getSymbolTable()

SymbolTable& souffle::interpreter::RelInterface::getSymbolTable ( ) const
inlineoverridevirtual

Get symbol table.

Implements souffle::Relation.

Definition at line 103 of file ProgInterface.h.

108  {

Referenced by souffle::interpreter::RelInterface::iterator_base::operator++().

◆ insert()

void souffle::interpreter::RelInterface::insert ( const tuple t)
inlineoverridevirtual

Insert tuple.

Implements souffle::Relation.

Definition at line 68 of file ProgInterface.h.

71  {

◆ purge()

void souffle::interpreter::RelInterface::purge ( )
inlineoverridevirtual

Eliminate all the tuples in relation.

Implements souffle::Relation.

Definition at line 125 of file ProgInterface.h.

128  {

References souffle::interpreter::RelInterface::iterator_base::it.

◆ size()

size_t souffle::interpreter::RelInterface::size ( ) const
inlineoverridevirtual

Field Documentation

◆ attrNames

std::vector<std::string> souffle::interpreter::RelInterface::attrNames
private

Attribute Names.

Definition at line 211 of file ProgInterface.h.

◆ id

uint32_t souffle::interpreter::RelInterface::id
private

Unique id for wrapper.

Definition at line 214 of file ProgInterface.h.

◆ name

std::string souffle::interpreter::RelInterface::name
private

Name of relation.

Definition at line 205 of file ProgInterface.h.

◆ relation

RelationWrapper& souffle::interpreter::RelInterface::relation
private

Wrapped interpreter relation.

Definition at line 199 of file ProgInterface.h.

Referenced by getAttrType(), and RelInterface().

◆ symTable

SymbolTable& souffle::interpreter::RelInterface::symTable
private

Symbol table.

Definition at line 202 of file ProgInterface.h.

◆ types

std::vector<std::string> souffle::interpreter::RelInterface::types
private

Attribute type.

Definition at line 208 of file ProgInterface.h.


The documentation for this class was generated from the following file:
souffle::interpreter::RelationWrapper::contains
virtual bool contains(const RamDomain *) const =0
souffle::Relation::iterator_base
Abstract iterator class.
Definition: SouffleInterface.h:64
souffle::interpreter::RelInterface::relation
RelationWrapper & relation
Wrapped interpreter relation.
Definition: ProgInterface.h:199
souffle::interpreter::RelationWrapper::size
virtual size_t size() const =0