souffle  2.0.2-371-g6315b36
Public Member Functions
souffle::ast::NodeMapper Class Referenceabstract

An abstract class for manipulating AST Nodes by substitution. More...

#include <NodeMapper.h>

Inheritance diagram for souffle::ast::NodeMapper:
Inheritance graph
Collaboration diagram for souffle::ast::NodeMapper:
Collaboration graph

Public Member Functions

virtual Own< Nodeoperator() (Own< Node > node) const =0
 Abstract replacement method for a node. More...
 
template<typename T >
Own< T > operator() (Own< T > node) const
 Wrapper for any subclass of the AST node hierarchy performing type casts. More...
 
virtual ~NodeMapper ()=default
 

Detailed Description

An abstract class for manipulating AST Nodes by substitution.

Definition at line 36 of file NodeMapper.h.

Constructor & Destructor Documentation

◆ ~NodeMapper()

virtual souffle::ast::NodeMapper::~NodeMapper ( )
virtualdefault

Member Function Documentation

◆ operator()() [1/2]

virtual Own<Node> souffle::ast::NodeMapper::operator() ( Own< Node node) const
pure virtual

Abstract replacement method for a node.

If the given nodes is to be replaced, the handed in node will be destroyed by the mapper and the returned node will become owned by the caller.

Implemented in souffle::ast::detail::LambdaNodeMapper< Lambda >.

◆ operator()() [2/2]

template<typename T >
Own<T> souffle::ast::NodeMapper::operator() ( Own< T >  node) const
inline

Wrapper for any subclass of the AST node hierarchy performing type casts.

Definition at line 53 of file NodeMapper.h.


The documentation for this class was generated from the following file: