Index: src/OFObject.h ================================================================== --- src/OFObject.h +++ src/OFObject.h @@ -36,10 +36,12 @@ #ifdef OF_APPLE_RUNTIME # import # import #endif + +/*! @file */ #if defined(__GNUC__) # define restrict __restrict__ #elif __STDC_VERSION__ < 199901L # define restrict @@ -154,12 +156,10 @@ #endif #define OF_RETAIN_COUNT_MAX UINT_MAX #define OF_NOT_FOUND SIZE_MAX -/*! @file */ - /*! * @brief A result of a comparison. */ typedef enum of_comparison_result_t { /*! The left object is smaller than the right */ @@ -233,10 +233,17 @@ * * @return The class of the object */ - (Class)class; +/*! + * @brief Returns the superclass of the object. + * + * @return The superclass of the object + */ +- (Class)superclass; + /*! * @brief Returns a boolean whether the object of the specified kind. * * @param class_ The class whose kind is checked * @return A boolean whether the object is of the specified kind Index: src/OFObject.m ================================================================== --- src/OFObject.m +++ src/OFObject.m @@ -481,10 +481,15 @@ - (Class)class { return object_getClass(self); } + +- (Class)superclass +{ + return class_getSuperclass(object_getClass(self)); +} - (OFString*)className { return [OFString stringWithCString: object_getClassName(self) encoding: OF_STRING_ENCODING_ASCII]; Index: src/autorelease.h ================================================================== --- src/autorelease.h +++ src/autorelease.h @@ -11,16 +11,16 @@ * Alternatively, it may be distributed under the terms of the GNU General * Public License, either version 2 or 3, which can be found in the file * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ + +/*! @file */ #ifdef __cplusplus extern "C" { #endif -/*! @file */ - /*! * @brief Creates a new autorelease pool. * * @return An identifier for the created autorelease pool */