mirror of
https://github.com/darlinghq/darling-cocotron.git
synced 2025-02-26 06:46:23 +00:00
NSDecimalNumberPlaceholder added
This commit is contained in:
parent
75ec934545
commit
b069504ea0
5
Foundation/NSDecimal/NSDecimalNumberPlaceholder.h
Normal file
5
Foundation/NSDecimal/NSDecimalNumberPlaceholder.h
Normal file
@ -0,0 +1,5 @@
|
||||
#import <Foundation/NSDecimalNumber.h>
|
||||
|
||||
@interface NSDecimalNumberPlaceholder : NSDecimalNumber
|
||||
|
||||
@end
|
24
Foundation/NSDecimal/NSDecimalNumberPlaceholder.m
Normal file
24
Foundation/NSDecimal/NSDecimalNumberPlaceholder.m
Normal file
@ -0,0 +1,24 @@
|
||||
#import "NSDecimalNumberPlaceholder.h"
|
||||
#import <Foundation/NSRaise.h>
|
||||
#import <Foundation/NSCoder.h>
|
||||
|
||||
@implementation NSDecimalNumberPlaceholder
|
||||
|
||||
-initWithCoder:(NSCoder *)coder {
|
||||
if([coder allowsKeyedCoding]){
|
||||
NSInteger exponent=[coder decodeIntegerForKey:@"NS.exponent"];
|
||||
NSInteger length=[coder decodeIntegerForKey:@"NS.length"];
|
||||
BOOL negative=[coder decodeBoolForKey:@"NS.negative"];
|
||||
BOOL compact=[coder decodeBoolForKey:@"NS.compact"];
|
||||
NSInteger mantissaByteOrder=[coder decodeIntegerForKey:@"NS.mantissa.bo"]; // byte order??
|
||||
NSUInteger byteLength=0;
|
||||
const uint8_t *mantissa=[coder decodeBytesForKey:@"NS.mantissa" returnedLength:&byteLength];
|
||||
}
|
||||
|
||||
// We should warn here, but this needs to be ignored for an app
|
||||
// NSUnimplementedMethod();
|
||||
[self dealloc];
|
||||
return [[NSNumber alloc] initWithInteger:0]; // NSNumber is implemented
|
||||
}
|
||||
|
||||
@end
|
Loading…
x
Reference in New Issue
Block a user