ftp.nice.ch/pub/next/science/mathematics/MathArray.0.40.s.tar.gz#/MathArray-0.40/MathArray/MAValue.h

This is MAValue.h in view mode; [Download] [Up]

/*	
    MAValue - Protocols for NSValue and NSNumber, plus complex numbers
   
    Copyright (C) 1995, Adam Fedor

*/

#ifndef __MAValue_INCLUDE_
#define __MAValue_INCLUDE_

#ifdef NEXT_FOUNDATION
#import <foundation/NSValue.h>
#else
#import <Foundation/NSValue.h>
#endif
#include <MathArray/complex.h>

@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) <NSNumber>
@end

@protocol ComplexNumber

- (complex_float)complexFloatValue;
- (complex_double)complexDoubleValue;

@end

@interface NSNumber (ComplexExtensions) <ComplexNumber>
@end

@interface MANumber : NSNumber

+ (id <NSNumber,ComplexNumber>)numberWithComplexFloat:(complex_float)value;
+ (id <NSNumber,ComplexNumber>)numberWithComplexDouble:(complex_double)value;

@end

#endif

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.