1 //
2 //  NSMutableNumber.h
3 //  dataBoiler
4 //
5 //  Created by matthew on Wed Sep 18 2002.
6 //  Copyright (c) 2002 __MyCompanyName__. All rights reserved.
7 //
8 
9 #import <Foundation/Foundation.h>
10 #import "utils.h"
11 #define FLOATTYPE 1
12 #define INTTYPE 0
13 @interface NSMutableNumber : NSObject {
14     int _sign, _type, _exp;
15     int _iValue;
16     int _decPlaces;
17     float _fValue;
18 }
19 -(id) initWithInt: (int) value;
20 -(id) initWithFloat: (float) value;
21 -(id) initWithString: (NSString *) value;
22 -(id) initWithFloat: (float) value withDecPlaces: (int) dp;
23 -(void) setStringValue: (NSString *) value;
24 -(NSString *) description;
25 -(void) inc;
26 -(void) dec;
27 -(void) add: (NSMutableNumber *) what;
28 -(void) addInt: (int) what;
29 -(void) addFloat: (float) what;
30 -(void) addString: (NSString *) what;
31 //converters
32 -(void) toInt;
33 -(void) toFloat;
34 -(void) negate;
35 -(void) zeroInt;
36 -(void) zeroFloat;
37 //accessors
38 -(int) type;
39 -(int) decPlaces;
40 -(float) floatValue;
41 -(int) intValue;
42 -(void) setDecPlaces: (int) n;
43 -(void) setInt: (int) what;
44 -(void) setFloat: (float) what;
45 -(void) setFloat: (float) what decPlaces: (int) howMany;
46 
47 @end
48