bin/pc: Mark non-returning function as void
[haiku.git] / headers / os / support / ClassInfo.h
blobd689c41b7d78c2995045e9a58726f22dad235f66
1 /*
2 * Copyright 2007 Haiku, Inc. All rights reserved.
3 * Distributed under the terms of the MIT License.
4 */
5 #ifndef _CLASS_INFO_H
6 #define _CLASS_INFO_H
9 #include <typeinfo>
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