30 lines
410 B
C++
30 lines
410 B
C++
|
#ifndef roza_TYPE_HPP
|
||
|
#define roza_TYPE_HPP
|
||
|
|
||
|
#include "commons.hpp"
|
||
|
|
||
|
#define BASE_TYPE(G) \
|
||
|
G(TY_INT)
|
||
|
|
||
|
namespace roza
|
||
|
{
|
||
|
MAKE_ENUM(BASE_TYPE, BaseType)
|
||
|
|
||
|
class Type
|
||
|
{
|
||
|
public:
|
||
|
explicit Type(BaseType base);
|
||
|
virtual ~Type();
|
||
|
|
||
|
BaseType base() const { return m_base; }
|
||
|
|
||
|
bool equals(BaseType rhs) const;
|
||
|
bool equals(Type const& rhs) const;
|
||
|
|
||
|
private:
|
||
|
BaseType m_base;
|
||
|
};
|
||
|
}
|
||
|
|
||
|
#endif
|