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