souffle
2.0.2-371-g6315b36
|
The union type class. More...
#include <UnionType.h>
Public Member Functions | |
void | add (QualifiedName type) |
Add another unioned type. More... | |
UnionType * | clone () const override |
const std::vector< QualifiedName > & | getTypes () const |
Return list of unioned types. More... | |
void | setType (size_t idx, QualifiedName type) |
Set type. More... | |
UnionType (QualifiedName name, std::vector< QualifiedName > types, SrcLocation loc={}) | |
Public Member Functions inherited from souffle::ast::analysis::Type | |
const QualifiedName & | getName () const |
const TypeEnvironment & | getTypeEnvironment () const |
bool | operator!= (const Type &other) const |
bool | operator< (const Type &other) const |
bool | operator== (const Type &other) const |
Type (const Type &other)=delete | |
virtual | ~Type ()=default |
Protected Member Functions | |
bool | equal (const Node &node) const override |
void | print (std::ostream &os) const override |
Protected Member Functions inherited from souffle::ast::analysis::Type | |
Type (const TypeEnvironment &environment, QualifiedName name) | |
Private Attributes | |
std::vector< QualifiedName > | types |
List of unioned types. More... | |
Additional Inherited Members | |
Protected Attributes inherited from souffle::ast::analysis::Type | |
const TypeEnvironment & | environment |
A reference to the type environment this type is associated to. More... | |
QualifiedName | name |
The union type class.
Example: .type A = B1 | B2 | ... | Bk
A union type combines multiple types into a new super type. Each of the enumerated types become a sub-type of the new union type.
Definition at line 50 of file UnionType.h.
|
inline |
Definition at line 52 of file UnionType.h.
|
inline |
|
inlineoverride |
Definition at line 70 of file UnionType.h.
|
inlineoverrideprotected |
Definition at line 79 of file UnionType.h.
|
inline |
|
inlineoverrideprotectedvirtual |
Reimplemented from souffle::ast::analysis::Type.
Definition at line 75 of file UnionType.h.
|
inline |
|
private |
List of unioned types.
Definition at line 86 of file UnionType.h.