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

I/O statement for a relation. More...

#include <IO.h>

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

Public Member Functions

IOclone () const override
 Create a clone (i.e. More...
 
const std::string get (const std::string &key) const
 @get value of I/O directive More...
 
const std::map< std::string, std::string > & getDirectives () const
 get I/O directives More...
 
 IO (std::string rel, std::map< std::string, std::string > directives)
 
- Public Member Functions inherited from souffle::ram::RelationStatement
const std::string & getRelation () const
 Get RAM relation. More...
 
 RelationStatement (std::string rel)
 
- 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, int tabpos) const override
 Pretty print with indentation. More...
 
- Protected Member Functions inherited from souffle::ram::RelationStatement
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...
 

Protected Attributes

const std::map< std::string, std::string > directives
 IO directives. More...
 
- Protected Attributes inherited from souffle::ram::RelationStatement
std::string relation
 Relation. 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...
 

Detailed Description

I/O statement for a relation.

I/O operation for a relation, e.g., input/output/printsize

Definition at line 42 of file IO.h.

Constructor & Destructor Documentation

◆ IO()

souffle::ram::IO::IO ( std::string  rel,
std::map< std::string, std::string >  directives 
)
inline

Definition at line 44 of file IO.h.

44  {
45  return directives;

References directives.

Referenced by get().

Member Function Documentation

◆ clone()

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

Create a clone (i.e.

deep copy) of this node

Implements souffle::ram::Statement.

Definition at line 57 of file IO.h.

57  :
58  void print(std::ostream& os, int tabpos) const override {
59  os << times(" ", tabpos);

References directives, souffle::join(), souffle::ram::RelationStatement::relation, and souffle::times().

Here is the call graph for this function:

◆ equal()

bool souffle::ram::IO::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 71 of file IO.h.

◆ get()

const std::string souffle::ram::IO::get ( const std::string &  key) const
inline

@get value of I/O directive

Definition at line 53 of file IO.h.

53  {
54  return new IO(relation, directives);
55  }

References directives, IO(), and souffle::ram::RelationStatement::relation.

Here is the call graph for this function:

◆ getDirectives()

const std::map<std::string, std::string>& souffle::ram::IO::getDirectives ( ) const
inline

get I/O directives

Definition at line 48 of file IO.h.

49  {
50  return directives.at(key);

References directives.

◆ print()

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

Pretty print with indentation.

Implements souffle::ram::Statement.

Definition at line 62 of file IO.h.

67  {
68  const auto& other = static_cast<const IO&>(node);
69  return RelationStatement::equal(other) && directives == other.directives;

Field Documentation

◆ directives

const std::map<std::string, std::string> souffle::ram::IO::directives
protected

IO directives.

Definition at line 77 of file IO.h.

Referenced by clone(), get(), getDirectives(), and IO().


The documentation for this class was generated from the following file:
souffle::ram::IO::IO
IO(std::string rel, std::map< std::string, std::string > directives)
Definition: IO.h:44
souffle::ram::RelationStatement::equal
bool equal(const Node &node) const override
Equality check for two RAM nodes.
Definition: RelationStatement.h:47
souffle::ram::RelationStatement::relation
std::string relation
Relation.
Definition: RelationStatement.h:54
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::IO::directives
const std::map< std::string, std::string > directives
IO directives.
Definition: IO.h:77
souffle::ram::IO::print
void print(std::ostream &os, int tabpos) const override
Pretty print with indentation.
Definition: IO.h:62