ObjFW
|
Provides a way to store a number in an object. More...
#import <OFNumber.h>
Public Member Functions | |
(id) | - initWithBool: |
Initializes an already allocated OFNumber with the specified BOOL. | |
(id) | - initWithChar: |
Initializes an already allocated OFNumber with the specified signed char. | |
(id) | - initWithShort: |
Initializes an already allocated OFNumber with the specified signed short. | |
(id) | - initWithInt: |
Initializes an already allocated OFNumber with the specified signed int. | |
(id) | - initWithLong: |
Initializes an already allocated OFNumber with the specified signed long. | |
(id) | - initWithUnsignedChar: |
Initializes an already allocated OFNumber with the specified unsigned char. | |
(id) | - initWithUnsignedShort: |
Initializes an already allocated OFNumber with the specified unsigned short. | |
(id) | - initWithUnsignedInt: |
Initializes an already allocated OFNumber with the specified unsigned int. | |
(id) | - initWithUnsignedLong: |
Initializes an already allocated OFNumber with the specified unsigned long. | |
(id) | - initWithInt8: |
Initializes an already allocated OFNumber with the specified int8_t. | |
(id) | - initWithInt16: |
Initializes an already allocated OFNumber with the specified int16_t. | |
(id) | - initWithInt32: |
Initializes an already allocated OFNumber with the specified int32_t. | |
(id) | - initWithInt64: |
Initializes an already allocated OFNumber with the specified int64_t. | |
(id) | - initWithUInt8: |
Initializes an already allocated OFNumber with the specified uint8_t. | |
(id) | - initWithUInt16: |
Initializes an already allocated OFNumber with the specified uint16_t. | |
(id) | - initWithUInt32: |
Initializes an already allocated OFNumber with the specified uint32_t. | |
(id) | - initWithUInt64: |
Initializes an already allocated OFNumber with the specified uint64_t. | |
(id) | - initWithSize: |
Initializes an already allocated OFNumber with the specified size_t. | |
(id) | - initWithSSize: |
Initializes an already allocated OFNumber with the specified ssize_t. | |
(id) | - initWithIntMax: |
Initializes an already allocated OFNumber with the specified intmax_t. | |
(id) | - initWithUIntMax: |
Initializes an already allocated OFNumber with the specified uintmax_t. | |
(id) | - initWithPtrDiff: |
Initializes an already allocated OFNumber with the specified ptrdiff_t. | |
(id) | - initWithIntPtr: |
Initializes an already allocated OFNumber with the specified intptr_t. | |
(id) | - initWithUIntPtr: |
Initializes an already allocated OFNumber with the specified uintptr_t. | |
(id) | - initWithFloat: |
Initializes an already allocated OFNumber with the specified float. | |
(id) | - initWithDouble: |
Initializes an already allocated OFNumber with the specified double. | |
(of_number_type_t) | - type |
Returns the type of the number. | |
(BOOL) | - boolValue |
Returns the OFNumber as a BOOL. | |
(signed char) | - charValue |
Returns the OFNumber as a signed char. | |
(signed short) | - shortValue |
Returns the OFNumber as a signed short. | |
(signed int) | - intValue |
Returns the OFNumber as a signed int. | |
(signed long) | - longValue |
Returns the OFNumber as a signed long. | |
(unsigned char) | - unsignedCharValue |
Returns the OFNumber as an unsigned char. | |
(unsigned short) | - unsignedShortValue |
Returns the OFNumber as an unsigned short. | |
(unsigned int) | - unsignedIntValue |
Returns the OFNumber as an unsigned int. | |
(unsigned long) | - unsignedLongValue |
Returns the OFNumber as an unsigned long. | |
(int8_t) | - int8Value |
Returns the OFNumber as an int8_t. | |
(int16_t) | - int16Value |
Returns the OFNumber as an int16_t. | |
(int32_t) | - int32Value |
Returns the OFNumber as an int32_t. | |
(int64_t) | - int64Value |
Returns the OFNumber as an int64_t. | |
(uint8_t) | - uInt8Value |
Returns the OFNumber as a uint8_t. | |
(uint16_t) | - uInt16Value |
Returns the OFNumber as a uint16_t. | |
(uint32_t) | - uInt32Value |
Returns the OFNumber as a uint32_t. | |
(uint64_t) | - uInt64Value |
Returns the OFNumber as a uint64_t. | |
(size_t) | - sizeValue |
Returns the OFNumber as a size_t. | |
(ssize_t) | - sSizeValue |
Returns the OFNumber as an ssize_t. | |
(intmax_t) | - intMaxValue |
Returns the OFNumber as an intmax_t. | |
(uintmax_t) | - uIntMaxValue |
Returns the OFNumber as a uintmax_t. | |
(ptrdiff_t) | - ptrDiffValue |
Returns the OFNumber as a ptrdiff_t. | |
(intptr_t) | - intPtrValue |
Returns the OFNumber as an intptr_t. | |
(uintptr_t) | - uIntPtrValue |
Returns the OFNumber as a uintptr_t. | |
(float) | - floatValue |
Returns the OFNumber as a float. | |
(double) | - doubleValue |
Returns the OFNumber as a double. | |
(OFNumber *) | - numberByAddingNumber: |
Creates a new OFNumber by adding the specified number. | |
(OFNumber *) | - numberBySubtractingNumber: |
Creates a new OFNumber by subtracting the specified number. | |
(OFNumber *) | - numberByMultiplyingWithNumber: |
Creates a new OFNumber by multiplying with the specified number. | |
(OFNumber *) | - numberByDividingWithNumber: |
Creates a new OFNumber by dividing with with the specified number. | |
(OFNumber *) | - numberByANDingWithNumber: |
Creates a new OFNumber by ANDing with the specified number. | |
(OFNumber *) | - numberByORingWithNumber: |
Creates a new OFNumber by ORing with the specified number. | |
(OFNumber *) | - numberByXORingWithNumber: |
Creates a new OFNumber by XORing with the specified number. | |
(OFNumber *) | - numberByShiftingLeftWithNumber: |
Creates a new OFNumber by shifting to the left by the specified number of bits. | |
(OFNumber *) | - numberByShiftingRightWithNumber: |
Creates a new OFNumber by shifting to the right by the specified number of bits. | |
(OFNumber *) | - numberByIncreasing |
Creates a new OFNumber by with the same value increased by one. | |
(OFNumber *) | - numberByDecreasing |
Creates a new OFNumber by with the same value decreased by one. | |
(OFNumber *) | - remainderOfDivisionWithNumber: |
Creates a new OFNumber with the remainder of a division with the specified number. | |
Static Public Member Functions | |
(id) | + numberWithBool: |
Creates a new OFNumber with the specified BOOL. | |
(id) | + numberWithChar: |
Creates a new OFNumber with the specified signed char. | |
(id) | + numberWithShort: |
Creates a new OFNumber with the specified signed short. | |
(id) | + numberWithInt: |
Creates a new OFNumber with the specified signed int. | |
(id) | + numberWithLong: |
Creates a new OFNumber with the specified signed long. | |
(id) | + numberWithUnsignedChar: |
Creates a new OFNumber with the specified unsigned char. | |
(id) | + numberWithUnsignedShort: |
Creates a new OFNumber with the specified unsigned short. | |
(id) | + numberWithUnsignedInt: |
Creates a new OFNumber with the specified unsigned int. | |
(id) | + numberWithUnsignedLong: |
Creates a new OFNumber with the specified unsigned long. | |
(id) | + numberWithInt8: |
Creates a new OFNumber with the specified int8_t. | |
(id) | + numberWithInt16: |
Creates a new OFNumber with the specified int16_t. | |
(id) | + numberWithInt32: |
Creates a new OFNumber with the specified int32_t. | |
(id) | + numberWithInt64: |
Creates a new OFNumber with the specified int64_t. | |
(id) | + numberWithUInt8: |
Creates a new OFNumber with the specified uint8_t. | |
(id) | + numberWithUInt16: |
Creates a new OFNumber with the specified uint16_t. | |
(id) | + numberWithUInt32: |
Creates a new OFNumber with the specified uint32_t. | |
(id) | + numberWithUInt64: |
Creates a new OFNumber with the specified uint64_t. | |
(id) | + numberWithSize: |
Creates a new OFNumber with the specified size_t. | |
(id) | + numberWithSSize: |
Creates a new OFNumber with the specified ssize_t. | |
(id) | + numberWithIntMax: |
Creates a new OFNumber with the specified intmax_t. | |
(id) | + numberWithUIntMax: |
Creates a new OFNumber with the specified uintmax_t. | |
(id) | + numberWithPtrDiff: |
Creates a new OFNumber with the specified ptrdiff_t. | |
(id) | + numberWithIntPtr: |
Creates a new OFNumber with the specified intptr_t. | |
(id) | + numberWithUIntPtr: |
Creates a new OFNumber with the specified uintptr_t. | |
(id) | + numberWithFloat: |
Creates a new OFNumber with the specified float. | |
(id) | + numberWithDouble: |
Creates a new OFNumber with the specified double. |
Provides a way to store a number in an object.
- (signed char) charValue |
- (id) initWithBool: | (BOOL) | bool_ |
- (id) initWithChar: | (signed char) | char_ |
- (id) initWithDouble: | (double) | double_ |
- (id) initWithFloat: | (float) | float_ |
- (id) initWithInt16: | (int16_t) | int16 |
- (id) initWithInt32: | (int32_t) | int32 |
- (id) initWithInt64: | (int64_t) | int64 |
- (id) initWithInt8: | (int8_t) | int8 |
- (id) initWithInt: | (signed int) | int_ |
- (id) initWithIntMax: | (intmax_t) | intmax |
- (id) initWithIntPtr: | (intptr_t) | intptr |
- (id) initWithLong: | (signed long) | long_ |
- (id) initWithPtrDiff: | (ptrdiff_t) | ptrdiff |
- (id) initWithShort: | (signed short) | short_ |
- (id) initWithSize: | (size_t) | size |
- (id) initWithSSize: | (ssize_t) | ssize |
- (id) initWithUInt16: | (uint16_t) | uint16 |
- (id) initWithUInt32: | (uint32_t) | uint32 |
- (id) initWithUInt64: | (uint64_t) | uint64 |
- (id) initWithUInt8: | (uint8_t) | uint8 |
- (id) initWithUIntMax: | (uintmax_t) | uintmax |
- (id) initWithUIntPtr: | (uintptr_t) | uintptr |
- (id) initWithUnsignedChar: | (unsigned char) | uchar |
- (id) initWithUnsignedInt: | (unsigned int) | uint |
- (id) initWithUnsignedLong: | (unsigned long) | ulong |
- (id) initWithUnsignedShort: | (unsigned short) | ushort |
- (OFNumber *) numberByDecreasing |
- (OFNumber *) numberByIncreasing |
+ (id) numberWithBool: | (BOOL) | bool_ |
+ (id) numberWithChar: | (signed char) | char_ |
+ (id) numberWithDouble: | (double) | double_ |
+ (id) numberWithFloat: | (float) | float_ |
+ (id) numberWithInt16: | (int16_t) | int16 |
+ (id) numberWithInt32: | (int32_t) | int32 |
+ (id) numberWithInt64: | (int64_t) | int64 |
+ (id) numberWithInt8: | (int8_t) | int8 |
+ (id) numberWithInt: | (signed int) | int_ |
+ (id) numberWithIntMax: | (intmax_t) | intmax |
+ (id) numberWithIntPtr: | (intptr_t) | intptr |
+ (id) numberWithLong: | (signed long) | long_ |
+ (id) numberWithPtrDiff: | (ptrdiff_t) | ptrdiff |
+ (id) numberWithShort: | (signed short) | short_ |
+ (id) numberWithSize: | (size_t) | size |
+ (id) numberWithSSize: | (ssize_t) | ssize |
+ (id) numberWithUInt16: | (uint16_t) | uint16 |
+ (id) numberWithUInt32: | (uint32_t) | uint32 |
+ (id) numberWithUInt64: | (uint64_t) | uint64 |
+ (id) numberWithUInt8: | (uint8_t) | uint8 |
+ (id) numberWithUIntMax: | (uintmax_t) | uintmax |
+ (id) numberWithUIntPtr: | (uintptr_t) | uintptr |
+ (id) numberWithUnsignedChar: | (unsigned char) | uchar |
+ (id) numberWithUnsignedInt: | (unsigned int) | uint |
+ (id) numberWithUnsignedLong: | (unsigned long) | ulong |
+ (id) numberWithUnsignedShort: | (unsigned short) | ushort |
Creates a new OFNumber with the remainder of a division with the specified number.
num | The number to divide by |
- (of_number_type_t) type |
Returns the type of the number.
- (unsigned char) unsignedCharValue |
- (unsigned int) unsignedIntValue |
- (unsigned long) unsignedLongValue |
- (unsigned short) unsignedShortValue |