From 47da9c1e9ac25b3248a808f4519e2c64ecb8e2b4 Mon Sep 17 00:00:00 2001 From: Matthias Andreas Benkard Date: Sun, 15 Jun 2008 22:09:13 +0200 Subject: Add class MLKInteger. --- MLKInteger.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'MLKInteger.h') diff --git a/MLKInteger.h b/MLKInteger.h index 38d319e..57687b4 100644 --- a/MLKInteger.h +++ b/MLKInteger.h @@ -18,18 +18,37 @@ #import "MLKLispValue.h" +#include +#include +#include + @class NSString; @interface MLKInteger : MLKLispValue { + mpz_t value; } +-(MLKInteger *) initWithMPZ:(mpz_t)mpz; +-(MLKInteger *) initWithString:(NSString *)string + negative:(BOOL)negative + base:(unsigned int)base; + ++(MLKInteger *) integerWithMPZ:(mpz_t)mpz; +(MLKInteger *) integerWithString:(NSString *)string negative:(BOOL)negative base:(unsigned int)base; -(int) intValue; +-(MLKInteger *) add:(MLKInteger *)arg; +-(MLKInteger *) subtract:(MLKInteger *)arg; +-(MLKInteger *) multiplyWith:(MLKInteger *)arg; +-(MLKInteger *) divideBy:(MLKInteger *)arg; + +-(NSString *) description; +-(NSString *) descriptionWithBase:(int)base; + -(void) dealloc; @end -- cgit v1.2.3