16 nbool operator==(
const me& rhs)
const;
17 nbool operator!=(
const me& rhs)
const;
20 virtual const type& getType()
const = 0;
22 nbool isSub(
const type& it)
const;
23 nbool isSub(
const type* it)
const BY_SIDE_FUNC(isSub);
24 nbool isSub(
const me& it)
const;
25 nbool isSub(
const me* it)
const BY_SIDE_FUNC(isSub);
27 nbool isSuper(
const type& it)
const;
28 nbool isSuper(
const type* it)
const BY_SIDE_FUNC(isSuper);
29 nbool isSuper(
const me& it)
const;
31 nbool isSuper(
const me* it)
const BY_SIDE_FUNC(isSuper);
33 template <
typename T> nint isSub()
const {
return getType().isSub<T>(); }
35 template <
typename T> nint isSuper()
const {
return getType().isSuper<T>(); }
37 template <
typename T> T* cast() {
return (T*) cast(
ttype<T>::get()); }
39 template <
typename T>
const T* cast()
const BY_CONST_FUNC(cast<T>())
41 virtual void* cast(
const type& to);
42 const void* cast(
const type& to)
const BY_CONST_FUNC(cast(to))
43 void* cast(
const type* it) BY_SIDE_FUNC(cast);
44 const void* cast(
const type* to)
const BY_CONST_FUNC(cast(to))
47 virtual nbool _onSame(
const me& rhs)
const;
Template type wrapper for type metadata management.
Definition: ttype.hpp:16
Base class for runtime type information in byeol language.
Definition: type.hpp:12
Interface for objects that can provide their type information.
Definition: typeProvidable.hpp:12