mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-12-20 17:41:06 +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
|