Differences From Artifact [0b607ebca5]:
- File src/OFArray.h — part of check-in [1496808b81] at 2009-01-24 15:24:49 on branch trunk — Adjust API to introduction of OFAutoreleasePool. (user: js, size: 2461) [annotate] [blame] [check-ins using]
To Artifact [0a9cee9129]:
- File
src/OFArray.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: 2618) [annotate] [blame] [check-ins using]
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | + - + | /* * 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" #import "OFComparable.h" /** * The OFArray class provides a class for storing dynamically sized arrays. * If you plan to store large hunks of data, you should consider using * OFBigArray, which allocates the memory in pages and not in bytes. */ |
︙ | |||
94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 | 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 | + + + + + + + | /** * Removes a specified amount of the last items from the OFArray. * * \param nitems The number of items to remove */ - removeNItems: (size_t)nitems; /** * Clones the OFArray, creating a new one. * * \return A new autoreleased copy of the OFArray */ - (id)copy; @end @interface OFBigArray: OFArray { size_t size; } - initWithItemSize: (size_t)is; - add: (void*)item; - addNItems: (size_t)nitems fromCArray: (void*)carray; - removeNItems: (size_t)nitems; @end |