mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-14 17:01:22 +00:00
5a7650e54a
Yay, I've wanted this feature in qfcc for many years :).
41 lines
385 B
R
41 lines
385 B
R
@interface Foo : Object
|
|
{
|
|
integer x;
|
|
}
|
|
-run;
|
|
@end
|
|
|
|
|
|
@implementation Foo
|
|
|
|
+load
|
|
{
|
|
print ("+load\n");
|
|
return self;
|
|
}
|
|
|
|
+alloc
|
|
{
|
|
print ("+alloc\n");
|
|
return class_create_instance (self);
|
|
}
|
|
|
|
-init
|
|
{
|
|
print ("-init\n");
|
|
return [super init];
|
|
}
|
|
|
|
+ (void) initialize
|
|
{
|
|
print ("+initialize\n");
|
|
}
|
|
|
|
-run
|
|
{
|
|
print ("Hello world\n");
|
|
printf ("%i %p\n", self, &self.x);
|
|
return self;
|
|
}
|
|
|
|
@end
|