📄 typeid.cxx
字号:
// Copyright (c) 1994 James Clark// See the file COPYING for copying permission.#include "splib.h"#include "TypeId.h"#ifdef SP_NAMESPACEnamespace SP_NAMESPACE {#endifint TypeId::isA(TypeId ti) const{ if (*this == ti) return 1; for (const void *const *p = bases_; *p; p++) if (TypeId((const void *const *)*p).isA(ti)) return 1; return 0;}int TypeId::canCast(TypeId to, TypeId from) const{ return isA(to) && to.isA(from);}#ifdef SP_NAMESPACE}#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -