ObjFW  Diff

Differences From Artifact [f46ea6f043]:

To Artifact [78dcc54e1b]:


293
294
295
296
297
298
299


300

301
302
303

304
305
306
307
308


309

310
311

312
313
314

315
316
317
318
319
320
321


322
323

324
325


326

327
328

329
330


331

332
333

334
335


336

337
338

339
340
341
342
343
344
345
293
294
295
296
297
298
299
300
301

302
303


304



305
306
307
308

309
310

311
312
313

314
315
316
317
318
319
320
321
322
323
324

325
326
327
328
329

330
331

332
333
334
335
336

337
338

339
340
341
342
343

344
345

346
347
348
349
350
351
352
353







+
+
-
+

-
-
+
-
-
-


+
+
-
+

-
+


-
+







+
+

-
+


+
+
-
+

-
+


+
+
-
+

-
+


+
+
-
+

-
+







/*!
 * @protocol OFObject OFObject.h ObjFW/OFObject.h
 *
 * @brief The protocol which all root classes implement.
 */
@protocol OFObject
/*!
 * @brief Returns the class of the object.
 *
 * @brief The class of the object.
 * @return The class of the object
 */
# ifndef __cplusplus
@property (readonly, nonatomic) Class class;
- (Class)class;
# else
@property (readonly, nonatomic, getter=class) Class class_;
# endif

/*!
 * @brief Returns the superclass of the object.
 *
 * @brief The superclass of the object.
 * @return The superclass of the object
 */
@property OF_NULLABLE_PROPERTY (readonly, nonatomic) Class superclass;
- (nullable Class)superclass;

/*!
 * @brief A 32 bit hash for the object.
 * @brief Returns a 32 bit hash for the object.
 *
 * Classes containing data (like strings, arrays, lists etc.) should reimplement
 * this!
 *
 * @warning If you reimplement this, you also need to reimplement @ref isEqual:
 *	    to behave in a way compatible to your reimplementation of this
 *	    method!
 *
 * @return A 32 bit hash for the object
 */
@property (readonly, nonatomic) uint32_t hash;
- (uint32_t)hash;

/*!
 * @brief Returns the retain count.
 *
 * @brief The retain count.
 * @return The retain count
 */
@property (readonly, nonatomic) unsigned int retainCount;
- (unsigned int)retainCount;

/*!
 * @brief Returns whether the object is a proxy object.
 *
 * @brief Whether the object is a proxy object.
 * @return Whether the object is a proxy object
 */
@property (readonly, nonatomic) bool isProxy;
- (bool)isProxy;

/*!
 * @brief Returns whether the object allows weak references.
 *
 * @brief Whether the object allows weak references.
 * @return Whether the object allows weak references
 */
@property (readonly, nonatomic) bool allowsWeakReference;
- (bool)allowsWeakReference;

/*!
 * @brief Returns a boolean whether the object of the specified kind.
 *
 * @param class_ The class whose kind is checked
 * @return A boolean whether the object is of the specified kind
 */
527
528
529
530
531
532
533











534
535
536
537
538
539
540
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559







+
+
+
+
+
+
+
+
+
+
+







@property (class, readonly, nonatomic, getter=class) Class class_;
#  endif
@property (class, readonly, nonatomic) OFString *className;
@property (class, readonly, nullable, nonatomic) Class superclass;
@property (class, readonly, nonatomic) OFString *description;
# endif

# ifdef __cplusplus
@property (readonly, nonatomic) Class class;
# else
@property (readonly, nonatomic, getter=class) Class class_;
#endif
@property OF_NULLABLE_PROPERTY (readonly, nonatomic) Class superclass;
@property (readonly, nonatomic) uint32_t hash;
@property (readonly, nonatomic) unsigned int retainCount;
@property (readonly, nonatomic) bool isProxy;
@property (readonly, nonatomic) bool allowsWeakReference;

/*!
 * @brief The name of the object's class.
 */
@property (readonly, nonatomic) OFString *className;

/*!
 * @brief A description for the object.