Index: src/OFDataArray.h ================================================================== --- src/OFDataArray.h +++ src/OFDataArray.h @@ -17,11 +17,11 @@ * \brief A class for storing arbitrary data in an array. * * If you plan to store large hunks of data, you should consider using * OFBigDataArray, which allocates the memory in pages rather than in bytes. */ -@interface OFDataArray: OFObject +@interface OFDataArray: OFObject { char *data; size_t count; size_t itemSize; } @@ -79,18 +79,10 @@ /** * \return All elements of the OFDataArray as a C array */ - (void*)cArray; -/** - * Compares the OFDataArray to another object. - * - * \param ary A data array to compare with - * \return An of_comparsion_result_t - */ -- (of_comparison_result_t)compare: (OFDataArray*)ary; - /** * Returns a specific item of the OFDataArray. * * \param index The number of the item to return * \return The specified item of the OFDataArray Index: src/OFObject.h ================================================================== --- src/OFObject.h +++ src/OFObject.h @@ -374,11 +374,26 @@ * This protocol is implemented by objects that can be mutable and immutable * and allows returning a mutable copy. */ @protocol OFMutableCopying /** - * \return A copy of the object + * \return A mutable copy of the object */ - mutableCopy; @end +/** + * \brief A protocol for comparing objects. + * + * This protocol is implemented by objects that can be compared. + */ +@protocol OFComparing +/** + * Compares the object with another object. + * + * \param obj An object to compare the object to + * \return The result of the comparison + */ +- (of_comparison_result_t)compare: (id)obj; +@end + extern size_t of_pagesize; Index: src/OFString.h ================================================================== --- src/OFString.h +++ src/OFString.h @@ -32,11 +32,11 @@ @class OFArray; /** * \brief A class for handling strings. */ -@interface OFString: OFObject +@interface OFString: OFObject { char *string; unsigned int length; #if defined(OF_APPLE_RUNTIME) && __LP64__ int _unused; @@ -263,18 +263,10 @@ /// \cond internal - (BOOL)isUTF8; /// \endcond -/** - * Compares the OFString to another OFString. - * - * \param str A string to compare with - * \return An of_comparison_result_t - */ -- (of_comparison_result_t)compare: (OFString*)str; - /** * Compares the OFString to another OFString without caring about the case. * * \param str A string to compare with * \return An of_comparison_result_t