haiku/headers/os/support/ClassInfo.h
Axel Dörfler 087882c26e * Rewrote headers as necessary; only Errors.h and Debug.h still originate from a Be header now;
feel free to change that ;-)
* Cleaned up existing headers.
* Coding style guide update to BBufferIO (renamed m_* members to f*).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19972 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-01-26 16:36:29 +00:00

25 lines
581 B
C

/*
* Copyright 2007, Haiku, Inc. All Rights Reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef _CLASS_INFO_H
#define _CLASS_INFO_H
#include <typeinfo>
// deprecated, use standard RTTI calls instead
// TODO: maybe get rid of this header completely?
#define class_name(object) \
((typeid(*(object))).name())
#define cast_as(object, class) \
(dynamic_cast<class*>(object))
#define is_kind_of(object, class) \
(dynamic_cast<class*>(object) != NULL)
#define is_instance_of(object, class) \
(typeid(*(object)) == typeid(class))
#endif // _CLASS_INFO_H