Index: src/OFObject.h ================================================================== --- src/OFObject.h +++ src/OFObject.h @@ -110,10 +110,19 @@ * \param class_ The class whose kind is checked * \return A boolean whether the object is of the specified kind */ - (BOOL)isKindOfClass: (Class)class_; +/** + * \brief Returns a boolean whether the object is a member of the specified + * class. + * + * \param class_ The class for which the receiver is checked + * \return A boolean whether the object is a member of the specified class + */ +- (BOOL)isMemberOfClass: (Class)class_; + /** * \brief Returns a boolean whether the object responds to the specified * selector. * * \param selector The selector which should be checked for respondance @@ -234,10 +243,17 @@ * \brief Returns the receiver. * * \return The receiver */ - self; + +/** + * \brief Returns whether the object is a proxy object. + * + * \return A boolean whether the object is a proxy object + */ +- (BOOL)isProxy; @end /** * \brief The root class for all other classes inside ObjFW. */ Index: src/OFObject.m ================================================================== --- src/OFObject.m +++ src/OFObject.m @@ -779,10 +779,15 @@ if (iter == class) return YES; return NO; } + +- (BOOL)isMemberOfClass: (Class)class +{ + return (isa == class); +} - (BOOL)respondsToSelector: (SEL)selector { #ifdef OF_OLD_GNU_RUNTIME if (object_is_instance(self)) @@ -1110,10 +1115,15 @@ - self { return self; } + +- (BOOL)isProxy +{ + return NO; +} - (void)dealloc { Class class; void (*last)(id, SEL) = NULL;