/* MAValue - Protocols for NSValue and NSNumber, plus complex numbers Copyright (C) 1995, Adam Fedor */ #ifndef __MAValue_INCLUDE_ #define __MAValue_INCLUDE_ #ifndef GNUSTEP #import #else #include #endif #include @protocol NSNumber - (char)charValue; - (unsigned char)unsignedCharValue; - (short)shortValue; - (unsigned short)unsignedShortValue; - (int)intValue; - (unsigned int)unsignedIntValue; - (long)longValue; - (unsigned long)unsignedLongValue; - (long long)longLongValue; - (unsigned long long)unsignedLongLongValue; - (float)floatValue; - (double)doubleValue; - (BOOL)boolValue; - (NSString *)stringValue; - (NSComparisonResult)compare:(NSNumber *)otherNumber; @end @interface NSNumber (ProtocolExtensions) @end @protocol ComplexNumber - (complex_float)complexFloatValue; - (complex_double)complexDoubleValue; @end @interface NSNumber (ComplexExtensions) @end @interface MANumber : NSNumber + (id )numberWithComplexFloat:(complex_float)value; + (id )numberWithComplexDouble:(complex_double)value; @end #endif