Annotation of gcc/objc/Object.h, revision 1.1.1.4

1.1.1.2   root        1: /* Interface for the Object class for Objective-C.
1.1.1.4 ! root        2:    Copyright (C) 1993, 1994 Free Software Foundation, Inc.
1.1       root        3: 
                      4: This file is part of GNU CC.
                      5: 
1.1.1.2   root        6: GNU CC is free software; you can redistribute it and/or modify it
                      7: under the terms of the GNU General Public License as published by the
                      8: Free Software Foundation; either version 2, or (at your option) any
                      9: later version.
                     10: 
                     11: GNU CC is distributed in the hope that it will be useful, but WITHOUT
                     12: ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
                     13: or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
                     14: License for more details.
1.1       root       15: 
                     16: You should have received a copy of the GNU General Public License
                     17: along with GNU CC; see the file COPYING.  If not, write to
                     18: the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
                     19: 
1.1.1.2   root       20: /* As a special exception, if you link this library with files compiled
                     21:    with GCC to produce an executable, this does not cause the resulting
                     22:    executable to be covered by the GNU General Public License.  This
                     23:    exception does not however invalidate any other reasons why the
                     24:    executable file might be covered by the GNU General Public License. */
1.1       root       25: 
                     26: #ifndef __object_INCLUDE_GNU
                     27: #define __object_INCLUDE_GNU
                     28: 
1.1.1.2   root       29: #include <objc/objc.h>
                     30: #include <objc/typedstream.h>
1.1       root       31: 
                     32: /*
1.1.1.2   root       33:  * All classes are derived from Object.  As such,
                     34:  * this is the overhead tacked onto those objects.
1.1       root       35:  */
1.1.1.2   root       36: @interface Object
                     37: {
                     38:     Class*     isa;    /* A pointer to the instance's class structure */
1.1       root       39: }
                     40: 
1.1.1.2   root       41:         /* Initializing classes and instances */
                     42: + initialize;
                     43: - init;
1.1       root       44: 
1.1.1.2   root       45:         /* Creating, freeing, and copying instances */
1.1       root       46: + new;
1.1.1.2   root       47: + alloc;
1.1       root       48: - free;
                     49: - copy;
                     50: - shallowCopy;
1.1.1.2   root       51: - deepen;
1.1       root       52: - deepCopy;
                     53: 
1.1.1.2   root       54:         /* Identifying classes */
                     55: - (Class*)class;
                     56: - (Class*)superClass;
                     57: - (MetaClass*)metaClass;
                     58: - (const char *)name;
1.1       root       59: 
1.1.1.2   root       60:         /* Identifying and comparing objects */
1.1       root       61: - self;
1.1.1.2   root       62: - (unsigned int)hash;
                     63: - (BOOL)isEqual:anObject;
1.1.1.3   root       64: - (int)compare:anotherObject;
1.1       root       65: 
1.1.1.2   root       66:         /* Testing object type */
                     67: - (BOOL)isMetaClass;
                     68: - (BOOL)isClass;
                     69: - (BOOL)isInstance;
                     70: 
                     71:         /* Testing inheritance relationships */
                     72: - (BOOL)isKindOf:(Class*)aClassObject;
                     73: - (BOOL)isMemberOf:(Class*)aClassObject;
                     74: - (BOOL)isKindOfClassNamed:(const char *)aClassName;
                     75: - (BOOL)isMemberOfClassNamed:(const char *)aClassName;
                     76: 
                     77:         /* Testing class functionality */
                     78: + (BOOL)instancesRespondTo:(SEL)aSel;
                     79: - (BOOL)respondsTo:(SEL)aSel;
                     80: 
                     81:        /* Testing protocol conformance */
                     82: - (BOOL)conformsTo:(Protocol*)aProtocol;
                     83: 
                     84:         /* Introspection */
                     85: + (IMP)instanceMethodFor:(SEL)aSel;
                     86: - (IMP)methodFor:(SEL)aSel;
                     87: + (struct objc_method_description *)descriptionForInstanceMethod:(SEL)aSel;
                     88: - (struct objc_method_description *)descriptionForMethod:(SEL)aSel;
                     89: 
                     90:         /* Sending messages determined at run time */
                     91: - perform:(SEL)aSel;
                     92: - perform:(SEL)aSel with:anObject;
                     93: - perform:(SEL)aSel with:anObject1 with:anObject2;
                     94: 
                     95:         /* Forwarding */
1.1.1.4 ! root       96: - (retval_t)forward:(SEL)aSel :(arglist_t)argFrame;
        !            97: - (retval_t)performv:(SEL)aSel :(arglist_t)argFrame;
1.1.1.2   root       98: 
                     99:         /* Posing */
                    100: + poseAs:(Class*)aClassObject;
                    101: - (Class*)transmuteClassTo:(Class*)aClassObject;
                    102: 
                    103:         /* Enforcing intentions */
                    104: - subclassResponsibility:(SEL)aSel;
                    105: - notImplemented:(SEL)aSel;
1.1.1.3   root      106: - shouldNotImplement:(SEL)aSel;
1.1.1.2   root      107: 
                    108:         /* Error handling */
                    109: - doesNotRecognize:(SEL)aSel;
                    110: - error:(const char *)aString, ...;
                    111: 
                    112:         /* Archiving */
                    113: + (int)version;
                    114: + setVersion:(int)aVersion;
                    115: + (int)streamVersion: (TypedStream*)aStream;
                    116: 
                    117: - read: (TypedStream*)aStream;
                    118: - write: (TypedStream*)aStream;
                    119: - awake;
1.1       root      120: 
                    121: @end
                    122: 
                    123: #endif

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.