| souffle
    2.0.2-371-g6315b36
    | 
 
 
 
Go to the documentation of this file.
   44 class UnionType : 
public Type {
 
   50     const std::vector<QualifiedName>& 
getTypes()
 const {
 
   69     void print(std::ostream& os)
 const override {
 
   70         os << 
".type " << getQualifiedName() << 
" = " << 
join(
types, 
" | ");
 
   73     bool equal(
const Node& node)
 const override {
 
   74         const auto& other = 
static_cast<const UnionType&
>(node);
 
   75         return getQualifiedName() == other.getQualifiedName() && 
types == other.types;
 
   80     std::vector<QualifiedName> 
types;
 
  
std::vector< Own< ast::Type > > types
A union type combining a list of types into a new, aggregated type.
auto clone(const std::vector< A * > &xs)
UnionType(const TypeEnvironment &environment, const QualifiedName &name, std::vector< const Type * > elementTypes={})
detail::joined_sequence< Iter, Printer > join(const Iter &a, const Iter &b, const std::string &sep, const Printer &p)
Creates an object to be forwarded to some output stream for printing sequences of elements interspers...
Type(const Type &other)=delete
Abstract class for syntactic elements in an input program.
void print(std::ostream &out) const override
Qualified Name class defines fully/partially qualified names to identify objects in components.
const std::vector< QualifiedName > & getTypes() const
Return list of unioned types.