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

Abstract class for logging. More...

#include <AbstractLog.h>

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

Public Member Functions

 AbstractLog (Own< Statement > stmt, std::string msg)
 
void apply (const NodeMapper &map)
 
std::vector< const Node * > getChildNodes () const
 
const std::string & getMessage () const
 Get logging message. More...
 
const StatementgetStatement () const
 Get logging statement. More...
 

Protected Member Functions

bool equal (const Node &node) const
 

Protected Attributes

const std::string message
 Logging message. More...
 
Own< Statementstatement
 Logging statement. More...
 

Detailed Description

Abstract class for logging.

Comprises a Statement and the message (string) to be logged

Definition at line 39 of file AbstractLog.h.

Constructor & Destructor Documentation

◆ AbstractLog()

souffle::ram::AbstractLog::AbstractLog ( Own< Statement stmt,
std::string  msg 
)
inline

Definition at line 41 of file AbstractLog.h.

41  {
42  return {statement.get()};
43  }

References statement.

Member Function Documentation

◆ apply()

void souffle::ram::AbstractLog::apply ( const NodeMapper map)
inline

Definition at line 59 of file AbstractLog.h.

59  :
60  bool equal(const Node& node) const {
61  const auto& other = dynamic_cast<const AbstractLog&>(node);

References souffle::equal_ptr(), message, and statement.

Referenced by souffle::ram::DebugInfo::clone(), souffle::ram::LogTimer::clone(), and souffle::ram::LogRelationTimer::clone().

Here is the call graph for this function:

◆ equal()

bool souffle::ram::AbstractLog::equal ( const Node node) const
inlineprotected

Definition at line 64 of file AbstractLog.h.

65  :
66  /** Logging statement */
67  Own<Statement> statement;

◆ getChildNodes()

std::vector<const Node*> souffle::ram::AbstractLog::getChildNodes ( ) const
inline

Definition at line 45 of file AbstractLog.h.

46  {
47  return message;

References message.

◆ getMessage()

const std::string& souffle::ram::AbstractLog::getMessage ( ) const
inline

Get logging message.

Definition at line 50 of file AbstractLog.h.

51  {
52  return *statement;

References statement.

◆ getStatement()

const Statement& souffle::ram::AbstractLog::getStatement ( ) const
inline

Get logging statement.

Definition at line 55 of file AbstractLog.h.

55  {
56  statement = map(std::move(statement));
57  }

References souffle::map(), and statement.

Referenced by souffle::interpreter::NodeGenerator::visitLogRelationTimer().

Here is the call graph for this function:

Field Documentation

◆ message

const std::string souffle::ram::AbstractLog::message
protected

◆ statement

Own<Statement> souffle::ram::AbstractLog::statement
protected

The documentation for this class was generated from the following file:
souffle::map
auto map(const std::vector< A > &xs, F &&f)
Applies a function to each element of a vector and returns the results.
Definition: ContainerUtil.h:158
souffle::ram::AbstractLog::message
const std::string message
Logging message.
Definition: AbstractLog.h:74
souffle::ram::AbstractLog::equal
bool equal(const Node &node) const
Definition: AbstractLog.h:64
souffle::ram::AbstractLog::AbstractLog
AbstractLog(Own< Statement > stmt, std::string msg)
Definition: AbstractLog.h:41
souffle::ram::AbstractLog::statement
Own< Statement > statement
Logging statement.
Definition: AbstractLog.h:71