Differences From Artifact [7eccbfdc6d]:
- File src/OFArray.h — part of check-in [7665f89ec6] at 2009-05-04 15:05:37 on branch trunk — Remove useless definitions. (user: js, size: 2647) [annotate] [blame] [check-ins using]
To Artifact [10629d9d3f]:
- File
src/OFArray.h
— part of check-in
[2a4aa05a84]
at
2009-05-05 12:05:06
on branch trunk
— Rename OFArray to OFDataArray and add a new OFArray which stores objects.
Additionally, change OFAutoreleasePool to use the new OFArray.And while at it, change #import <config.h> in some files to
#import "config.h". (user: js, size: 1274) [annotate] [blame] [check-ins using]
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | /* * 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" /** | > | < < | < < < < < | < < < < < < < < < < < < < < < < < | | < < < < < < < < < < < < < < < < < < < | | | | | | | | | < < < < < < < | < < | | < < < < < < | 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 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | /* * 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 "OFDataArray.h" /** * The OFArray class provides a class for storing objects in an array. */ @interface OFArray: OFObject { OFDataArray *array; } /** * \return A new autoreleased OFArray */ + array; /** * \return The number of objects in the OFArray */ - (size_t)objects; /** * Clones the OFArray, creating a new one. * * \return A new autoreleased copy of the OFArray */ - (id)copy; /** * Returns a specific object of the OFDataArray. * * \param index The number of the object to return * \return The specified object of the OFArray */ - (OFObject*)object: (size_t)index; /** * \return The last object of the OFDataArray */ - (OFObject*)last; /** * Adds an object to the OFDataArray. * * \param obj An object to add */ - add: (OFObject*)obj; /** * Removes the specified amount of object from the end of the OFDataArray. * * \param nobjects The number of objects to remove */ - removeNObjects: (size_t)nobjects; @end |