mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-29 23:52:22 +00:00
27 lines
308 B
R
27 lines
308 B
R
#include "Number.h"
|
|
#include "string.h"
|
|
|
|
@implementation Number
|
|
|
|
+ (id) newFromInt: (int) i
|
|
{
|
|
return [[self alloc] initWithInt: i];
|
|
}
|
|
|
|
- (id) initWithInt: (int) i
|
|
{
|
|
value = i;
|
|
return [super init];
|
|
}
|
|
|
|
- (int) intValue
|
|
{
|
|
return value;
|
|
}
|
|
|
|
- (string) printForm
|
|
{
|
|
return itos (value);
|
|
}
|
|
|
|
@end
|