163d1a8abSmrg /* Interface for the Object class for Objective-C. 2*ec02198aSmrg Copyright (C) 1993-2020 Free Software Foundation, Inc. 363d1a8abSmrg 463d1a8abSmrg This file is part of GCC. 563d1a8abSmrg 663d1a8abSmrg GCC is free software; you can redistribute it and/or modify it 763d1a8abSmrg under the terms of the GNU General Public License as published by the 863d1a8abSmrg Free Software Foundation; either version 3, or (at your option) any 963d1a8abSmrg later version. 1063d1a8abSmrg 1163d1a8abSmrg GCC is distributed in the hope that it will be useful, but WITHOUT 1263d1a8abSmrg ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 1363d1a8abSmrg FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public 1463d1a8abSmrg License for more details. 1563d1a8abSmrg 1663d1a8abSmrg Under Section 7 of GPL version 3, you are granted additional 1763d1a8abSmrg permissions described in the GCC Runtime Library Exception, version 1863d1a8abSmrg 3.1, as published by the Free Software Foundation. 1963d1a8abSmrg 2063d1a8abSmrg You should have received a copy of the GNU General Public License and 2163d1a8abSmrg a copy of the GCC Runtime Library Exception along with this program; 2263d1a8abSmrg see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 2363d1a8abSmrg <http://www.gnu.org/licenses/>. */ 2463d1a8abSmrg 2563d1a8abSmrg 2663d1a8abSmrg #ifndef __object_INCLUDE_GNU 2763d1a8abSmrg #define __object_INCLUDE_GNU 2863d1a8abSmrg 2963d1a8abSmrg #include "objc.h" 3063d1a8abSmrg 3163d1a8abSmrg #ifdef __cplusplus 3263d1a8abSmrg extern "C" { 3363d1a8abSmrg #endif 3463d1a8abSmrg 3563d1a8abSmrg /* The Object class is a very minimal root class included with the 3663d1a8abSmrg runtime. It is used as superclass for the two classes included 3763d1a8abSmrg with the runtime, Protocol and NXConstantString. 3863d1a8abSmrg 3963d1a8abSmrg Because Objective-C allows multiple root classes, you can define 4063d1a8abSmrg your own root class, different from Object. 4163d1a8abSmrg 4263d1a8abSmrg In particular, a Foundation library (such as GNUstep Base) is 4363d1a8abSmrg expected to provide its own root class (typically called NSObject), 4463d1a8abSmrg fully integrated with the library's own high-level features. It is 4563d1a8abSmrg expected that you should always use and interact with NSObject, and 4663d1a8abSmrg mostly ignore Object. */ 4763d1a8abSmrg 4863d1a8abSmrg /* All classes are derived from Object. As such, this is the overhead 4963d1a8abSmrg tacked onto those objects. */ 5063d1a8abSmrg @interface Object 5163d1a8abSmrg { 5263d1a8abSmrg Class isa; /* A pointer to the instance's class structure. */ 5363d1a8abSmrg } 5463d1a8abSmrg - (Class)class; 5563d1a8abSmrg - (BOOL)isEqual: (id)anObject; 5663d1a8abSmrg @end 5763d1a8abSmrg 5863d1a8abSmrg #ifdef __cplusplus 5963d1a8abSmrg } 6063d1a8abSmrg #endif 6163d1a8abSmrg 6263d1a8abSmrg #endif 63