souffle
2.0.2-371-g6315b36
include
souffle
TypeAttribute.h
Go to the documentation of this file.
1
/*
2
* Souffle - A Datalog Compiler
3
* Copyright (c) 2020 The Souffle Developers. 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 TypeAttribute.h
12
*
13
* Defines the type attribute enum
14
*
15
***********************************************************************/
16
17
#pragma once
18
19
#include "
souffle/utility/MiscUtil.h
"
20
#include <iostream>
21
22
namespace
souffle
{
23
24
/**
25
* @class TypeAttribute
26
* @brief Type attribute class
27
*/
28
enum class
TypeAttribute
{
29
Symbol
,
// Symbol
30
Signed
,
// Signed number
31
Unsigned
,
// Unsigned number
32
Float
,
// Floating point number.
33
Record
,
// Record
34
ADT
,
// ADT
35
};
36
37
// Printing of the TypeAttribute Enum.
38
inline
std::ostream&
operator<<
(std::ostream& os,
TypeAttribute
T) {
39
switch
(T) {
40
case
TypeAttribute::Symbol
:
return
os <<
"TypeAttribute::Symbol"
;
41
case
TypeAttribute::Signed
:
return
os <<
"TypeAttribute::Signed"
;
42
case
TypeAttribute::Float
:
return
os <<
"TypeAttribute::Float"
;
43
case
TypeAttribute::Unsigned
:
return
os <<
"TypeAttribute::Unsigned"
;
44
case
TypeAttribute::Record
:
return
os <<
"TypeAttribute::Record"
;
45
case
TypeAttribute::ADT
:
return
os <<
"TypeAttribute::ADT"
;
46
}
47
48
fatal
(
"unhandled `TypeAttribute`"
);
49
}
50
51
}
// end of namespace souffle
souffle::TypeAttribute::Record
@ Record
TypeAttribute
Type attribute class.
souffle::TypeAttribute::Symbol
@ Symbol
MiscUtil.h
souffle::TypeAttribute::Signed
@ Signed
souffle::TypeAttribute::Unsigned
@ Unsigned
souffle::TypeAttribute::ADT
@ ADT
souffle::operator<<
std::ostream & operator<<(std::ostream &os, AggregateOp op)
Definition:
AggregateOp.h:51
souffle::fatal
void fatal(const char *format, const Args &... args)
Definition:
MiscUtil.h:198
souffle
Definition:
AggregateOp.h:25
souffle::TypeAttribute::Float
@ Float
Generated by
1.8.17