roza/lib/Type.cpp

30 lines
474 B
C++

#include "Type.hpp"
namespace roza
{
/*explicit*/ Type::Type(BaseType base)
: m_base { base }
{
}
/*virtual*/ Type::~Type()
{
}
/*virtual*/ std::string Type::string() const
{
return std::string(BaseTypeStr[m_base])
.substr(std::string("TY_").size());
}
/*virtual*/ bool Type::equals(BaseType rhs) const
{
return m_base == rhs;
}
/*virtual*/ bool Type::equals(Type const& rhs) const
{
return m_base == rhs.m_base;
}
}