Differences From Artifact [f31644bdce]:
- File src/OFArray.h — part of check-in [daae7ffbf3] at 2010-01-30 15:47:44 on branch trunk — Make OFEnumerator more general, implement it for OFArray & OFDictionary. (user: js, size: 3707) [annotate] [blame] [check-ins using]
To Artifact [e488c32fdc]:
- File
src/OFArray.h
— part of check-in
[b91a8283fe]
at
2010-03-05 11:52:18
on branch 0.2
— Merge a few changesets from the default branch into the 0.2 branch.
Changesets:
* b95fcaa6d694
* 804c68d222b4
* da8cd738da3d
* 1109d5ce3419
* d03f5c1ca95d
* 2a7017722165
* 4fccdc79eeb7
* d228149fbc04
* 8782d412a4a6 (user: js, size: 3736) [annotate] [blame] [check-ins using]
1 | /* | | < | | 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 | /* * Copyright (c) 2008 - 2010 * Jonathan Schleifer <js@webkeks.org> * * All rights reserved. * * This file is part of ObjFW. 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. */ #include <stdarg.h> #import "OFObject.h" #import "OFEnumerator.h" @class OFDataArray; @class OFString; /** * \brief A class for storing objects in an array. */ @interface OFArray: OFObject <OFCopying, OFMutableCopying, OFFastEnumeration> { OFDataArray *array; } /** |
︙ | ︙ | |||
46 47 48 49 50 51 52 | * \return A new autoreleased OFArray */ + arrayWithObjects: (OFObject*)first, ...; /** * Creates a new OFArray with the objects from the specified C array. * | | | 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 | * \return A new autoreleased OFArray */ + arrayWithObjects: (OFObject*)first, ...; /** * Creates a new OFArray with the objects from the specified C array. * * \param objs A C array of objects, terminated with nil * \return A new autoreleased OFArray */ + arrayWithCArray: (OFObject**)objs; /** * Initializes an OFArray with the specified object. * |
︙ | ︙ | |||
80 81 82 83 84 85 86 | */ - initWithObject: (OFObject*)first argList: (va_list)args; /** * Initializes an OFArray with the objects from the specified C array. * | | | 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 | */ - initWithObject: (OFObject*)first argList: (va_list)args; /** * Initializes an OFArray with the objects from the specified C array. * * \param objs A C array of objects, terminated with nil * \return An initialized OFArray */ - initWithCArray: (OFObject**)objs; /** * \return The number of objects in the array */ |
︙ | ︙ | |||
146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 | /** * \return An OFEnumerator to enumarate through the array's objects */ - (OFEnumerator*)enumerator; @end @interface OFArrayEnumerator: OFEnumerator { OFDataArray *array; size_t count; unsigned long mutations; unsigned long *mutations_ptr; size_t pos; } - initWithDataArray: (OFDataArray*)data mutationsPointer: (unsigned long*)mutations_ptr; @end #import "OFMutableArray.h" | > > | 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 | /** * \return An OFEnumerator to enumarate through the array's objects */ - (OFEnumerator*)enumerator; @end /// \cond internal @interface OFArrayEnumerator: OFEnumerator { OFDataArray *array; size_t count; unsigned long mutations; unsigned long *mutations_ptr; size_t pos; } - initWithDataArray: (OFDataArray*)data mutationsPointer: (unsigned long*)mutations_ptr; @end /// \endcond #import "OFMutableArray.h" |