]>
Commit | Line | Data |
---|---|---|
88e17b57 | 1 | /* Interface for the Object class for Objective-C. |
f82356d2 | 2 | Copyright (C) 1993-2014 Free Software Foundation, Inc. |
88e17b57 | 3 | |
6c82ad25 | 4 | This file is part of GCC. |
88e17b57 | 5 | |
6c82ad25 | 6 | GCC is free software; you can redistribute it and/or modify it |
88e17b57 | 7 | under the terms of the GNU General Public License as published by the |
748086b7 | 8 | Free Software Foundation; either version 3, or (at your option) any |
88e17b57 BE |
9 | later version. |
10 | ||
6c82ad25 | 11 | GCC is distributed in the hope that it will be useful, but WITHOUT |
88e17b57 BE |
12 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
13 | FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public | |
14 | License for more details. | |
15 | ||
748086b7 JJ |
16 | Under Section 7 of GPL version 3, you are granted additional |
17 | permissions described in the GCC Runtime Library Exception, version | |
18 | 3.1, as published by the Free Software Foundation. | |
19 | ||
20 | You should have received a copy of the GNU General Public License and | |
21 | a copy of the GCC Runtime Library Exception along with this program; | |
22 | see the files COPYING3 and COPYING.RUNTIME respectively. If not, see | |
23 | <http://www.gnu.org/licenses/>. */ | |
88e17b57 | 24 | |
88e17b57 BE |
25 | |
26 | #ifndef __object_INCLUDE_GNU | |
27 | #define __object_INCLUDE_GNU | |
28 | ||
cf223603 | 29 | #include "objc.h" |
9567d415 | 30 | |
1a6213c3 ZL |
31 | #ifdef __cplusplus |
32 | extern "C" { | |
33 | #endif | |
34 | ||
002d4675 NP |
35 | /* The Object class is a very minimal root class included with the |
36 | runtime. It is used as superclass for the two classes included | |
37 | with the runtime, Protocol and NXConstantString. | |
88e17b57 | 38 | |
002d4675 NP |
39 | Because Objective-C allows multiple root classes, you can define |
40 | your own root class, different from Object. | |
88e17b57 | 41 | |
002d4675 NP |
42 | In particular, a Foundation library (such as GNUstep Base) is |
43 | expected to provide its own root class (typically called NSObject), | |
44 | fully integrated with the library's own high-level features. It is | |
45 | expected that you should always use and interact with NSObject, and | |
46 | mostly ignore Object. */ | |
88e17b57 | 47 | |
002d4675 NP |
48 | /* All classes are derived from Object. As such, this is the overhead |
49 | tacked onto those objects. */ | |
50 | @interface Object | |
51 | { | |
52 | Class isa; /* A pointer to the instance's class structure. */ | |
53 | } | |
88e17b57 | 54 | - (Class)class; |
002d4675 | 55 | - (BOOL)isEqual: (id)anObject; |
88e17b57 BE |
56 | @end |
57 | ||
1a6213c3 ZL |
58 | #ifdef __cplusplus |
59 | } | |
60 | #endif | |
61 | ||
88e17b57 | 62 | #endif |