roza/lib/Type.cpp

30 lines
474 B
C++
Raw Permalink Normal View History

2023-08-30 18:06:26 +00:00
#include "Type.hpp"
namespace roza
{
/*explicit*/ Type::Type(BaseType base)
: m_base { base }
{
}
/*virtual*/ Type::~Type()
{
}
2023-09-01 20:38:12 +00:00
/*virtual*/ std::string Type::string() const
2023-08-30 22:31:19 +00:00
{
return std::string(BaseTypeStr[m_base])
.substr(std::string("TY_").size());
}
2023-09-01 20:38:12 +00:00
/*virtual*/ bool Type::equals(BaseType rhs) const
2023-08-30 18:06:26 +00:00
{
return m_base == rhs;
}
2023-09-01 20:38:12 +00:00
/*virtual*/ bool Type::equals(Type const& rhs) const
2023-08-30 18:06:26 +00:00
{
return m_base == rhs.m_base;
}
}