/usr/include/sp/rtti.h is in libsp1-dev 1.3.4-1.2.1-47.3ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 | // Copyright (c) 1994 James Clark
// See the file COPYING for copying permission.
#ifndef rtti_INCLUDED
#define rtti_INCLUDED 1
#ifdef SP_HAVE_RTTI
#define DYNAMIC_CAST_PTR(T, p) dynamic_cast<T *>(p)
#define DYNAMIC_CAST_CONST_PTR(T, p) dynamic_cast<const T *>(p)
#define RTTI_CLASS
#define RTTI_DEF0(T)
#define RTTI_DEF1(T, B1)
#define RTTI_DEF2(T, B1, B2)
#define RTTI_DEF3(T, B1, B2, B3)
#else /* not SP_HAVE_RTTI */
#include "TypeId.h"
#define RTTI_CLASS \
public: \
virtual TypeId dynamicType() const; \
static inline TypeId staticType() { return TypeId(RTTI_bases_); } \
protected: \
static const void *RTTI_bases_[]; \
private:
#define RTTI_DEF0(T) \
const void *T::RTTI_bases_[] = { 0 }; \
TypeId T::dynamicType() const { return staticType(); }
#define RTTI_DEF1(T, B1) \
const void *T::RTTI_bases_[] = { B1::RTTI_bases_, 0 }; \
TypeId T::dynamicType() const { return staticType(); }
#define RTTI_DEF2(T, B1, B2) \
const void *T::RTTI_bases_[] = { B1::RTTI_bases_, B2::RTTI_bases_, 0 }; \
TypeId T::dynamicType() const { return staticType(); }
#define RTTI_DEF3(T, B1, B2, B3) \
const void *T::RTTI_bases_[] = { \
B1::RTTI_bases_, B2::RTTI_bases_, B3::RTTI_bases_, 0 }; \
TypeId T::dynamicType() const { return staticType(); }
#define DYNAMIC_CAST_PTR(T, p) \
((p) && (p)->dynamicType().canCast(T::staticType(), (p)->staticType()) \
? (T *)(p) \
: 0)
#define DYNAMIC_CAST_CONST_PTR(T, p) \
((p) && (p)->dynamicType().canCast(T::staticType(), (p)->staticType()) \
? (const T *)p \
: 0)
#endif /* not SP_HAVE_RTTI */
#endif /* not rtti_INCLUDED */
|