2023-12-23 01:44:50 +00:00
|
|
|
/** Definition of class NSUnit
|
2019-09-30 19:59:50 +00:00
|
|
|
Copyright (C) 2019 Free Software Foundation, Inc.
|
2024-11-16 12:06:27 +00:00
|
|
|
|
2019-10-24 18:18:47 +00:00
|
|
|
By: Gregory John Casamento <greg.casamento@gmail.com>
|
2019-09-30 19:59:50 +00:00
|
|
|
Date: Mon Sep 30 15:58:21 EDT 2019
|
|
|
|
|
|
|
|
This file is part of the GNUstep Library.
|
2024-11-16 12:06:27 +00:00
|
|
|
|
2019-09-30 19:59:50 +00:00
|
|
|
This library is free software; you can redistribute it and/or
|
|
|
|
modify it under the terms of the GNU Lesser General Public
|
|
|
|
License as published by the Free Software Foundation; either
|
|
|
|
version 2 of the License, or (at your option) any later version.
|
2024-11-16 12:06:27 +00:00
|
|
|
|
2019-09-30 19:59:50 +00:00
|
|
|
This library is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
2019-12-09 23:36:00 +00:00
|
|
|
Lesser General Public License for more details.
|
2024-11-16 12:06:27 +00:00
|
|
|
|
2019-09-30 19:59:50 +00:00
|
|
|
You should have received a copy of the GNU Lesser General Public
|
|
|
|
License along with this library; if not, write to the Free
|
2024-11-07 13:37:59 +00:00
|
|
|
Software Foundation, Inc., 31 Milk Street #960789 Boston, MA 02196 USA.
|
2019-09-30 19:59:50 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _NSUnit_h_GNUSTEP_BASE_INCLUDE
|
|
|
|
#define _NSUnit_h_GNUSTEP_BASE_INCLUDE
|
|
|
|
|
2019-10-29 17:09:37 +00:00
|
|
|
#import <Foundation/NSObject.h>
|
|
|
|
|
|
|
|
#if OS_API_VERSION(MAC_OS_X_VERSION_10_12, GS_API_LATEST)
|
2019-09-30 19:59:50 +00:00
|
|
|
|
|
|
|
#if defined(__cplusplus)
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2024-11-16 11:50:58 +00:00
|
|
|
/**
|
2024-11-17 11:33:14 +00:00
|
|
|
* Unit converter. This is an abstract class.
|
2024-11-16 11:50:58 +00:00
|
|
|
*/
|
2021-01-18 13:20:14 +00:00
|
|
|
GS_EXPORT_CLASS
|
2019-10-02 04:57:17 +00:00
|
|
|
@interface NSUnitConverter : NSObject
|
2024-11-17 11:33:14 +00:00
|
|
|
/**
|
|
|
|
* For a given unit, returns the specified value of that unit based on the units dimension.
|
|
|
|
*/
|
2019-10-24 22:16:59 +00:00
|
|
|
- (double) baseUnitValueFromValue: (double)value;
|
2024-11-17 11:33:14 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* For a unit, returns the specified value of the base unit in terms of that unit.
|
|
|
|
*/
|
2019-10-24 22:16:59 +00:00
|
|
|
- (double) valueFromBaseUnitValue: (double)baseUnitValue;
|
2019-10-02 04:57:17 +00:00
|
|
|
@end
|
|
|
|
|
2024-11-16 11:50:58 +00:00
|
|
|
/**
|
|
|
|
* Linear converter... for things like C to F conversion...
|
|
|
|
*/
|
2021-01-18 13:20:14 +00:00
|
|
|
GS_EXPORT_CLASS
|
2019-10-02 06:05:18 +00:00
|
|
|
@interface NSUnitConverterLinear : NSUnitConverter <NSCoding>
|
|
|
|
{
|
|
|
|
double _coefficient;
|
|
|
|
double _constant;
|
|
|
|
}
|
2024-11-17 11:33:14 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Initialize with the coefficient.
|
|
|
|
*/
|
2019-10-02 06:05:18 +00:00
|
|
|
- (instancetype) initWithCoefficient: (double)coefficient;
|
2024-11-17 11:33:14 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Initialize with the coefficient and constant.
|
|
|
|
*/
|
2019-10-02 06:05:18 +00:00
|
|
|
- (instancetype) initWithCoefficient: (double)coefficient
|
2024-11-16 12:06:27 +00:00
|
|
|
constant: (double)constant;
|
2024-11-17 11:33:14 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Return the coefficient.
|
|
|
|
*/
|
2019-10-02 06:05:18 +00:00
|
|
|
- (double) coefficient;
|
2024-11-17 11:33:14 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Return the constant.
|
|
|
|
*/
|
2019-10-02 06:05:18 +00:00
|
|
|
- (double) constant;
|
|
|
|
@end
|
|
|
|
|
2024-11-16 11:50:58 +00:00
|
|
|
/**
|
|
|
|
* Units... abstract...
|
|
|
|
*/
|
2021-01-18 13:20:14 +00:00
|
|
|
GS_EXPORT_CLASS
|
2019-10-02 04:24:46 +00:00
|
|
|
@interface NSUnit : NSObject <NSCopying, NSCoding>
|
|
|
|
{
|
|
|
|
NSString *_symbol;
|
|
|
|
}
|
2024-11-17 11:33:14 +00:00
|
|
|
/**
|
|
|
|
* Initialize an NSUnit instance.
|
|
|
|
*/
|
2019-10-24 22:16:59 +00:00
|
|
|
- (instancetype) init;
|
2024-11-17 11:33:14 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Initialize NSUnit with a given symbol.
|
|
|
|
*/
|
2019-10-24 22:16:59 +00:00
|
|
|
- (instancetype) initWithSymbol: (NSString *)symbol;
|
2024-11-17 11:33:14 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The symbol used by a given unit.
|
|
|
|
*/
|
2019-10-02 11:09:32 +00:00
|
|
|
- (NSString *) symbol;
|
2019-09-30 19:59:50 +00:00
|
|
|
|
|
|
|
@end
|
|
|
|
|
2024-11-16 11:50:58 +00:00
|
|
|
/**
|
|
|
|
* Dimension using units....
|
|
|
|
*/
|
2021-01-18 13:20:14 +00:00
|
|
|
GS_EXPORT_CLASS
|
2019-10-02 09:08:37 +00:00
|
|
|
@interface NSDimension : NSUnit <NSCoding>
|
|
|
|
{
|
2019-10-06 03:09:12 +00:00
|
|
|
double _value;
|
2019-10-02 09:08:37 +00:00
|
|
|
NSUnitConverter *_converter;
|
|
|
|
}
|
|
|
|
|
2024-11-17 11:33:14 +00:00
|
|
|
/**
|
|
|
|
* The NSUnitConverter instance used for this NSDimension object.
|
|
|
|
*/
|
2019-10-02 09:08:37 +00:00
|
|
|
- (NSUnitConverter *) converter;
|
2024-11-17 11:33:14 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Initialize with symbol and an NSUnitConverter.
|
|
|
|
*/
|
2019-10-27 22:32:03 +00:00
|
|
|
- (instancetype) initWithSymbol: (NSString *)symbol converter: (NSUnitConverter *)converter;
|
2024-11-17 11:33:14 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Return a base unit.
|
|
|
|
*/
|
2019-10-02 09:08:37 +00:00
|
|
|
+ (instancetype) baseUnit;
|
|
|
|
|
|
|
|
@end
|
2019-10-02 04:24:46 +00:00
|
|
|
|
2019-10-02 09:47:03 +00:00
|
|
|
// Predefined....
|
2024-11-16 11:50:58 +00:00
|
|
|
/**
|
2024-11-17 11:33:14 +00:00
|
|
|
* Units of accelleration. Base unit - metersPerSecondSquared
|
2024-11-16 11:50:58 +00:00
|
|
|
*/
|
2021-01-18 13:20:14 +00:00
|
|
|
GS_EXPORT_CLASS
|
2024-11-16 12:06:27 +00:00
|
|
|
@interface NSUnitAcceleration : NSDimension
|
2019-10-02 09:47:03 +00:00
|
|
|
|
2024-11-17 11:33:14 +00:00
|
|
|
/**
|
|
|
|
* Units of accelleration in meters per second squared.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitAcceleration *) metersPerSecondSquared;
|
2024-11-17 11:33:14 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Units of accelleration equal to the gravitational constant.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitAcceleration *) gravity;
|
2019-10-02 09:47:03 +00:00
|
|
|
|
|
|
|
@end
|
|
|
|
|
2024-11-16 11:50:58 +00:00
|
|
|
/**
|
2024-11-17 11:33:14 +00:00
|
|
|
* Angle units. Base unit - degrees
|
2024-11-16 11:50:58 +00:00
|
|
|
*/
|
2021-01-18 13:20:14 +00:00
|
|
|
GS_EXPORT_CLASS
|
2024-11-16 12:06:27 +00:00
|
|
|
@interface NSUnitAngle : NSDimension
|
2019-10-02 09:47:03 +00:00
|
|
|
|
2024-11-17 11:33:14 +00:00
|
|
|
/**
|
|
|
|
* Units of angle in degrees.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitAngle *) degrees;
|
2024-11-17 11:33:14 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Units of angle in arc minutes.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitAngle *) arcMinutes;
|
2024-11-17 11:33:14 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Units of angle arc seconds.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitAngle *) arcSeconds;
|
2024-11-17 11:33:14 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Units of angle in radians.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitAngle *) radians;
|
2024-11-17 11:33:14 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Units of area in square megameters.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitAngle *) gradians;
|
2024-11-17 11:33:14 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Units of area in square megameters.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitAngle *) revolutions;
|
2019-10-02 09:47:03 +00:00
|
|
|
|
|
|
|
@end
|
|
|
|
|
2024-11-16 11:50:58 +00:00
|
|
|
/**
|
2024-11-17 11:33:14 +00:00
|
|
|
* Units of area. Base unit - squareMeters
|
2024-11-16 11:50:58 +00:00
|
|
|
*/
|
2021-01-18 13:20:14 +00:00
|
|
|
GS_EXPORT_CLASS
|
2024-11-16 12:06:27 +00:00
|
|
|
@interface NSUnitArea : NSDimension
|
2019-10-02 09:47:03 +00:00
|
|
|
|
2024-11-17 11:33:14 +00:00
|
|
|
/**
|
|
|
|
* Units of area in square megameters.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitArea *) squareMegameters;
|
2024-11-17 11:33:14 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Units of area in square kilometers.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitArea *) squareKilometers;
|
2024-11-17 11:33:14 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Units of area in square meters.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitArea *) squareMeters;
|
2024-11-17 11:33:14 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Units of area in square centimeters.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitArea *) squareCentimeters;
|
2024-11-17 11:33:14 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Units of area in square millimeters.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitArea *) squareMillimeters;
|
2024-11-17 11:33:14 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Units of area in square micrometers.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitArea *) squareMicrometers;
|
2024-11-17 11:33:14 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Units of area in square nanometers.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitArea *) squareNanometers;
|
2024-11-17 11:33:14 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Units of area in square inches.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitArea *) squareInches;
|
2024-11-17 11:33:14 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Units of area in square feet.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitArea *) squareFeet;
|
2024-11-17 11:33:14 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Units of area in square yards.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitArea *) squareYards;
|
2024-11-17 11:33:14 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Units of area in square miles.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitArea *) squareMiles;
|
2024-11-17 11:33:14 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Units of area in acres/
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitArea *) acres;
|
2024-11-17 11:33:14 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Units of area in ares.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitArea *) ares;
|
2024-11-17 11:33:14 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Units of area in hectares.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitArea *) hectares;
|
2019-10-02 09:47:03 +00:00
|
|
|
|
|
|
|
@end
|
|
|
|
|
2024-11-16 11:50:58 +00:00
|
|
|
/**
|
2024-11-16 12:06:27 +00:00
|
|
|
* Units of concentration. Base unit - gramsPerLiter.
|
2024-11-16 11:50:58 +00:00
|
|
|
*/
|
2021-01-18 13:20:14 +00:00
|
|
|
GS_EXPORT_CLASS
|
2024-11-16 12:06:27 +00:00
|
|
|
@interface NSUnitConcentrationMass : NSDimension
|
2019-10-02 09:47:03 +00:00
|
|
|
|
2024-11-16 12:06:27 +00:00
|
|
|
/**
|
|
|
|
* Concentration units in grams per liter.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitConcentrationMass *) gramsPerLiter;
|
2024-11-16 12:06:27 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Concentration units in milligrams per deciliter.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitConcentrationMass *) milligramsPerDeciliter;
|
2019-10-02 09:47:03 +00:00
|
|
|
|
2024-11-16 12:06:27 +00:00
|
|
|
/**
|
|
|
|
* Concentration units in grams per mole.
|
|
|
|
*/
|
2019-10-24 22:17:59 +00:00
|
|
|
+ (NSUnitConcentrationMass *) millimolesPerLiterWithGramsPerMole: (double)gramsPerMole;
|
2019-10-02 09:47:03 +00:00
|
|
|
|
|
|
|
@end
|
|
|
|
|
2024-11-16 11:50:58 +00:00
|
|
|
/**
|
|
|
|
* Units of dispersion. Base unit - partsPerMillion
|
|
|
|
*/
|
2021-01-18 13:20:14 +00:00
|
|
|
GS_EXPORT_CLASS
|
2024-11-16 12:06:27 +00:00
|
|
|
@interface NSUnitDispersion : NSDimension
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Units of dispersion in parts per million.
|
2019-10-02 09:47:03 +00:00
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitDispersion *) partsPerMillion;
|
2019-10-02 09:47:03 +00:00
|
|
|
|
|
|
|
@end
|
|
|
|
|
2024-11-16 11:50:58 +00:00
|
|
|
/**
|
|
|
|
* Units of duration. Base unit - seconds
|
|
|
|
*/
|
2021-01-18 13:20:14 +00:00
|
|
|
GS_EXPORT_CLASS
|
2024-11-16 12:06:27 +00:00
|
|
|
@interface NSUnitDuration : NSDimension
|
2019-10-02 09:47:03 +00:00
|
|
|
|
2024-11-16 11:50:58 +00:00
|
|
|
/**
|
2024-11-16 12:06:27 +00:00
|
|
|
* Units of duration in seconds.
|
2024-11-16 11:50:58 +00:00
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitDuration *) seconds;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
2024-11-16 12:06:27 +00:00
|
|
|
* Units of duration in minutes.
|
2024-11-16 11:50:58 +00:00
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitDuration *) minutes;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
2024-11-16 12:06:27 +00:00
|
|
|
* Units of duration in hours.
|
2024-11-16 11:50:58 +00:00
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitDuration *) hours;
|
2019-10-02 09:47:03 +00:00
|
|
|
|
|
|
|
@end
|
|
|
|
|
2024-11-16 11:50:58 +00:00
|
|
|
/**
|
|
|
|
* Units of electric charge. Base unit - coulombs
|
|
|
|
*/
|
2021-01-18 13:20:14 +00:00
|
|
|
GS_EXPORT_CLASS
|
2024-11-16 12:06:27 +00:00
|
|
|
@interface NSUnitElectricCharge : NSDimension
|
2019-10-02 09:47:03 +00:00
|
|
|
|
2024-11-16 11:50:58 +00:00
|
|
|
/**
|
|
|
|
* The units of eletric charge in coulombs.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitElectricCharge *) coulombs;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The units of eletric charge in megaampere hours.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitElectricCharge *) megaampereHours;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The units of eletric charge in kiloampere hours.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitElectricCharge *) kiloampereHours;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The units of eletric charge in ampere hours.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitElectricCharge *) ampereHours;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The units of eletric charge in milliampere hours.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitElectricCharge *) milliampereHours;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The units of eletric charge in microampere hours.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitElectricCharge *) microampereHours;
|
2019-10-02 09:47:03 +00:00
|
|
|
|
|
|
|
@end
|
|
|
|
|
2024-11-16 11:50:58 +00:00
|
|
|
/**
|
|
|
|
* Units of electric current. Base unit - amperes
|
|
|
|
*/
|
2021-01-18 13:20:14 +00:00
|
|
|
GS_EXPORT_CLASS
|
2024-11-16 12:06:27 +00:00
|
|
|
@interface NSUnitElectricCurrent : NSDimension
|
2019-10-02 09:47:03 +00:00
|
|
|
|
2024-11-16 11:50:58 +00:00
|
|
|
/**
|
|
|
|
* The units of eletric current in megaamperes.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitElectricCurrent *) megaamperes;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The units of eletric current in kiloamperes.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitElectricCurrent *) kiloamperes;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The units of eletric current in amperes.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitElectricCurrent *) amperes;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The units of eletric current in milliamperes.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitElectricCurrent *) milliamperes;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The units of eletric current in microamperes.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitElectricCurrent *) microamperes;
|
2019-10-02 09:47:03 +00:00
|
|
|
|
|
|
|
@end
|
|
|
|
|
2024-11-16 11:50:58 +00:00
|
|
|
/**
|
|
|
|
* Units of electric potential. Base unit - volts
|
|
|
|
*/
|
2021-01-18 13:20:14 +00:00
|
|
|
GS_EXPORT_CLASS
|
2024-11-16 12:06:27 +00:00
|
|
|
@interface NSUnitElectricPotentialDifference : NSDimension
|
2019-10-02 09:47:03 +00:00
|
|
|
|
2024-11-16 11:50:58 +00:00
|
|
|
/**
|
|
|
|
* The units of eletric potential in megavolts.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitElectricPotentialDifference *) megavolts;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The units of eletric potential in kilovolts.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitElectricPotentialDifference *) kilovolts;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The units of eletric potential in volts.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitElectricPotentialDifference *) volts;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The units of eletric potential in millivolts.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitElectricPotentialDifference *) millivolts;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The units of eletric potential in microvolts.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitElectricPotentialDifference *) microvolts;
|
2019-10-02 09:47:03 +00:00
|
|
|
|
|
|
|
@end
|
|
|
|
|
2024-11-16 11:50:58 +00:00
|
|
|
/**
|
|
|
|
* Units of electric resistance. Base unit - ohms
|
|
|
|
*/
|
2021-01-18 13:20:14 +00:00
|
|
|
GS_EXPORT_CLASS
|
2024-11-16 12:06:27 +00:00
|
|
|
@interface NSUnitElectricResistance : NSDimension
|
2019-10-02 09:47:03 +00:00
|
|
|
|
2024-11-16 11:50:58 +00:00
|
|
|
/**
|
|
|
|
* The units of eletric resistance in megaohms.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitElectricResistance *) megaohms;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The units of eletric resistance in kiloohms.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitElectricResistance *) kiloohms;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The units of eletric resistance in ohms.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitElectricResistance *) ohms;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The units of eletric resistance in milliohms.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitElectricResistance *) milliohms;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The units of eletric resistance in microohms.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitElectricResistance *) microohms;
|
2019-10-02 09:47:03 +00:00
|
|
|
|
|
|
|
@end
|
|
|
|
|
2024-11-16 11:50:58 +00:00
|
|
|
/**
|
|
|
|
* Units of Energy. Base unit - joules
|
|
|
|
*/
|
2021-01-18 13:20:14 +00:00
|
|
|
GS_EXPORT_CLASS
|
2024-11-16 12:06:27 +00:00
|
|
|
@interface NSUnitEnergy : NSDimension
|
2019-10-02 09:47:03 +00:00
|
|
|
|
2024-11-16 11:50:58 +00:00
|
|
|
/**
|
|
|
|
* The units of energy in kilojoules.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitEnergy *) kilojoules;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The units of energy in joules.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitEnergy *) joules;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The units of energy in kilocalories.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitEnergy *) kilocalories;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The units of energy in calories.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitEnergy *) calories;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The units of energy in kilawatt hours.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitEnergy *) kilowattHours;
|
2019-10-02 09:47:03 +00:00
|
|
|
|
|
|
|
@end
|
|
|
|
|
2024-11-16 11:50:58 +00:00
|
|
|
/**
|
|
|
|
* Units of frequency. Base unit - hertz
|
|
|
|
*/
|
2021-01-18 13:20:14 +00:00
|
|
|
GS_EXPORT_CLASS
|
2024-11-16 12:06:27 +00:00
|
|
|
@interface NSUnitFrequency : NSDimension
|
2019-10-02 09:47:03 +00:00
|
|
|
|
2024-11-16 11:50:58 +00:00
|
|
|
/**
|
|
|
|
* The units of frequency in terahertz.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitFrequency *) terahertz;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The units of frequency in gigahertz.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitFrequency *) gigahertz;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The units of frequency in megahertz.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitFrequency *) megahertz;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The units of frequency in kilohertz.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitFrequency *) kilohertz;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The units of frequency in hertz.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitFrequency *) hertz;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The units of frequency in millihertz.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitFrequency *) millihertz;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The units of frequency in microhertz.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitFrequency *) microhertz;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The units of frequency in nanohertz.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitFrequency *) nanohertz;
|
2019-10-02 09:47:03 +00:00
|
|
|
|
|
|
|
@end
|
|
|
|
|
2024-11-16 11:50:58 +00:00
|
|
|
/**
|
|
|
|
* Units of fuel efficiency. Base unit - litersPer100Kilometers
|
|
|
|
*/
|
2021-01-18 13:20:14 +00:00
|
|
|
GS_EXPORT_CLASS
|
2024-11-16 12:06:27 +00:00
|
|
|
@interface NSUnitFuelEfficiency : NSDimension
|
2019-10-02 09:47:03 +00:00
|
|
|
|
2024-11-16 11:50:58 +00:00
|
|
|
/**
|
|
|
|
* The units of fuel efficiency in liters per 100 kilometers.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitFuelEfficiency *) litersPer100Kilometers;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The units of fuel efficiency in miles per imperial gallon.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitFuelEfficiency *) milesPerImperialGallon;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The units of fuel efficiency in miles per gallon.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitFuelEfficiency *) milesPerGallon;
|
2019-10-02 09:47:03 +00:00
|
|
|
|
|
|
|
@end
|
|
|
|
|
2024-11-16 11:50:58 +00:00
|
|
|
/**
|
|
|
|
* Units of length. Base unit - meters
|
|
|
|
*/
|
2021-01-18 13:20:14 +00:00
|
|
|
GS_EXPORT_CLASS
|
2024-11-16 12:06:27 +00:00
|
|
|
@interface NSUnitLength : NSDimension
|
2019-10-02 09:47:03 +00:00
|
|
|
|
2024-11-16 11:50:58 +00:00
|
|
|
/**
|
|
|
|
* The units of length in megameters.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitLength *) megameters;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The units of length in kilometers.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitLength *) kilometers;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The units of length in hectometers.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitLength *) hectometers;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The units of length in decameters.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitLength *) decameters;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The units of length in meters.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitLength *) meters;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The units of length in decimeters.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitLength *) decimeters;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The units of length in centimeters.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitLength *) centimeters;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The units of length in millimeters.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitLength *) millimeters;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The units of length in micrometers.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitLength *) micrometers;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The units of length in nanometers.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitLength *) nanometers;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The units of length in picometers.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitLength *) picometers;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The units of length in inches.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitLength *) inches;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The units of length in feet.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitLength *) feet;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The units of length in yards.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitLength *) yards;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The units of length in miles.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitLength *) miles;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The units of length in scandanavian miles.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitLength *) scandinavianMiles;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The units of length in light years.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitLength *) lightyears;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The units of length in nautical miles.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitLength *) nauticalMiles;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The units of length in fathoms.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitLength *) fathoms;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The units of length in furlongs.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitLength *) furlongs;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The units of length in astronomical units.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitLength *) astronomicalUnits;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The units of length in parsecs.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitLength *) parsecs;
|
2019-10-02 09:47:03 +00:00
|
|
|
|
|
|
|
@end
|
|
|
|
|
2024-11-16 11:50:58 +00:00
|
|
|
/**
|
|
|
|
* Units of illumination. Base unit - lux
|
|
|
|
*/
|
2021-01-18 13:20:14 +00:00
|
|
|
GS_EXPORT_CLASS
|
2024-11-16 12:06:27 +00:00
|
|
|
@interface NSUnitIlluminance : NSDimension
|
2019-10-02 09:47:03 +00:00
|
|
|
|
2024-11-16 11:50:58 +00:00
|
|
|
/**
|
|
|
|
* The units of illuminance in lux.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitIlluminance *) lux;
|
2019-10-02 09:47:03 +00:00
|
|
|
|
|
|
|
@end
|
|
|
|
|
2024-11-16 11:50:58 +00:00
|
|
|
/**
|
|
|
|
* Units of mass. Base unit - kilograms
|
|
|
|
*/
|
2021-01-18 13:20:14 +00:00
|
|
|
GS_EXPORT_CLASS
|
2024-11-16 12:06:27 +00:00
|
|
|
@interface NSUnitMass : NSDimension
|
2019-10-02 09:47:03 +00:00
|
|
|
|
2024-11-16 11:50:58 +00:00
|
|
|
/**
|
|
|
|
* The mass units in kilograms.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitMass *) kilograms;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The mass units in grams.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitMass *) grams;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The mass units in decigrams.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitMass *) decigrams;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The mass units in centigrams.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitMass *) centigrams;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The mass units in milligrams.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitMass *) milligrams;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The mass units in micrograms.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitMass *) micrograms;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The mass units in nanograms.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitMass *) nanograms;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The mass units in picograms.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitMass *) picograms;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The mass units in ounces.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitMass *) ounces;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The mass units in pounds.
|
|
|
|
*/
|
2019-10-24 21:06:06 +00:00
|
|
|
+ (NSUnitMass *) pounds;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The mass units in stones.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitMass *) stones;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The mass units in metric tons.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitMass *) metricTons;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The mass units in short tons.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitMass *) shortTons;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The mass units in carats.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitMass *) carats;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The mass units in ounces troy.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitMass *) ouncesTroy;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The mass units in slugs.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitMass *) slugs;
|
2019-10-02 09:47:03 +00:00
|
|
|
|
|
|
|
@end
|
|
|
|
|
2024-11-16 11:50:58 +00:00
|
|
|
/**
|
|
|
|
* Used to represent power. Base unit - watts
|
|
|
|
*/
|
2021-01-18 13:20:14 +00:00
|
|
|
GS_EXPORT_CLASS
|
2024-11-16 12:06:27 +00:00
|
|
|
@interface NSUnitPower : NSDimension
|
2019-10-02 09:47:03 +00:00
|
|
|
|
2024-11-16 11:50:58 +00:00
|
|
|
/**
|
|
|
|
* The power units in terawatts.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitPower *) terawatts;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The power units in gigawatts.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitPower *) gigawatts;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The power units in megawatts.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitPower *) megawatts;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The power units in kilowatts.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitPower *) kilowatts;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The power units in watts.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitPower *) watts;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The power units in milliwatts.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitPower *) milliwatts;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The power units in microwatts.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitPower *) microwatts;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The power units in nanowatts.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitPower *) nanowatts;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The power units in picowatts.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitPower *) picowatts;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The power units in femtowatts.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitPower *) femtowatts;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The power units in horsepower.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitPower *) horsepower;
|
2019-10-02 09:47:03 +00:00
|
|
|
|
|
|
|
@end
|
|
|
|
|
2024-11-16 11:50:58 +00:00
|
|
|
/**
|
|
|
|
* Used to represent pressure. Base unit - newtonsPerMetersSquared (equivalent to 1 pascal)
|
|
|
|
*/
|
2021-01-18 13:20:14 +00:00
|
|
|
GS_EXPORT_CLASS
|
2024-11-16 12:06:27 +00:00
|
|
|
@interface NSUnitPressure : NSDimension
|
2019-10-02 09:47:03 +00:00
|
|
|
|
2024-11-16 11:50:58 +00:00
|
|
|
/**
|
|
|
|
* The newtons per meters squared unit of pressure.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitPressure *) newtonsPerMetersSquared;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The gigapascals unit of pressure.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitPressure *) gigapascals;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The megapascals unit of pressure.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitPressure *) megapascals;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The kilopascals unit of pressure.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitPressure *) kilopascals;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The hetcopascals unit of pressure.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitPressure *) hectopascals;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The inches of mercury unit of pressure.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitPressure *) inchesOfMercury;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The bars unit of pressure.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitPressure *) bars;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The millibars unit of pressure.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitPressure *) millibars;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The millimeters of mercury of pressure.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitPressure *) millimetersOfMercury;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The pounds of per square inch of pressure.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitPressure *) poundsForcePerSquareInch;
|
2019-10-02 09:47:03 +00:00
|
|
|
|
|
|
|
@end
|
|
|
|
|
2024-11-16 11:50:58 +00:00
|
|
|
/**
|
|
|
|
* Used to represent speed. Base unit is meters per second.
|
|
|
|
*/
|
2021-01-18 13:20:14 +00:00
|
|
|
GS_EXPORT_CLASS
|
2024-11-16 12:06:27 +00:00
|
|
|
@interface NSUnitSpeed : NSDimension
|
2019-10-02 09:47:03 +00:00
|
|
|
|
2024-11-16 11:50:58 +00:00
|
|
|
/**
|
|
|
|
* The meters per second measurement of speed.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitSpeed *) metersPerSecond;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The kilometers per hour measurement of speed.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitSpeed *) kilometersPerHour;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The miles per hour measurement of speed.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitSpeed *) milesPerHour;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The knots measurement of speed.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitSpeed *) knots;
|
2019-10-02 09:47:03 +00:00
|
|
|
|
|
|
|
@end
|
|
|
|
|
2024-11-16 11:50:58 +00:00
|
|
|
/**
|
|
|
|
* Used to represent temperature quantities.
|
|
|
|
* The base unit of this class is kelvin.
|
|
|
|
*/
|
2021-01-18 13:20:14 +00:00
|
|
|
GS_EXPORT_CLASS
|
2024-11-16 12:06:27 +00:00
|
|
|
@interface NSUnitTemperature : NSDimension
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The kelvin unit of temperature.
|
2019-10-02 09:47:03 +00:00
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitTemperature *) kelvin;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The kelvin unit of celsius.
|
|
|
|
*/
|
2024-11-16 12:06:27 +00:00
|
|
|
+ (NSUnitTemperature *) celsius;
|
2019-10-02 09:47:03 +00:00
|
|
|
|
2024-11-16 11:50:58 +00:00
|
|
|
/**
|
|
|
|
* The kelvin unit of fahenheit.
|
|
|
|
*/
|
|
|
|
+ (NSUnitTemperature *) fahrenheit;
|
2019-10-02 09:47:03 +00:00
|
|
|
|
|
|
|
@end
|
|
|
|
|
2024-11-16 11:50:58 +00:00
|
|
|
/**
|
|
|
|
* Typically this is used to represent specific quantities.
|
|
|
|
* The base unit of this class is liters.
|
|
|
|
*/
|
2021-01-18 13:20:14 +00:00
|
|
|
GS_EXPORT_CLASS
|
2024-11-16 12:06:27 +00:00
|
|
|
@interface NSUnitVolume : NSDimension
|
2019-10-02 09:47:03 +00:00
|
|
|
|
2024-11-16 11:50:58 +00:00
|
|
|
/**
|
|
|
|
* The megaliters unit of volume.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitVolume *) megaliters;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The kiloliters unit of volume.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitVolume *) kiloliters;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The liters unit of volume.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitVolume *) liters;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The deciliters unit of volume.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitVolume *) deciliters;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The centiliters unit of volume.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitVolume *) centiliters;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The milliliters unit of volume.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitVolume *) milliliters;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The cubic kilometers unit of volume.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitVolume *) cubicKilometers;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The cubic meters unit of volume.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitVolume *) cubicMeters;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The cubic decimeters unit of volume.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitVolume *) cubicDecimeters;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The cubic centimeteres unit of volume.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitVolume *) cubicCentimeters;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The cubic millimeters unit of volume.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitVolume *) cubicMillimeters;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The cubic inches unit of volume.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitVolume *) cubicInches;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The cubic feet unit of volume.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitVolume *) cubicFeet;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The cubic yards unit of volume.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitVolume *) cubicYards;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The cubic miles unit of volume.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitVolume *) cubicMiles;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The acre feet unit of volume.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitVolume *) acreFeet;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The bushels unit of volume.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitVolume *) bushels;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The teaspoons unit of volume.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitVolume *) teaspoons;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The tablespoons unit of volume.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitVolume *) tablespoons;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The fluid ounces unit of volume.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitVolume *) fluidOunces;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The cups unit of volume.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitVolume *) cups;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The pints unit of volume.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitVolume *) pints;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The quarts unit of volume.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitVolume *) quarts;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The gallons unit of volume.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitVolume *) gallons;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The imperial teaspoons unit of volume.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitVolume *) imperialTeaspoons;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The imperial tablespoons unit of volume.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitVolume *) imperialTablespoons;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The imperial fluid ounces unit of volume.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitVolume *) imperialFluidOunces;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The imperial pints unit of volume.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitVolume *) imperialPints;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The imperial quarts unit of volume.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitVolume *) imperialQuarts;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The imperial gallons unit of volume.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitVolume *) imperialGallons;
|
2024-11-16 11:50:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The metric cups unit of volume.
|
|
|
|
*/
|
2019-10-06 15:48:21 +00:00
|
|
|
+ (NSUnitVolume *) metricCups;
|
2019-10-02 09:47:03 +00:00
|
|
|
|
|
|
|
@end
|
2019-10-02 04:24:46 +00:00
|
|
|
|
2019-09-30 19:59:50 +00:00
|
|
|
#if defined(__cplusplus)
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* GS_API_MACOSX */
|
|
|
|
|
|
|
|
#endif /* _NSUnit_h_GNUSTEP_BASE_INCLUDE */
|