ObjFW
 All Classes Functions Variables
Instance Methods | Class Methods | List of all members
OFNumber Class Reference

Provides a way to store a number in an object. More...

#import <OFNumber.h>

Inheritance diagram for OFNumber:
OFObject <OFCopying> <OFComparing> <OFSerialization> <OFJSONRepresentation> <OFObject> <OFObject>

Instance Methods

(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.
 
- Instance Methods inherited from OFObject
(id) - init
 Initializes an already allocated object.
 
(OFString *) - className
 Returns the name of the object's class.
 
(OFString *) - description
 Returns a description for the object.
 
(void *) - allocMemoryWithSize:
 Allocates memory and stores it in the object's memory pool.
 
(void *) - allocMemoryWithSize:count:
 Allocates memory for the specified number of items and stores it in the object's memory pool.
 
(void *) - resizeMemory:size:
 Resizes memory in the object's memory pool to the specified size.
 
(void *) - resizeMemory:size:count:
 Resizes memory in the object's memory pool to the specific number of items of the specified size.
 
(void) - freeMemory:
 Frees allocated memory and removes it from the object's memory pool.
 
(void) - dealloc
 Deallocates the object.
 
(void) - performSelector:afterDelay:
 Performs the specified selector after the specified delay.
 
(void) - performSelector:withObject:afterDelay:
 Performs the specified selector with the specified object after the specified delay.
 
(void) - performSelector:withObject:withObject:afterDelay:
 Performs the specified selector with the specified objects after the specified delay.
 
(void) - performSelector:onThread:waitUntilDone:
 Performs the specified selector on the specified thread.
 
(void) - performSelector:onThread:withObject:waitUntilDone:
 Performs the specified selector on the specified thread with the specified object.
 
(void) - performSelector:onThread:withObject:withObject:waitUntilDone:
 Performs the specified selector on the specified thread with the specified objects.
 
(void) - performSelectorOnMainThread:waitUntilDone:
 Performs the specified selector on the main thread.
 
(void) - performSelectorOnMainThread:withObject:waitUntilDone:
 Performs the specified selector on the main thread with the specified object.
 
(void) - performSelectorOnMainThread:withObject:withObject:waitUntilDone:
 Performs the specified selector on the main thread with the specified objects.
 
(void) - performSelector:onThread:afterDelay:
 Performs the specified selector on the specified thread after the specified delay.
 
(void) - performSelector:onThread:withObject:afterDelay:
 Performs the specified selector on the specified thread with the specified object after the specified delay.
 
(void) - performSelector:onThread:withObject:withObject:afterDelay:
 Performs the specified selector on the specified thread with the specified objects after the specified delay.
 
(OFString *) - stringBySerializing
 Creates a string by serializing the receiver.
 
- Instance Methods inherited from <OFObject>
(BOOL) - isKindOfClass:
 Returns a boolean whether the object of the specified kind.
 
(BOOL) - isMemberOfClass:
 Returns a boolean whether the object is a member of the specified class.
 
(BOOL) - respondsToSelector:
 Returns a boolean whether the object responds to the specified selector.
 
(IMP) - methodForSelector:
 Returns the implementation for the specified selector.
 
(const char *) - typeEncodingForSelector:
 Returns the type encoding for the specified selector.
 
(id) - performSelector:
 Performs the specified selector.
 
(id) - performSelector:withObject:
 Performs the specified selector with the specified object.
 
(id) - performSelector:withObject:withObject:
 Performs the specified selector with the specified objects.
 
(BOOL) - isEqual:
 Checks two objects for equality.
 
(uint32_t) - hash
 Calculates a hash for the object.
 
(id) - retain
 Increases the retain count.
 
(unsigned int) - retainCount
 Returns the retain count.
 
(void) - release
 Decreases the retain count.
 
(id) - autorelease
 Adds the object to the topmost OFAutoreleasePool of the thread's autorelease pool stack.
 
(id) - self
 Returns the receiver.
 
(BOOL) - isProxy
 Returns whether the object is a proxy object.
 
- Instance Methods inherited from <OFCopying>
(id) - copy
 Copies the object.
 
- Instance Methods inherited from <OFComparing>
(of_comparison_result_t) - compare:
 Compares the object with another object.
 
- Instance Methods inherited from <OFSerialization>
(id) - initWithSerialization:
 Initializes the object with the specified XML element serialization.
 
(OFXMLElement *) - XMLElementBySerializing
 Serializes the object into an XML element.
 
- Instance Methods inherited from <OFJSONRepresentation>
(OFString *) - JSONRepresentation
 Returns the JSON representation of the object as a string.
 

Class Methods

(instancetype) + numberWithBool:
 Creates a new OFNumber with the specified BOOL.
 
(instancetype) + numberWithChar:
 Creates a new OFNumber with the specified signed char.
 
(instancetype) + numberWithShort:
 Creates a new OFNumber with the specified signed short.
 
(instancetype) + numberWithInt:
 Creates a new OFNumber with the specified signed int.
 
(instancetype) + numberWithLong:
 Creates a new OFNumber with the specified signed long.
 
(instancetype) + numberWithUnsignedChar:
 Creates a new OFNumber with the specified unsigned char.
 
(instancetype) + numberWithUnsignedShort:
 Creates a new OFNumber with the specified unsigned short.
 
(instancetype) + numberWithUnsignedInt:
 Creates a new OFNumber with the specified unsigned int.
 
(instancetype) + numberWithUnsignedLong:
 Creates a new OFNumber with the specified unsigned long.
 
(instancetype) + numberWithInt8:
 Creates a new OFNumber with the specified int8_t.
 
(instancetype) + numberWithInt16:
 Creates a new OFNumber with the specified int16_t.
 
(instancetype) + numberWithInt32:
 Creates a new OFNumber with the specified int32_t.
 
(instancetype) + numberWithInt64:
 Creates a new OFNumber with the specified int64_t.
 
(instancetype) + numberWithUInt8:
 Creates a new OFNumber with the specified uint8_t.
 
(instancetype) + numberWithUInt16:
 Creates a new OFNumber with the specified uint16_t.
 
(instancetype) + numberWithUInt32:
 Creates a new OFNumber with the specified uint32_t.
 
(instancetype) + numberWithUInt64:
 Creates a new OFNumber with the specified uint64_t.
 
(instancetype) + numberWithSize:
 Creates a new OFNumber with the specified size_t.
 
(instancetype) + numberWithSSize:
 Creates a new OFNumber with the specified ssize_t.
 
(instancetype) + numberWithIntMax:
 Creates a new OFNumber with the specified intmax_t.
 
(instancetype) + numberWithUIntMax:
 Creates a new OFNumber with the specified uintmax_t.
 
(instancetype) + numberWithPtrDiff:
 Creates a new OFNumber with the specified ptrdiff_t.
 
(instancetype) + numberWithIntPtr:
 Creates a new OFNumber with the specified intptr_t.
 
(instancetype) + numberWithUIntPtr:
 Creates a new OFNumber with the specified uintptr_t.
 
(instancetype) + numberWithFloat:
 Creates a new OFNumber with the specified float.
 
(instancetype) + numberWithDouble:
 Creates a new OFNumber with the specified double.
 
- Class Methods inherited from OFObject
(void) + load
 A method which is called once when the class is loaded into the runtime.
 
(void) + initialize
 A method which is called the moment before the first call to the class is being made.
 
(id) + alloc
 Allocates memory for an instance of the class and sets up the memory pool for the object.
 
(id) + new
 Allocates memory for a new instance and calls -[init] on it.
 
(Class) + class
 Returns the class.
 
(OFString *) + className
 Returns the name of the class as a string.
 
(BOOL) + isSubclassOfClass:
 Returns a boolean whether the class is a subclass of the specified class.
 
(Class) + superclass
 Returns the superclass of the class.
 
(BOOL) + instancesRespondToSelector:
 Checks whether instances of the class respond to a given selector.
 
(BOOL) + conformsToProtocol:
 Checks whether the class conforms to a given protocol.
 
(IMP) + instanceMethodForSelector:
 Returns the implementation of the instance method for the specified selector.
 
(const char *) + typeEncodingForInstanceSelector:
 Returns the type encoding of the instance method for the specified selector.
 
(OFString *) + description
 Returns a description for the class, which is usually the class name.
 
(IMP) + replaceClassMethod:withMethodFromClass:
 Replaces a class method with a class method from another class.
 
(IMP) + replaceInstanceMethod:withMethodFromClass:
 Replaces an instance method with an instance method from another class.
 
(IMP) + replaceClassMethod:withImplementation:typeEncoding:
 Replaces or adds a class method.
 
(IMP) + replaceInstanceMethod:withImplementation:typeEncoding:
 Replaces or adds an instance method.
 
(void) + inheritMethodsFromClass:
 Adds all methods from the specified class to the class that is the receiver.
 
(BOOL) + resolveClassMethod:
 Try to resolve the specified class method.
 
(BOOL) + resolveInstanceMethod:
 Try to resolve the specified instance method.
 

Additional Inherited Members

- Public Attributes inherited from OFObject
Class isa
 The class of the object.
 

Detailed Description

Provides a way to store a number in an object.

Method Documentation

- (BOOL) boolValue

Returns the OFNumber as a BOOL.

Returns
The OFNumber as a BOOL
- (signed char) charValue

Returns the OFNumber as a signed char.

Returns
The OFNumber as a signed char
- (double) doubleValue

Returns the OFNumber as a double.

Returns
The OFNumber as a double
- (float) floatValue

Returns the OFNumber as a float.

Returns
The OFNumber as a float
- (id) initWithBool: (BOOL)  bool_

Initializes an already allocated OFNumber with the specified BOOL.

Parameters
bool_A BOOL which the OFNumber should contain
Returns
An initialized OFNumber
- (id) initWithChar: (signed char)  char_

Initializes an already allocated OFNumber with the specified signed char.

Parameters
char_A signed char which the OFNumber should contain
Returns
An initialized OFNumber
- (id) initWithDouble: (double)  double_

Initializes an already allocated OFNumber with the specified double.

Parameters
double_A double which the OFNumber should contain
Returns
An initialized OFNumber
- (id) initWithFloat: (float)  float_

Initializes an already allocated OFNumber with the specified float.

Parameters
float_A float which the OFNumber should contain
Returns
An initialized OFNumber
- (id) initWithInt16: (int16_t)  int16

Initializes an already allocated OFNumber with the specified int16_t.

Parameters
int16An int16_t which the OFNumber should contain
Returns
An initialized OFNumber
- (id) initWithInt32: (int32_t)  int32

Initializes an already allocated OFNumber with the specified int32_t.

Parameters
int32An int32_t which the OFNumber should contain
Returns
An initialized OFNumber
- (id) initWithInt64: (int64_t)  int64

Initializes an already allocated OFNumber with the specified int64_t.

Parameters
int64An int64_t which the OFNumber should contain
Returns
An initialized OFNumber
- (id) initWithInt8: (int8_t)  int8

Initializes an already allocated OFNumber with the specified int8_t.

Parameters
int8An int8_t which the OFNumber should contain
Returns
An initialized OFNumber
- (id) initWithInt: (signed int)  int_

Initializes an already allocated OFNumber with the specified signed int.

Parameters
int_A signed int which the OFNumber should contain
Returns
An initialized OFNumber
- (id) initWithIntMax: (intmax_t)  intmax

Initializes an already allocated OFNumber with the specified intmax_t.

Parameters
intmaxAn intmax_t which the OFNumber should contain
Returns
An initialized OFNumber
- (id) initWithIntPtr: (intptr_t)  intptr

Initializes an already allocated OFNumber with the specified intptr_t.

Parameters
intptrAn intptr_t which the OFNumber should contain
Returns
An initialized OFNumber
- (id) initWithLong: (signed long)  long_

Initializes an already allocated OFNumber with the specified signed long.

Parameters
long_A signed long which the OFNumber should contain
Returns
An initialized OFNumber
- (id) initWithPtrDiff: (ptrdiff_t)  ptrdiff

Initializes an already allocated OFNumber with the specified ptrdiff_t.

Parameters
ptrdiffA ptrdiff_t which the OFNumber should contain
Returns
An initialized OFNumber
- (id) initWithShort: (signed short)  short_

Initializes an already allocated OFNumber with the specified signed short.

Parameters
short_A signed short which the OFNumber should contain
Returns
An initialized OFNumber
- (id) initWithSize: (size_t)  size

Initializes an already allocated OFNumber with the specified size_t.

Parameters
sizeA size_t which the OFNumber should contain
Returns
An initialized OFNumber
- (id) initWithSSize: (ssize_t)  ssize

Initializes an already allocated OFNumber with the specified ssize_t.

Parameters
ssizeAn ssize_t which the OFNumber should contain
Returns
An initialized OFNumber
- (id) initWithUInt16: (uint16_t)  uint16

Initializes an already allocated OFNumber with the specified uint16_t.

Parameters
uint16A uint16_t which the OFNumber should contain
Returns
An initialized OFNumber
- (id) initWithUInt32: (uint32_t)  uint32

Initializes an already allocated OFNumber with the specified uint32_t.

Parameters
uint32A uint32_t which the OFNumber should contain
Returns
An initialized OFNumber
- (id) initWithUInt64: (uint64_t)  uint64

Initializes an already allocated OFNumber with the specified uint64_t.

Parameters
uint64A uint64_t which the OFNumber should contain
Returns
An initialized OFNumber
- (id) initWithUInt8: (uint8_t)  uint8

Initializes an already allocated OFNumber with the specified uint8_t.

Parameters
uint8A uint8_t which the OFNumber should contain
Returns
An initialized OFNumber
- (id) initWithUIntMax: (uintmax_t)  uintmax

Initializes an already allocated OFNumber with the specified uintmax_t.

Parameters
uintmaxA uintmax_t which the OFNumber should contain
Returns
An initialized OFNumber
- (id) initWithUIntPtr: (uintptr_t)  uintptr

Initializes an already allocated OFNumber with the specified uintptr_t.

Parameters
uintptrA uintptr_t which the OFNumber should contain
Returns
An initialized OFNumber
- (id) initWithUnsignedChar: (unsigned char)  uchar

Initializes an already allocated OFNumber with the specified unsigned char.

Parameters
ucharAn unsigned char which the OFNumber should contain
Returns
An initialized OFNumber
- (id) initWithUnsignedInt: (unsigned int)  uint

Initializes an already allocated OFNumber with the specified unsigned int.

Parameters
uintAn unsigned int which the OFNumber should contain
Returns
An initialized OFNumber
- (id) initWithUnsignedLong: (unsigned long)  ulong

Initializes an already allocated OFNumber with the specified unsigned long.

Parameters
ulongAn unsigned long which the OFNumber should contain
Returns
An initialized OFNumber
- (id) initWithUnsignedShort: (unsigned short)  ushort

Initializes an already allocated OFNumber with the specified unsigned short.

Parameters
ushortAn unsigned short which the OFNumber should contain
Returns
An initialized OFNumber
- (int16_t) int16Value

Returns the OFNumber as an int16_t.

Returns
The OFNumber as an int16_t
- (int32_t) int32Value

Returns the OFNumber as an int32_t.

Returns
The OFNumber as an int32_t
- (int64_t) int64Value

Returns the OFNumber as an int64_t.

Returns
The OFNumber as an int64_t
- (int8_t) int8Value

Returns the OFNumber as an int8_t.

Returns
The OFNumber as an int8_t
- (intmax_t) intMaxValue

Returns the OFNumber as an intmax_t.

Returns
The OFNumber as an intmax_t
- (intptr_t) intPtrValue

Returns the OFNumber as an intptr_t.

Returns
The OFNumber as an intptr_t
- (signed int) intValue

Returns the OFNumber as a signed int.

Returns
The OFNumber as an int
- (signed long) longValue

Returns the OFNumber as a signed long.

Returns
The OFNumber as a long
- (OFNumber *) numberByAddingNumber: (OFNumber*)  num

Creates a new OFNumber by adding the specified number.

Parameters
numThe OFNumber to add
Returns
A new autoreleased OFNumber added with the specified OFNumber
- (OFNumber *) numberByANDingWithNumber: (OFNumber*)  num

Creates a new OFNumber by ANDing with the specified number.

Does not work with floating point types!

Parameters
numThe number to AND with.
Returns
A new autoreleased OFNumber ANDed with the specified OFNumber
- (OFNumber *) numberByDecreasing

Creates a new OFNumber by with the same value decreased by one.

Returns
A new autoreleased OFNumber with the value decreased by one.
- (OFNumber *) numberByDividingWithNumber: (OFNumber*)  num

Creates a new OFNumber by dividing with with the specified number.

Parameters
numThe OFNumber to divide by
Returns
A new autoreleased OFNumber devided by the specified OFNumber
- (OFNumber *) numberByIncreasing

Creates a new OFNumber by with the same value increased by one.

Returns
A new autoreleased OFNumber with the value increased by one.
- (OFNumber *) numberByMultiplyingWithNumber: (OFNumber*)  num

Creates a new OFNumber by multiplying with the specified number.

Parameters
numThe OFNumber to multiply with
Returns
A new autoreleased OFNumber multiplied with the specified OFNumber
- (OFNumber *) numberByORingWithNumber: (OFNumber*)  num

Creates a new OFNumber by ORing with the specified number.

Does not work with floating point types!

Parameters
numThe number to OR with.
Returns
A new autoreleased OFNumber ORed with the specified OFNumber
- (OFNumber *) numberByShiftingLeftWithNumber: (OFNumber*)  num

Creates a new OFNumber by shifting to the left by the specified number of bits.

Does not work with floating point types!

Parameters
numThe number of bits to shift to the left
Returns
A new autoreleased OFNumber bitshifted to the left with the specified OFNumber
- (OFNumber *) numberByShiftingRightWithNumber: (OFNumber*)  num

Creates a new OFNumber by shifting to the right by the specified number of bits.

Does not work with floating point types!

Parameters
numThe number of bits to shift to the right
Returns
A new autoreleased OFNumber bitshifted to the right with the specified OFNumber
- (OFNumber *) numberBySubtractingNumber: (OFNumber*)  num

Creates a new OFNumber by subtracting the specified number.

Parameters
numThe OFNumber to substract
Returns
A new autoreleased OFNumber subtracted by the specified OFNumber
- (OFNumber *) numberByXORingWithNumber: (OFNumber*)  num

Creates a new OFNumber by XORing with the specified number.

Does not work with floating point types!

Parameters
numThe number to XOR with.
Returns
A new autoreleased OFNumber XORed with the specified OFNumber
+ (instancetype) numberWithBool: (BOOL)  bool_

Creates a new OFNumber with the specified BOOL.

Parameters
bool_A BOOL which the OFNumber should contain
Returns
A new autoreleased OFNumber
+ (instancetype) numberWithChar: (signed char)  char_

Creates a new OFNumber with the specified signed char.

Parameters
char_A signed char which the OFNumber should contain
Returns
A new autoreleased OFNumber
+ (instancetype) numberWithDouble: (double)  double_

Creates a new OFNumber with the specified double.

Parameters
double_A double which the OFNumber should contain
Returns
A new autoreleased OFNumber
+ (instancetype) numberWithFloat: (float)  float_

Creates a new OFNumber with the specified float.

Parameters
float_A float which the OFNumber should contain
Returns
A new autoreleased OFNumber
+ (instancetype) numberWithInt16: (int16_t)  int16

Creates a new OFNumber with the specified int16_t.

Parameters
int16An int16_t which the OFNumber should contain
Returns
A new autoreleased OFNumber
+ (instancetype) numberWithInt32: (int32_t)  int32

Creates a new OFNumber with the specified int32_t.

Parameters
int32An int32_t which the OFNumber should contain
Returns
A new autoreleased OFNumber
+ (instancetype) numberWithInt64: (int64_t)  int64

Creates a new OFNumber with the specified int64_t.

Parameters
int64An int64_t which the OFNumber should contain
Returns
A new autoreleased OFNumber
+ (instancetype) numberWithInt8: (int8_t)  int8

Creates a new OFNumber with the specified int8_t.

Parameters
int8An int8_t which the OFNumber should contain
Returns
A new autoreleased OFNumber
+ (instancetype) numberWithInt: (signed int)  int_

Creates a new OFNumber with the specified signed int.

Parameters
int_A signed int which the OFNumber should contain
Returns
A new autoreleased OFNumber
+ (instancetype) numberWithIntMax: (intmax_t)  intmax

Creates a new OFNumber with the specified intmax_t.

Parameters
intmaxAn intmax_t which the OFNumber should contain
Returns
A new autoreleased OFNumber
+ (instancetype) numberWithIntPtr: (intptr_t)  intptr

Creates a new OFNumber with the specified intptr_t.

Parameters
intptrAn intptr_t which the OFNumber should contain
Returns
A new autoreleased OFNumber
+ (instancetype) numberWithLong: (signed long)  long_

Creates a new OFNumber with the specified signed long.

Parameters
long_A signed long which the OFNumber should contain
Returns
A new autoreleased OFNumber
+ (instancetype) numberWithPtrDiff: (ptrdiff_t)  ptrdiff

Creates a new OFNumber with the specified ptrdiff_t.

Parameters
ptrdiffA ptrdiff_t which the OFNumber should contain
Returns
A new autoreleased OFNumber
+ (instancetype) numberWithShort: (signed short)  short_

Creates a new OFNumber with the specified signed short.

Parameters
short_A signed short which the OFNumber should contain
Returns
A new autoreleased OFNumber
+ (instancetype) numberWithSize: (size_t)  size

Creates a new OFNumber with the specified size_t.

Parameters
sizeA size_t which the OFNumber should contain
Returns
A new autoreleased OFNumber
+ (instancetype) numberWithSSize: (ssize_t)  ssize

Creates a new OFNumber with the specified ssize_t.

Parameters
ssizeAn ssize_t which the OFNumber should contain
Returns
A new autoreleased OFNumber
+ (instancetype) numberWithUInt16: (uint16_t)  uint16

Creates a new OFNumber with the specified uint16_t.

Parameters
uint16A uint16_t which the OFNumber should contain
Returns
A new autoreleased OFNumber
+ (instancetype) numberWithUInt32: (uint32_t)  uint32

Creates a new OFNumber with the specified uint32_t.

Parameters
uint32A uint32_t which the OFNumber should contain
Returns
A new autoreleased OFNumber
+ (instancetype) numberWithUInt64: (uint64_t)  uint64

Creates a new OFNumber with the specified uint64_t.

Parameters
uint64A uint64_t which the OFNumber should contain
Returns
A new autoreleased OFNumber
+ (instancetype) numberWithUInt8: (uint8_t)  uint8

Creates a new OFNumber with the specified uint8_t.

Parameters
uint8A uint8_t which the OFNumber should contain
Returns
A new autoreleased OFNumber
+ (instancetype) numberWithUIntMax: (uintmax_t)  uintmax

Creates a new OFNumber with the specified uintmax_t.

Parameters
uintmaxA uintmax_t which the OFNumber should contain
Returns
A new autoreleased OFNumber
+ (instancetype) numberWithUIntPtr: (uintptr_t)  uintptr

Creates a new OFNumber with the specified uintptr_t.

Parameters
uintptrA uintptr_t which the OFNumber should contain
Returns
A new autoreleased OFNumber
+ (instancetype) numberWithUnsignedChar: (unsigned char)  uchar

Creates a new OFNumber with the specified unsigned char.

Parameters
ucharAn unsigned char which the OFNumber should contain
Returns
A new autoreleased OFNumber
+ (instancetype) numberWithUnsignedInt: (unsigned int)  uint

Creates a new OFNumber with the specified unsigned int.

Parameters
uintAn unsigned int which the OFNumber should contain
Returns
A new autoreleased OFNumber
+ (instancetype) numberWithUnsignedLong: (unsigned long)  ulong

Creates a new OFNumber with the specified unsigned long.

Parameters
ulongAn unsigned long which the OFNumber should contain
Returns
A new autoreleased OFNumber
+ (instancetype) numberWithUnsignedShort: (unsigned short)  ushort

Creates a new OFNumber with the specified unsigned short.

Parameters
ushortAn unsigned short which the OFNumber should contain
Returns
A new autoreleased OFNumber
- (ptrdiff_t) ptrDiffValue

Returns the OFNumber as a ptrdiff_t.

Returns
The OFNumber as a ptrdiff_t
- (OFNumber *) remainderOfDivisionWithNumber: (OFNumber*)  num

Creates a new OFNumber with the remainder of a division with the specified number.

Parameters
numThe number to divide by
Returns
The remainder of a division by the specified number
- (signed short) shortValue

Returns the OFNumber as a signed short.

Returns
The OFNumber as a short
- (size_t) sizeValue

Returns the OFNumber as a size_t.

Returns
The OFNumber as a size_t
- (ssize_t) sSizeValue

Returns the OFNumber as an ssize_t.

Returns
The OFNumber as an ssize_t
- (of_number_type_t) type

Returns the type of the number.

Returns
An of_number_type_t indicating the type of the number
- (uint16_t) uInt16Value

Returns the OFNumber as a uint16_t.

Returns
The OFNumber as a uint16_t
- (uint32_t) uInt32Value

Returns the OFNumber as a uint32_t.

Returns
The OFNumber as a uint32_t
- (uint64_t) uInt64Value

Returns the OFNumber as a uint64_t.

Returns
The OFNumber as a uint64_t
- (uint8_t) uInt8Value

Returns the OFNumber as a uint8_t.

Returns
The OFNumber as a uint8_t
- (uintmax_t) uIntMaxValue

Returns the OFNumber as a uintmax_t.

Returns
The OFNumber as a uintmax_t
- (uintptr_t) uIntPtrValue

Returns the OFNumber as a uintptr_t.

Returns
The OFNumber as a uintptr_t
- (unsigned char) unsignedCharValue

Returns the OFNumber as an unsigned char.

Returns
The OFNumber as an unsigned char
- (unsigned int) unsignedIntValue

Returns the OFNumber as an unsigned int.

Returns
The OFNumber as an unsigned int
- (unsigned long) unsignedLongValue

Returns the OFNumber as an unsigned long.

Returns
The OFNumber as an unsigned long
- (unsigned short) unsignedShortValue

Returns the OFNumber as an unsigned short.

Returns
The OFNumber as an unsigned short

The documentation for this class was generated from the following files: