OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [objc-obj-c++-shared/] [Object1.h] - Blame information for rev 315

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 310 jeremybenn
/* Object definition taken from <objc/Object.h>
2
 */
3
#ifndef _OBJC_OBJECT1_H_
4
#define _OBJC_OBJECT1_H_
5
 
6
#undef DO_NEXT_M64_OBJECT_IMPLEMENTATION
7
 
8
#ifndef __NEXT_RUNTIME__
9
#  include <objc/Object.h>
10
#else
11
#  include "next-abi.h"
12
#  ifndef NEXT_OBJC_USE_NEW_INTERFACE
13
/* We are on a next system, or version, that is happy to compile V0 ABI */
14
#    include <objc/Object.h>
15
#  else
16
#    if (NEXT_OBJC_ABI_VERSION==0)
17
/* We are on a system that has V0 ABI implementation in libobjc.dylib.
18
 * However, we need to use the new accessors and pretend that the
19
 * structures are opaque to avoid 'deprecated' warnings
20
 */
21
#      include <objc/Object.h>
22
#    else
23
/* We are on a system that includes a V2 ABI Object in libobjc.dylib.
24
*/
25
#      ifdef __OBJC2__
26
/* ... and we have a V2 ABI compiler ..  */
27
#        include <objc/Object.h>
28
#      else
29
/* We can't access the Object definition in libobjc.dylib because
30
 * we can't yet generate OBJC2 code.
31
 *
32
 * So we'll roll our own Object - purely for the sake of compile
33
 * checks - the code is unlikely to run...
34
*/
35
#        ifndef _OBJC_OBJECT_H_
36
#        define _OBJC_OBJECT_H_
37
 
38
#include <stdarg.h>
39
#import <objc/objc-runtime.h>
40
 
41
/* This is a cut-down Object with only the methods currently required
42
   by the testsuite declared.
43
 
44
   For those executables that require an implementation (to link) this
45
   can be provided in a given test by placing:
46
   #include "path/to/objc-c++shared/Object1-implementation.h"
47
   at the end of the source for the test.
48
*/
49
 
50
@interface Object
51
{
52
        Class isa; /* A pointer to the instance's class structure */
53
}
54
+ initialize;
55
- init;
56
 
57
+ new;
58
+ free;
59
- free;
60
+ alloc;
61
//- copy;
62
//+ allocFromZone:(void *)zone;
63
//- copyFromZone:(void *)zone;
64
//- (void *)zone;
65
 
66
+ class;
67
//+ superclass;
68
//+ (const char *) name;
69
- class;
70
- superclass;
71
- (const char *) name;
72
 
73
//- self;
74
//- (unsigned int) hash;
75
//-(BOOL) isEqual:anObject;
76
 
77
/* Testing inheritance relationships */
78
 
79
//- (BOOL) isKindOf: aClassObject;
80
//- (BOOL) isMemberOf: aClassObject;
81
//- (BOOL) isKindOfClassNamed: (const char *)aClassName;
82
//- (BOOL) isMemberOfClassNamed: (const char *)aClassName;
83
 
84
/* Testing class functionality */
85
 
86
//+ (BOOL) instancesRespondTo:(SEL)aSelector;
87
//- (BOOL) respondsTo:(SEL)aSelector;
88
 
89
/* Testing protocol conformance */
90
 
91
- (BOOL) conformsTo: (Protocol *)aProtocolObject;
92
//+ (BOOL) conformsTo: (Protocol *)aProtocolObject;
93
 
94
/* Obtaining method descriptors from protocols */
95
 
96
//- (struct objc_method_description *) descriptionForMethod:(SEL)aSel;
97
//+ (struct objc_method_description *) descriptionForInstanceMethod:(SEL)aSel;
98
 
99
/* Obtaining method handles */
100
 
101
//- (IMP) methodFor:(SEL)aSelector;
102
//+ (IMP) instanceMethodFor:(SEL)aSelector;
103
 
104
/* Sending messages determined at run time */
105
 
106
//- perform:(SEL)aSelector;
107
//- perform:(SEL)aSelector with:anObject;
108
//- perform:(SEL)aSelector with:object1 with:object2;
109
 
110
/* Posing */
111
 
112
//+ poseAs: aClassObject;
113
 
114
/* Enforcing intentions */
115
 
116
//- subclassResponsibility:(SEL)aSelector;
117
//- notImplemented:(SEL)aSelector;
118
 
119
/* Error handling */
120
 
121
//- doesNotRecognize:(SEL)aSelector;
122
//- error:(const char *)aString, ...;
123
 
124
/* Debugging */
125
 
126
//- (void) printForDebugger:(void *)stream;
127
 
128
/* Archiving */
129
 
130
//- awake;
131
//- write:(void *)stream;
132
//- read:(void *)stream;
133
//+ (int) version;
134
//+ setVersion: (int) aVersion;
135
 
136
/* Forwarding */
137
 
138
//- forward: (SEL)sel : (marg_list)args;
139
//- performv: (SEL)sel : (marg_list)args;
140
 
141
@end
142
 
143
#define DO_NEXT_M64_OBJECT_IMPLEMENTATION
144
 
145
#        endif /* _OBJC_OBJECT_H_ */
146
#      endif /* __OBJC2__ */
147
#      endif /* ABI=0 */
148
#    endif /* NEXT_OBJC_USE_NEW_INTERFACE */
149
#   endif /* __NEXT_RUNTIME__ */
150
#endif /* _OBJC_OBJECT1_H_ */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.