2 * Copyright 2007 Haiku, Inc. All rights reserved.
3 * Distributed under the terms of the MIT License.
12 // deprecated, use standard RTTI calls instead
13 // TODO: maybe get rid of this header completely?
15 #define class_name(object) \
16 ((typeid(*(object))).name())
17 #define cast_as(object, class) \
18 (dynamic_cast<class*>(object))
19 #define is_kind_of(object, class) \
20 (dynamic_cast<class*>(object) != NULL)
21 #define is_instance_of(object, class) \
22 (typeid(*(object)) == typeid(class))
24 #endif // _CLASS_INFO_H