souffle
2.0.2-371-g6315b36
ast
transform
Null.h
Go to the documentation of this file.
1
/*
2
* Souffle - A Datalog Compiler
3
* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved
4
* Licensed under the Universal Permissive License v 1.0 as shown at:
5
* - https://opensource.org/licenses/UPL
6
* - <souffle root>/licenses/SOUFFLE-UPL.txt
7
*/
8
9
/************************************************************************
10
*
11
* @file Null.h
12
*
13
* Defines the interface for Null transformation passes.
14
*
15
***********************************************************************/
16
17
#pragma once
18
19
#include "
ast/TranslationUnit.h
"
20
#include "
ast/transform/Meta.h
"
21
#include "
ast/transform/Transformer.h
"
22
#include <set>
23
#include <string>
24
#include <vector>
25
26
namespace
souffle::ast::transform
{
27
28
/**
29
* Transformer that does absolutely nothing
30
*/
31
class
NullTransformer :
public
MetaTransformer {
32
private
:
33
bool
transform
(TranslationUnit&
/* translationUnit */
)
override
{
34
return
false
;
35
}
36
37
public
:
38
std::vector<Transformer*>
getSubtransformers
()
const override
{
39
return
{};
40
}
41
42
void
setDebugReport
()
override
{}
43
44
void
setVerbosity
(
bool
/* verbose */
)
override
{}
45
46
void
disableTransformers
(
const
std::set<std::string>&
/* transforms */
)
override
{}
47
48
std::string
getName
()
const override
{
49
return
"NullTransformer"
;
50
}
51
52
NullTransformer
*
clone
()
const override
{
53
return
new
NullTransformer
();
54
}
55
};
56
57
}
// namespace souffle::ast::transform
TranslationUnit.h
souffle::ast::transform::NullTransformer::transform
bool transform(TranslationUnit &) override
Definition:
Null.h:45
souffle::ast::transform::NullTransformer::getName
std::string getName() const override
Definition:
Null.h:60
Transformer.h
souffle::ast::transform::NullTransformer
Transformer that does absolutely nothing.
Definition:
Null.h:37
souffle::ast::transform::NullTransformer::setVerbosity
void setVerbosity(bool) override
Definition:
Null.h:56
souffle::ast::transform::NullTransformer::getSubtransformers
std::vector< Transformer * > getSubtransformers() const override
Definition:
Null.h:50
souffle::ast::transform
Definition:
Program.h:45
souffle::ast::transform::NullTransformer::setDebugReport
void setDebugReport() override
Definition:
Null.h:54
souffle::ast::transform::NullTransformer::disableTransformers
void disableTransformers(const std::set< std::string > &) override
Definition:
Null.h:58
souffle::ast::transform::NullTransformer::clone
NullTransformer * clone() const override
Definition:
Null.h:64
Meta.h
Generated by
1.8.17