summaryrefslogtreecommitdiff
path: root/MLKInteger.h
diff options
context:
space:
mode:
authorMatthias Andreas Benkard <matthias@benkard.de>2008-06-15 22:09:13 +0200
committerMatthias Andreas Benkard <matthias@benkard.de>2008-06-15 22:09:13 +0200
commit47da9c1e9ac25b3248a808f4519e2c64ecb8e2b4 (patch)
tree8a237a5a18e7b91a2c83473bd6b0a9db381daab0 /MLKInteger.h
parentc2efa347a8e5f1d83427c34defa953e594a2bb12 (diff)
Add class MLKInteger.
Diffstat (limited to 'MLKInteger.h')
-rw-r--r--MLKInteger.h19
1 files changed, 19 insertions, 0 deletions
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 <stdarg.h>
+#include <stdio.h>
+#include <gmp.h>
+
@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