mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
Correction for coding... add base class for converter.
This commit is contained in:
parent
4c51378c0c
commit
b2f4495a75
2 changed files with 20 additions and 2 deletions
|
@ -34,6 +34,12 @@ extern "C" {
|
|||
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_12, GS_API_LATEST)
|
||||
|
||||
@interface NSUnitConverter : NSObject
|
||||
- (double)baseUnitValueFromValue:(double)value;
|
||||
- (double)valueFromBaseUnitValue:(double)baseUnitValue;
|
||||
@end
|
||||
|
||||
|
||||
@interface NSUnit : NSObject <NSCopying, NSCoding>
|
||||
{
|
||||
NSString *_symbol;
|
||||
|
|
|
@ -24,9 +24,21 @@
|
|||
*/
|
||||
|
||||
#include <Foundation/NSUnit.h>
|
||||
#include <Foundation/NSArchiver.h>
|
||||
|
||||
@implementation NSUnitConverter
|
||||
- (double)baseUnitValueFromValue:(double)value
|
||||
{
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
- (double)valueFromBaseUnitValue:(double)baseUnitValue
|
||||
{
|
||||
return 0.0;
|
||||
}
|
||||
@end
|
||||
|
||||
@implementation NSUnit
|
||||
|
||||
|
||||
+ (instancetype)new
|
||||
{
|
||||
|
@ -57,7 +69,7 @@
|
|||
{
|
||||
if([coder allowsKeyedCoding])
|
||||
{
|
||||
_symbol = [coder decodeObjectRorKey: @"symbol"];
|
||||
_symbol = [coder decodeObjectForKey: @"symbol"];
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue