@@ -295,49 +295,57 @@ * * @brief The protocol which all root classes implement. */ @protocol OFObject /*! - * @brief The class of the object. - */ -# ifndef __cplusplus -@property (readonly, nonatomic) Class class; -# else -@property (readonly, nonatomic, getter=class) Class class_; -# endif - -/*! - * @brief The superclass of the object. - */ -@property OF_NULLABLE_PROPERTY (readonly, nonatomic) Class superclass; - -/*! - * @brief A 32 bit hash for the object. + * @brief Returns the class of the object. + * + * @return The class of the object + */ +- (Class)class; + +/*! + * @brief Returns the superclass of the object. + * + * @return The superclass of the object + */ +- (nullable Class)superclass; + +/*! + * @brief Returns a 32 bit hash for the object. * * Classes containing data (like strings, arrays, lists etc.) should reimplement * this! * * @warning If you reimplement this, you also need to reimplement @ref isEqual: * to behave in a way compatible to your reimplementation of this * method! - */ -@property (readonly, nonatomic) uint32_t hash; - -/*! - * @brief The retain count. - */ -@property (readonly, nonatomic) unsigned int retainCount; - -/*! - * @brief Whether the object is a proxy object. - */ -@property (readonly, nonatomic) bool isProxy; - -/*! - * @brief Whether the object allows weak references. - */ -@property (readonly, nonatomic) bool allowsWeakReference; + * + * @return A 32 bit hash for the object + */ +- (uint32_t)hash; + +/*! + * @brief Returns the retain count. + * + * @return The retain count + */ +- (unsigned int)retainCount; + +/*! + * @brief Returns whether the object is a proxy object. + * + * @return Whether the object is a proxy object + */ +- (bool)isProxy; + +/*! + * @brief Returns whether the object allows weak references. + * + * @return Whether the object allows weak references + */ +- (bool)allowsWeakReference; /*! * @brief Returns a boolean whether the object of the specified kind. * * @param class_ The class whose kind is checked @@ -529,10 +537,21 @@ @property (class, readonly, nonatomic) OFString *className; @property (class, readonly, nullable, nonatomic) Class superclass; @property (class, readonly, nonatomic) OFString *description; # endif +# ifdef __cplusplus +@property (readonly, nonatomic) Class class; +# else +@property (readonly, nonatomic, getter=class) Class class_; +#endif +@property OF_NULLABLE_PROPERTY (readonly, nonatomic) Class superclass; +@property (readonly, nonatomic) uint32_t hash; +@property (readonly, nonatomic) unsigned int retainCount; +@property (readonly, nonatomic) bool isProxy; +@property (readonly, nonatomic) bool allowsWeakReference; + /*! * @brief The name of the object's class. */ @property (readonly, nonatomic) OFString *className;