tipc
A TIP to LLVM compiler
TipRef.h
Go to the documentation of this file.
1 #pragma once
2 #include "TipCons.h"
3 #include "TipType.h"
4 
10 class TipRef : public TipCons {
11 public:
12  TipRef() = delete;
13  TipRef(std::shared_ptr<TipType> of);
14 
15  std::shared_ptr<TipType> getReferencedType() const;
16 
17  bool operator==(const TipType &other) const override;
18  bool operator!=(const TipType &other) const override;
19 
20  void accept(TipTypeVisitor *visitor) override;
21 
22 protected:
23  std::ostream &print(std::ostream &out) const override;
24 };
Abstract base class for all proper types.
Definition: TipCons.h:14
A proper type representing a reference.
Definition: TipRef.h:10
void accept(TipTypeVisitor *visitor) override
Definition: TipRef.cpp:31
bool operator==(const TipType &other) const override
Definition: TipRef.cpp:9
std::shared_ptr< TipType > getReferencedType() const
Definition: TipRef.cpp:27
TipRef()=delete
bool operator!=(const TipType &other) const override
Definition: TipRef.cpp:18
std::ostream & print(std::ostream &out) const override
Definition: TipRef.cpp:22
Base class for TIP type visitors.
Definition: TipTypeVisitor.h:24
Abstract base class of all types.
Definition: TipType.h:19