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-08-30 22:31:19 +00:00
|
|
|
std::string Type::string() const
|
|
|
|
{
|
|
|
|
return std::string(BaseTypeStr[m_base])
|
|
|
|
.substr(std::string("TY_").size());
|
|
|
|
}
|
|
|
|
|
2023-08-30 18:06:26 +00:00
|
|
|
bool Type::equals(BaseType rhs) const
|
|
|
|
{
|
|
|
|
return m_base == rhs;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool Type::equals(Type const& rhs) const
|
|
|
|
{
|
|
|
|
return m_base == rhs.m_base;
|
|
|
|
}
|
|
|
|
}
|