mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 00:41:02 +00:00
compiling nsmeasurement
This commit is contained in:
parent
f56846b342
commit
41f827fae1
2 changed files with 60 additions and 2 deletions
|
@ -2,7 +2,7 @@
|
|||
/* Definition of class NSMeasurement
|
||||
Copyright (C) 2019 Free Software Foundation, Inc.
|
||||
|
||||
By: heron
|
||||
By: Gregory John Casamento <greg.casamento@gmail.com>
|
||||
Date: Mon Sep 30 15:58:21 EDT 2019
|
||||
|
||||
This file is part of the GNUstep Library.
|
||||
|
@ -27,6 +27,7 @@
|
|||
#define _NSMeasurement_h_GNUSTEP_BASE_INCLUDE
|
||||
|
||||
#include <Foundation/NSObject.h>
|
||||
#include <Foundation/NSUnit.h>
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
|
@ -34,7 +35,27 @@ extern "C" {
|
|||
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_0, GS_API_LATEST)
|
||||
|
||||
@interface NSMeasurement : NSObject
|
||||
@interface NSMeasurement : NSObject <NSCopying, NSCoding>
|
||||
|
||||
// Creating Measurements
|
||||
- (instancetype)initWithDoubleValue: (double)doubleValue
|
||||
unit: (NSUnit *)unit;
|
||||
|
||||
|
||||
// Accessing unit and value
|
||||
- (NSUnit *) unit;
|
||||
|
||||
- (double) doubleValue;
|
||||
|
||||
// Conversion
|
||||
- (BOOL) canBeConvertedToUnit: (NSUnit *)unit;
|
||||
|
||||
- (NSMeasurement *)measurementByConvertingToUnit:(NSUnit *)unit;
|
||||
|
||||
// Operating
|
||||
- (NSMeasurement *)measurementByAddingMeasurement:(NSMeasurement *)measurement;
|
||||
|
||||
- (NSMeasurement *)measurementBySubtractingMeasurement:(NSMeasurement *)measurement;
|
||||
|
||||
@end
|
||||
|
||||
|
|
|
@ -26,6 +26,43 @@
|
|||
#include <Foundation/NSMeasurement.h>
|
||||
|
||||
@implementation NSMeasurement
|
||||
// Creating Measurements
|
||||
- (instancetype)initWithDoubleValue: (double)doubleValue
|
||||
unit: (NSUnit *)unit
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
|
||||
// Accessing unit and value
|
||||
- (NSUnit *) unit
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (double) doubleValue
|
||||
{
|
||||
}
|
||||
|
||||
// Conversion
|
||||
- (BOOL) canBeConvertedToUnit: (NSUnit *)unit
|
||||
{
|
||||
return NO;
|
||||
}
|
||||
|
||||
- (NSMeasurement *)measurementByConvertingToUnit:(NSUnit *)unit
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
|
||||
// Operating
|
||||
- (NSMeasurement *)measurementByAddingMeasurement:(NSMeasurement *)measurement
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (NSMeasurement *)measurementBySubtractingMeasurement:(NSMeasurement *)measurement
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
@end
|
||||
|
||||
|
|
Loading…
Reference in a new issue