30 lines
613 B
C++
30 lines
613 B
C++
#ifndef roza_FUNTY_HPP
|
|
#define roza_FUNTY_HPP
|
|
|
|
#include "Type.hpp"
|
|
|
|
namespace roza
|
|
{
|
|
class FunTy: public Type
|
|
{
|
|
public:
|
|
explicit FunTy();
|
|
virtual ~FunTy();
|
|
|
|
std::shared_ptr<Type> get_output() const { return m_output; }
|
|
|
|
void add_input(std::shared_ptr<Type> ty);
|
|
void set_output(std::shared_ptr<Type> ty);
|
|
|
|
std::string string() const override;
|
|
bool equals(BaseType rhs) const override;
|
|
bool equals(Type const& rhs) const override;
|
|
|
|
private:
|
|
std::vector<std::shared_ptr<Type>> m_inputs;
|
|
std::shared_ptr<Type> m_output = std::make_shared<Type>(TY_NIL);
|
|
};
|
|
}
|
|
|
|
#endif
|