Artifact 3f1a71329b1e3fc9aaa5a1dcd3678fcfb1dd27bb4e397a42194635b1ac0da58f:
- File
src/OFComparable.h
— part of check-in
[61a6ac873a]
at
2009-02-14 17:08:21
on branch trunk
— Big diff, see details.
* Add OFComparable protocol.
* Add OFInvalidArgument exception - needs that sel_getName vs.
sel_get_name stuff again, therefore reintroduce it.
* Implement proper copy method for OFString and OFArray.
* Add isEqual: and compare: for OFString and OFArray. (user: js, size: 790) [annotate] [blame] [check-ins using]
/* * Copyright (c) 2008 - 2009 * Jonathan Schleifer <js@webkeks.org> * * All rights reserved. * * This file is part of libobjfw. It may be distributed under the terms of the * Q Public License 1.0, which can be found in the file LICENSE included in * the packaging of this file. */ #import "OFObject.h" /** * The OFComparable protocol provides functions to compare two objects. */ @protocol OFComparable /** * \param obj The object which is tested for equality * \return A boolean whether the object is equal to the other object */ - (BOOL)isEqual: (id)obj; /** * Compares the object to another object. * * \param obj An object to compare with * \return An integer which is the result of the comparison, see for example * strcmp */ - (int)compare: (id)obj; @end