ObjFW  Diff

Differences From Artifact [6453b5d17a]:

To Artifact [9ea1dbd0dc]:


34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
	OF_NUMBER_SSIZE,
	OF_NUMBER_INTMAX,
	OF_NUMBER_UINTMAX,
	OF_NUMBER_PTRDIFF,
	OF_NUMBER_INTPTR,
	OF_NUMBER_FLOAT,
	OF_NUMBER_DOUBLE,
	OF_NUMBER_LONG_DOUBLE
};

/**
 * The OFNumber class provides a way to store a number in an object and
 * manipulate it.
 */
@interface OFNumber: OFObject







<







34
35
36
37
38
39
40

41
42
43
44
45
46
47
	OF_NUMBER_SSIZE,
	OF_NUMBER_INTMAX,
	OF_NUMBER_UINTMAX,
	OF_NUMBER_PTRDIFF,
	OF_NUMBER_INTPTR,
	OF_NUMBER_FLOAT,
	OF_NUMBER_DOUBLE,

};

/**
 * The OFNumber class provides a way to store a number in an object and
 * manipulate it.
 */
@interface OFNumber: OFObject
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
		ssize_t	       ssize;
		intmax_t       intmax;
		uintmax_t      uintmax;
		ptrdiff_t      ptrdiff;
		intptr_t       intptr;
		float	       float_;
		double	       double_;
		long double    longdouble;
	} value;
	enum of_number_type type;
}

+ numberWithChar: (char)char_;
+ numberWithShort: (short)short_;
+ numberWithInt: (int)int_;







<







67
68
69
70
71
72
73

74
75
76
77
78
79
80
		ssize_t	       ssize;
		intmax_t       intmax;
		uintmax_t      uintmax;
		ptrdiff_t      ptrdiff;
		intptr_t       intptr;
		float	       float_;
		double	       double_;

	} value;
	enum of_number_type type;
}

+ numberWithChar: (char)char_;
+ numberWithShort: (short)short_;
+ numberWithInt: (int)int_;
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
+ numberWithSSize: (ssize_t)ssize;
+ numberWithIntMax: (intmax_t)intmax;
+ numberWithUIntMax: (uintmax_t)uintmax;
+ numberWithPtrDiff: (ptrdiff_t)ptrdiff;
+ numberWithIntPtr: (intptr_t)intptr;
+ numberWithFloat: (float)float_;
+ numberWithDouble: (double)double_;
+ numberWithLongDouble: (long double)longdouble;

- initWithChar: (char)char_;
- initWithShort: (short)short_;
- initWithInt: (int)int_;
- initWithLong: (long)long_;
- initWithUChar: (unsigned char)uchar;
- initWithUShort: (unsigned short)ushort;







<







95
96
97
98
99
100
101

102
103
104
105
106
107
108
+ numberWithSSize: (ssize_t)ssize;
+ numberWithIntMax: (intmax_t)intmax;
+ numberWithUIntMax: (uintmax_t)uintmax;
+ numberWithPtrDiff: (ptrdiff_t)ptrdiff;
+ numberWithIntPtr: (intptr_t)intptr;
+ numberWithFloat: (float)float_;
+ numberWithDouble: (double)double_;


- initWithChar: (char)char_;
- initWithShort: (short)short_;
- initWithInt: (int)int_;
- initWithLong: (long)long_;
- initWithUChar: (unsigned char)uchar;
- initWithUShort: (unsigned short)ushort;
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
- initWithSSize: (ssize_t)ssize;
- initWithIntMax: (intmax_t)intmax;
- initWithUIntMax: (uintmax_t)uintmax;
- initWithPtrDiff: (ptrdiff_t)ptrdiff;
- initWithIntPtr: (intptr_t)intptr;
- initWithFloat: (float)float_;
- initWithDouble: (double)double_;
- initWithLongDouble: (long double)longdouble;

- (enum of_number_type)type;

- (char)asChar;
- (short)asShort;
- (int)asInt;
- (long)asLong;







<







120
121
122
123
124
125
126

127
128
129
130
131
132
133
- initWithSSize: (ssize_t)ssize;
- initWithIntMax: (intmax_t)intmax;
- initWithUIntMax: (uintmax_t)uintmax;
- initWithPtrDiff: (ptrdiff_t)ptrdiff;
- initWithIntPtr: (intptr_t)intptr;
- initWithFloat: (float)float_;
- initWithDouble: (double)double_;


- (enum of_number_type)type;

- (char)asChar;
- (short)asShort;
- (int)asInt;
- (long)asLong;
151
152
153
154
155
156
157
158
159
- (ssize_t)asSSize;
- (intmax_t)asIntMax;
- (uintmax_t)asUIntMax;
- (ptrdiff_t)asPtrDiff;
- (intptr_t)asIntPtr;
- (float)asFloat;
- (double)asDouble;
- (long double)asLongDouble;
@end







<

147
148
149
150
151
152
153

154
- (ssize_t)asSSize;
- (intmax_t)asIntMax;
- (uintmax_t)asUIntMax;
- (ptrdiff_t)asPtrDiff;
- (intptr_t)asIntPtr;
- (float)asFloat;
- (double)asDouble;

@end