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

@Class ConditionalTransformer @Brief Composite conditional transformer More...

#include <Conditional.h>

Inheritance diagram for souffle::ram::transform::ConditionalTransformer:
Inheritance graph
Collaboration diagram for souffle::ram::transform::ConditionalTransformer:
Collaboration graph

Public Member Functions

 ConditionalTransformer (std::function< bool()> fn, Own< Transformer > tb)
 
std::string getName () const override
 @Brief get name of the transformer More...
 
bool transform (TranslationUnit &tU) override
 @Brief transform the translation unit / used by apply @Param translationUnit that will be transformed. More...
 
- Public Member Functions inherited from souffle::ram::transform::Transformer
bool apply (TranslationUnit &translationUnit)
 @Brief apply the transformer to a translation unit @Param translationUnit that will be transformed. More...
 
virtual ~Transformer ()=default
 

Protected Attributes

Own< Transformerbody
 
std::function< bool()> func
 

Additional Inherited Members

Detailed Description

@Class ConditionalTransformer @Brief Composite conditional transformer

A transformation is invoked if a condition holds.

Definition at line 42 of file Conditional.h.

Constructor & Destructor Documentation

◆ ConditionalTransformer()

souffle::ram::transform::ConditionalTransformer::ConditionalTransformer ( std::function< bool()>  fn,
Own< Transformer tb 
)
inline

Definition at line 50 of file Conditional.h.

51  :
52  std::function<bool()> func;

Member Function Documentation

◆ getName()

std::string souffle::ram::transform::ConditionalTransformer::getName ( ) const
inlineoverridevirtual

@Brief get name of the transformer

Implements souffle::ram::transform::Transformer.

Definition at line 52 of file Conditional.h.

◆ transform()

bool souffle::ram::transform::ConditionalTransformer::transform ( TranslationUnit translationUnit)
inlineoverridevirtual

@Brief transform the translation unit / used by apply @Param translationUnit that will be transformed.

@Return flag reporting whether the RAM program has changed

Implements souffle::ram::transform::Transformer.

Definition at line 55 of file Conditional.h.

Field Documentation

◆ body

Own<Transformer> souffle::ram::transform::ConditionalTransformer::body
protected

Definition at line 65 of file Conditional.h.

◆ func

std::function<bool()> souffle::ram::transform::ConditionalTransformer::func
protected

Definition at line 64 of file Conditional.h.


The documentation for this class was generated from the following file:
souffle::ram::transform::ConditionalTransformer::func
std::function< bool()> func
Definition: Conditional.h:64