objc.h

Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
00003  *
00004  * @APPLE_LICENSE_HEADER_START@
00005  * 
00006  * Portions Copyright (c) 1999 Apple Computer, Inc.  All Rights
00007  * Reserved.  This file contains Original Code and/or Modifications of
00008  * Original Code as defined in and that are subject to the Apple Public
00009  * Source License Version 1.1 (the "License").  You may not use this file
00010  * except in compliance with the License.  Please obtain a copy of the
00011  * License at http://www.apple.com/publicsource and read it before using
00012  * this file.
00013  * 
00014  * The Original Code and all software distributed under the License are
00015  * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
00016  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
00017  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
00018  * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT.  Please see the
00019  * License for the specific language governing rights and limitations
00020  * under the License.
00021  * 
00022  * @APPLE_LICENSE_HEADER_END@
00023  */
00024 /*
00025  *  objc.h
00026  *  Copyright 1988-1996, NeXT Software, Inc.
00027  */
00028 
00029 #ifndef _OBJC_OBJC_H_
00030 #define _OBJC_OBJC_H_
00031 
00032 #include "objc/objc-api.h"      // for OBJC_EXPORT
00033 
00034 typedef struct objc_class *Class;
00035 
00036 typedef struct objc_object {
00037     Class isa;
00038 } *id;
00039 
00040 typedef struct objc_selector    *SEL;    
00041 typedef id          (*IMP)(id, SEL, ...);
00042 #ifndef BOOL
00043 typedef char            BOOL;
00044 #endif
00045 
00046 #define YES             (BOOL)1
00047 #define NO              (BOOL)0
00048 
00049 #ifndef Nil
00050 #define Nil 0       /* id of Nil class */
00051 #endif
00052 
00053 #ifndef nil
00054 #define nil 0       /* id of Nil instance */
00055 #endif
00056 
00057 
00058 #if !defined(STRICT_OPENSTEP)
00059 
00060 typedef char *STR;
00061 
00062 OBJC_EXPORT BOOL sel_isMapped(SEL sel);
00063 OBJC_EXPORT const char *sel_getName(SEL sel);
00064 OBJC_EXPORT SEL sel_getUid(const char *str);
00065 OBJC_EXPORT SEL sel_registerName(const char *str);
00066 OBJC_EXPORT const char *object_getClassName(id obj);
00067 OBJC_EXPORT void *object_getIndexedIvars(id obj);
00068 
00069 #define ISSELECTOR(sel) sel_isMapped(sel)
00070 #define SELNAME(sel)    sel_getName(sel)
00071 #define SELUID(str) sel_getUid(str)
00072 #define NAMEOF(obj)     object_getClassName(obj)
00073 #define IV(obj)         object_getIndexedIvars(obj)
00074 
00075 #if defined(__osf__) && defined(__alpha__)
00076     typedef long arith_t;
00077     typedef unsigned long uarith_t;
00078     #define ARITH_SHIFT 32
00079 #else
00080     typedef int arith_t;
00081     typedef unsigned uarith_t;
00082     #define ARITH_SHIFT 16
00083 #endif
00084 
00085 #endif  /* !STRICT_OPENSTEP */
00086 
00087 #endif /* _OBJC_OBJC_H_ */

Generated on Tue Sep 19 21:18:25 2006 for Boomerang by  doxygen 1.4.6