Annotation of GNUtools/cc/objc/Object.h, revision 1.1.1.1

1.1       root        1: /* Interface for the Object class for Objective-C.
                      2:    Copyright (C) 1993, 1994 Free Software Foundation, Inc.
                      3: 
                      4: This file is part of GNU CC.
                      5: 
                      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.
                     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: 
                     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. */
                     25: 
                     26: #ifndef __object_INCLUDE_GNU
                     27: #define __object_INCLUDE_GNU
                     28: 
                     29: #include <objc/objc.h>
                     30: #include <objc/typedstream.h>
                     31: 
                     32: /*
                     33:  * All classes are derived from Object.  As such,
                     34:  * this is the overhead tacked onto those objects.
                     35:  */
                     36: @interface Object
                     37: {
                     38:     Class*     isa;    /* A pointer to the instance's class structure */
                     39: }
                     40: 
                     41:         /* Initializing classes and instances */
                     42: + initialize;
                     43: - init;
                     44: 
                     45:         /* Creating, freeing, and copying instances */
                     46: + new;
                     47: + alloc;
                     48: - free;
                     49: - copy;
                     50: - shallowCopy;
                     51: - deepen;
                     52: - deepCopy;
                     53: 
                     54:         /* Identifying classes */
                     55: - (Class*)class;
                     56: - (Class*)superClass;
                     57: - (MetaClass*)metaClass;
                     58: - (const char *)name;
                     59: 
                     60:         /* Identifying and comparing objects */
                     61: - self;
                     62: - (unsigned int)hash;
                     63: - (BOOL)isEqual:anObject;
                     64: - (int)compare:anotherObject;
                     65: 
                     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 */
                     96: - forward:(SEL)aSel :(arglist_t)argFrame;
                     97: - performv:(SEL)aSel :(arglist_t)argFrame;
                     98: 
                     99:         /* Posing */
                    100: + poseAs:(Class*)aClassObject;
                    101: - (Class*)transmuteClassTo:(Class*)aClassObject;
                    102: 
                    103:         /* Enforcing intentions */
                    104: - subclassResponsibility:(SEL)aSel;
                    105: - notImplemented:(SEL)aSel;
                    106: - shouldNotImplement:(SEL)aSel;
                    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;
                    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.