ObjFW  Diff

Differences From Artifact [3e0b6e88ce]:

To Artifact [e488c32fdc]:


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 - 2009
 *   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;

/**
 * The OFArray class is a class for storing objects in an array.
 */
@interface OFArray: OFObject <OFCopying, OFMutableCopying, OFFastEnumeration>
{
	OFDataArray *array;
}

/**

|


















|







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;
}

/**
145
146
147
148
149
150
151

152
153
154
155
156
157
158
159
160
161
162
163

164
165

/**
 * \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"