ObjFW
Instance Methods | Class Methods | Properties | List of all members
OFNumber Class Reference

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

#import <ObjFW/OFNumber.h>

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

Instance Methods

(id) - initWithBool:
 Initializes an already allocated OFNumber with the specified bool. More...
 
(id) - initWithChar:
 Initializes an already allocated OFNumber with the specified signed char. More...
 
(id) - initWithShort:
 Initializes an already allocated OFNumber with the specified signed short. More...
 
(id) - initWithInt:
 Initializes an already allocated OFNumber with the specified signed int. More...
 
(id) - initWithLong:
 Initializes an already allocated OFNumber with the specified signed long. More...
 
(id) - initWithLongLong:
 Initializes an already allocated OFNumber with the specified signed long long. More...
 
(id) - initWithUnsignedChar:
 Initializes an already allocated OFNumber with the specified unsigned char. More...
 
(id) - initWithUnsignedShort:
 Initializes an already allocated OFNumber with the specified unsigned short. More...
 
(id) - initWithUnsignedInt:
 Initializes an already allocated OFNumber with the specified unsigned int. More...
 
(id) - initWithUnsignedLong:
 Initializes an already allocated OFNumber with the specified unsigned long. More...
 
(id) - initWithUnsignedLongLong:
 Initializes an already allocated OFNumber with the specified unsigned long long. More...
 
(id) - initWithInt8:
 Initializes an already allocated OFNumber with the specified int8_t. More...
 
(id) - initWithInt16:
 Initializes an already allocated OFNumber with the specified int16_t. More...
 
(id) - initWithInt32:
 Initializes an already allocated OFNumber with the specified int32_t. More...
 
(id) - initWithInt64:
 Initializes an already allocated OFNumber with the specified int64_t. More...
 
(id) - initWithUInt8:
 Initializes an already allocated OFNumber with the specified uint8_t. More...
 
(id) - initWithUInt16:
 Initializes an already allocated OFNumber with the specified uint16_t. More...
 
(id) - initWithUInt32:
 Initializes an already allocated OFNumber with the specified uint32_t. More...
 
(id) - initWithUInt64:
 Initializes an already allocated OFNumber with the specified uint64_t. More...
 
(id) - initWithSize:
 Initializes an already allocated OFNumber with the specified size_t. More...
 
(id) - initWithSSize:
 Initializes an already allocated OFNumber with the specified ssize_t. More...
 
(id) - initWithIntMax:
 Initializes an already allocated OFNumber with the specified intmax_t. More...
 
(id) - initWithUIntMax:
 Initializes an already allocated OFNumber with the specified uintmax_t. More...
 
(id) - initWithPtrDiff:
 Initializes an already allocated OFNumber with the specified ptrdiff_t. More...
 
(id) - initWithIntPtr:
 Initializes an already allocated OFNumber with the specified intptr_t. More...
 
(id) - initWithUIntPtr:
 Initializes an already allocated OFNumber with the specified uintptr_t. More...
 
(id) - initWithFloat:
 Initializes an already allocated OFNumber with the specified float. More...
 
(id) - initWithDouble:
 Initializes an already allocated OFNumber with the specified double. More...
 
(bool) - boolValue
 Returns the OFNumber as a bool. More...
 
(signed char) - charValue
 Returns the OFNumber as a signed char. More...
 
(signed short) - shortValue
 Returns the OFNumber as a signed short. More...
 
(signed int) - intValue
 Returns the OFNumber as a signed int. More...
 
(signed long) - longValue
 Returns the OFNumber as a signed long. More...
 
(signed long long) - longLongValue
 Returns the OFNumber as a signed long long. More...
 
(unsigned char) - unsignedCharValue
 Returns the OFNumber as an unsigned char. More...
 
(unsigned short) - unsignedShortValue
 Returns the OFNumber as an unsigned short. More...
 
(unsigned int) - unsignedIntValue
 Returns the OFNumber as an unsigned int. More...
 
(unsigned long) - unsignedLongValue
 Returns the OFNumber as an unsigned long. More...
 
(unsigned long long) - unsignedLongLongValue
 Returns the OFNumber as an unsigned long long. More...
 
(int8_t) - int8Value
 Returns the OFNumber as an int8_t. More...
 
(int16_t) - int16Value
 Returns the OFNumber as an int16_t. More...
 
(int32_t) - int32Value
 Returns the OFNumber as an int32_t. More...
 
(int64_t) - int64Value
 Returns the OFNumber as an int64_t. More...
 
(uint8_t) - uInt8Value
 Returns the OFNumber as a uint8_t. More...
 
(uint16_t) - uInt16Value
 Returns the OFNumber as a uint16_t. More...
 
(uint32_t) - uInt32Value
 Returns the OFNumber as a uint32_t. More...
 
(uint64_t) - uInt64Value
 Returns the OFNumber as a uint64_t. More...
 
(size_t) - sizeValue
 Returns the OFNumber as a size_t. More...
 
(ssize_t) - sSizeValue
 Returns the OFNumber as an ssize_t. More...
 
(intmax_t) - intMaxValue
 Returns the OFNumber as an intmax_t. More...
 
(uintmax_t) - uIntMaxValue
 Returns the OFNumber as a uintmax_t. More...
 
(ptrdiff_t) - ptrDiffValue
 Returns the OFNumber as a ptrdiff_t. More...
 
(intptr_t) - intPtrValue
 Returns the OFNumber as an intptr_t. More...
 
(uintptr_t) - uIntPtrValue
 Returns the OFNumber as a uintptr_t. More...
 
(float) - floatValue
 Returns the OFNumber as a float. More...
 
(double) - doubleValue
 Returns the OFNumber as a double. More...
 
- Instance Methods inherited from OFObject
(id) - init
 Initializes an already allocated object. More...
 
(OFString *) - className
 Returns the name of the object's class. More...
 
(OFString *) - description
 Returns a description for the object. More...
 
(nullable void *) - allocMemoryWithSize:
 Allocates memory and stores it in the object's memory pool. More...
 
(nullable void *) - allocMemoryWithSize:count:
 Allocates memory for the specified number of items and stores it in the object's memory pool. More...
 
(nullable void *) - resizeMemory:size:
 Resizes memory in the object's memory pool to the specified size. More...
 
(nullable void *) - resizeMemory:size:count:
 Resizes memory in the object's memory pool to the specific number of items of the specified size. More...
 
(void) - freeMemory:
 Frees allocated memory and removes it from the object's memory pool. More...
 
(void) - dealloc
 Deallocates the object. More...
 
(void) - performSelector:afterDelay:
 Performs the specified selector after the specified delay. More...
 
(void) - performSelector:withObject:afterDelay:
 Performs the specified selector with the specified object after the specified delay. More...
 
(void) - performSelector:withObject:withObject:afterDelay:
 Performs the specified selector with the specified objects after the specified delay. More...
 
(void) - performSelector:onThread:waitUntilDone:
 Performs the specified selector on the specified thread. More...
 
(void) - performSelector:onThread:withObject:waitUntilDone:
 Performs the specified selector on the specified thread with the specified object. More...
 
(void) - performSelector:onThread:withObject:withObject:waitUntilDone:
 Performs the specified selector on the specified thread with the specified objects. More...
 
(void) - performSelectorOnMainThread:waitUntilDone:
 Performs the specified selector on the main thread. More...
 
(void) - performSelectorOnMainThread:withObject:waitUntilDone:
 Performs the specified selector on the main thread with the specified object. More...
 
(void) - performSelectorOnMainThread:withObject:withObject:waitUntilDone:
 Performs the specified selector on the main thread with the specified objects. More...
 
(void) - performSelector:onThread:afterDelay:
 Performs the specified selector on the specified thread after the specified delay. More...
 
(void) - performSelector:onThread:withObject:afterDelay:
 Performs the specified selector on the specified thread with the specified object after the specified delay. More...
 
(void) - performSelector:onThread:withObject:withObject:afterDelay:
 Performs the specified selector on the specified thread with the specified objects after the specified delay. More...
 
(nullable id) - forwardingTargetForSelector:
 This method is called when resolveClassMethod: or resolveInstanceMethod: returned false. It should return a target to which the message should be forwarded. More...
 
(void) - doesNotRecognizeSelector:
 Handles messages which are not understood by the receiver. More...
 
(OFString *) - stringBySerializing
 Creates a string by serializing the receiver. More...
 
- Instance Methods inherited from <OFObject>
(bool) - isKindOfClass:
 Returns a boolean whether the object of the specified kind. More...
 
(bool) - isMemberOfClass:
 Returns a boolean whether the object is a member of the specified class. More...
 
(bool) - respondsToSelector:
 Returns a boolean whether the object responds to the specified selector. More...
 
(nullable IMP) - methodForSelector:
 Returns the implementation for the specified selector. More...
 
(nullable const char *) - typeEncodingForSelector:
 Returns the type encoding for the specified selector. More...
 
(nullable id) - performSelector:
 Performs the specified selector. More...
 
(nullable id) - performSelector:withObject:
 Performs the specified selector with the specified object. More...
 
(nullable id) - performSelector:withObject:withObject:
 Performs the specified selector with the specified objects. More...
 
(bool) - isEqual:
 Checks two objects for equality. More...
 
(uint32_t) - hash
 Calculates a hash for the object. More...
 
(id) - retain
 Increases the retain count. More...
 
(unsigned int) - retainCount
 Returns the retain count. More...
 
(void) - release
 Decreases the retain count. More...
 
(id) - autorelease
 Adds the object to the topmost OFAutoreleasePool of the thread's autorelease pool stack. More...
 
(id) - self
 Returns the receiver. More...
 
(bool) - isProxy
 Returns whether the object is a proxy object. More...
 
(bool) - allowsWeakReference
 Returns whether the class allows weak references. More...
 
(bool) - retainWeakReference
 Retain a weak reference to this object. More...
 
- Instance Methods inherited from <OFCopying>
(id) - copy
 Copies the object. More...
 
- Instance Methods inherited from <OFSerialization>
(id) - initWithSerialization:
 Initializes the object with the specified XML element serialization. More...
 
(OFXMLElement *) - XMLElementBySerializing
 Serializes the object into an XML element. More...
 
- Instance Methods inherited from <OFJSONRepresentation>
(OFString *) - JSONRepresentation
 Returns the JSON representation of the object as a string. More...
 
(OFString *) - JSONRepresentationWithOptions:
 Returns the JSON representation of the object as a string. More...
 
- Instance Methods inherited from <OFMessagePackRepresentation>
(OFData *) - messagePackRepresentation
 Returns the MessagePack representation of the object as OFData. More...
 

Class Methods

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

Properties

of_number_type_t type
 

Detailed Description

Provides a way to store a number in an object.

Method Documentation

◆ boolValue()

- (bool) boolValue

Returns the OFNumber as a bool.

Returns
The OFNumber as a bool

◆ charValue()

- (signed char) charValue

Returns the OFNumber as a signed char.

Returns
The OFNumber as a signed char

◆ doubleValue()

- (double) doubleValue

Returns the OFNumber as a double.

Returns
The OFNumber as a double

◆ floatValue()

- (float) floatValue

Returns the OFNumber as a float.

Returns
The OFNumber as a float

◆ initWithBool:()

- (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

◆ initWithChar:()

- (id) initWithChar: (signed char)  schar

Initializes an already allocated OFNumber with the specified signed char.

Parameters
scharA signed char which the OFNumber should contain
Returns
An initialized OFNumber

◆ initWithDouble:()

- (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

◆ initWithFloat:()

- (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

◆ initWithInt16:()

- (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

◆ initWithInt32:()

- (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

◆ initWithInt64:()

- (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

◆ initWithInt8:()

- (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

◆ initWithInt:()

- (id) initWithInt: (signed int)  sint

Initializes an already allocated OFNumber with the specified signed int.

Parameters
sintA signed int which the OFNumber should contain
Returns
An initialized OFNumber

◆ initWithIntMax:()

- (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

◆ initWithIntPtr:()

- (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

◆ initWithLong:()

- (id) initWithLong: (signed long)  slong

Initializes an already allocated OFNumber with the specified signed long.

Parameters
slongA signed long which the OFNumber should contain
Returns
An initialized OFNumber

◆ initWithLongLong:()

- (id) initWithLongLong: (signed long long)  slonglong

Initializes an already allocated OFNumber with the specified signed long long.

Parameters
slonglongA signed long long which the OFNumber should contain
Returns
An initialized OFNumber

◆ initWithPtrDiff:()

- (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

◆ initWithShort:()

- (id) initWithShort: (signed short)  sshort

Initializes an already allocated OFNumber with the specified signed short.

Parameters
sshortA signed short which the OFNumber should contain
Returns
An initialized OFNumber

◆ initWithSize:()

- (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

◆ initWithSSize:()

- (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

◆ initWithUInt16:()

- (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

◆ initWithUInt32:()

- (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

◆ initWithUInt64:()

- (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

◆ initWithUInt8:()

- (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

◆ initWithUIntMax:()

- (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

◆ initWithUIntPtr:()

- (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

◆ initWithUnsignedChar:()

- (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

◆ initWithUnsignedInt:()

- (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

◆ initWithUnsignedLong:()

- (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

◆ initWithUnsignedLongLong:()

- (id) initWithUnsignedLongLong: (unsigned long long)  ulonglong

Initializes an already allocated OFNumber with the specified unsigned long long.

Parameters
ulonglongAn unsigned long long which the OFNumber should contain
Returns
An initialized OFNumber

◆ initWithUnsignedShort:()

- (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

◆ int16Value()

- (int16_t) int16Value

Returns the OFNumber as an int16_t.

Returns
The OFNumber as an int16_t

◆ int32Value()

- (int32_t) int32Value

Returns the OFNumber as an int32_t.

Returns
The OFNumber as an int32_t

◆ int64Value()

- (int64_t) int64Value

Returns the OFNumber as an int64_t.

Returns
The OFNumber as an int64_t

◆ int8Value()

- (int8_t) int8Value

Returns the OFNumber as an int8_t.

Returns
The OFNumber as an int8_t

◆ intMaxValue()

- (intmax_t) intMaxValue

Returns the OFNumber as an intmax_t.

Returns
The OFNumber as an intmax_t

◆ intPtrValue()

- (intptr_t) intPtrValue

Returns the OFNumber as an intptr_t.

Returns
The OFNumber as an intptr_t

◆ intValue()

- (signed int) intValue

Returns the OFNumber as a signed int.

Returns
The OFNumber as a signed int

◆ longLongValue()

- (signed long long) longLongValue

Returns the OFNumber as a signed long long.

Returns
The OFNumber as a signed long long

◆ longValue()

- (signed long) longValue

Returns the OFNumber as a signed long.

Returns
The OFNumber as a signed long

◆ numberWithBool:()

+ (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

◆ numberWithChar:()

+ (instancetype) numberWithChar: (signed char)  schar

Creates a new OFNumber with the specified signed char.

Parameters
scharA signed char which the OFNumber should contain
Returns
A new autoreleased OFNumber

◆ numberWithDouble:()

+ (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

◆ numberWithFloat:()

+ (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

◆ numberWithInt16:()

+ (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

◆ numberWithInt32:()

+ (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

◆ numberWithInt64:()

+ (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

◆ numberWithInt8:()

+ (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

◆ numberWithInt:()

+ (instancetype) numberWithInt: (signed int)  sint

Creates a new OFNumber with the specified signed int.

Parameters
sintA signed int which the OFNumber should contain
Returns
A new autoreleased OFNumber

◆ numberWithIntMax:()

+ (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

◆ numberWithIntPtr:()

+ (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

◆ numberWithLong:()

+ (instancetype) numberWithLong: (signed long)  slong

Creates a new OFNumber with the specified signed long.

Parameters
slongA signed long which the OFNumber should contain
Returns
A new autoreleased OFNumber

◆ numberWithLongLong:()

+ (instancetype) numberWithLongLong: (signed long long)  slonglong

Creates a new OFNumber with the specified signed long long.

Parameters
slonglongA signed long long which the OFNumber should contain
Returns
A new autoreleased OFNumber

◆ numberWithPtrDiff:()

+ (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

◆ numberWithShort:()

+ (instancetype) numberWithShort: (signed short)  sshort

Creates a new OFNumber with the specified signed short.

Parameters
sshortA signed short which the OFNumber should contain
Returns
A new autoreleased OFNumber

◆ numberWithSize:()

+ (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

◆ numberWithSSize:()

+ (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

◆ numberWithUInt16:()

+ (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

◆ numberWithUInt32:()

+ (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

◆ numberWithUInt64:()

+ (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

◆ numberWithUInt8:()

+ (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

◆ numberWithUIntMax:()

+ (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

◆ numberWithUIntPtr:()

+ (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

◆ numberWithUnsignedChar:()

+ (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

◆ numberWithUnsignedInt:()

+ (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

◆ numberWithUnsignedLong:()

+ (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

◆ numberWithUnsignedLongLong:()

+ (instancetype) numberWithUnsignedLongLong: (unsigned long long)  ulonglong

Creates a new OFNumber with the specified unsigned long long.

Parameters
ulonglongAn unsigned long long which the OFNumber should contain
Returns
A new autoreleased OFNumber

◆ numberWithUnsignedShort:()

+ (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

◆ ptrDiffValue()

- (ptrdiff_t) ptrDiffValue

Returns the OFNumber as a ptrdiff_t.

Returns
The OFNumber as a ptrdiff_t

◆ shortValue()

- (signed short) shortValue

Returns the OFNumber as a signed short.

Returns
The OFNumber as a signed short

◆ sizeValue()

- (size_t) sizeValue

Returns the OFNumber as a size_t.

Returns
The OFNumber as a size_t

◆ sSizeValue()

- (ssize_t) sSizeValue

Returns the OFNumber as an ssize_t.

Returns
The OFNumber as an ssize_t

◆ uInt16Value()

- (uint16_t) uInt16Value

Returns the OFNumber as a uint16_t.

Returns
The OFNumber as a uint16_t

◆ uInt32Value()

- (uint32_t) uInt32Value

Returns the OFNumber as a uint32_t.

Returns
The OFNumber as a uint32_t

◆ uInt64Value()

- (uint64_t) uInt64Value

Returns the OFNumber as a uint64_t.

Returns
The OFNumber as a uint64_t

◆ uInt8Value()

- (uint8_t) uInt8Value

Returns the OFNumber as a uint8_t.

Returns
The OFNumber as a uint8_t

◆ uIntMaxValue()

- (uintmax_t) uIntMaxValue

Returns the OFNumber as a uintmax_t.

Returns
The OFNumber as a uintmax_t

◆ uIntPtrValue()

- (uintptr_t) uIntPtrValue

Returns the OFNumber as a uintptr_t.

Returns
The OFNumber as a uintptr_t

◆ unsignedCharValue()

- (unsigned char) unsignedCharValue

Returns the OFNumber as an unsigned char.

Returns
The OFNumber as an unsigned char

◆ unsignedIntValue()

- (unsigned int) unsignedIntValue

Returns the OFNumber as an unsigned int.

Returns
The OFNumber as an unsigned int

◆ unsignedLongLongValue()

- (unsigned long long) unsignedLongLongValue

Returns the OFNumber as an unsigned long long.

Returns
The OFNumber as an unsigned long long

◆ unsignedLongValue()

- (unsigned long) unsignedLongValue

Returns the OFNumber as an unsigned long.

Returns
The OFNumber as an unsigned long

◆ unsignedShortValue()

- (unsigned short) unsignedShortValue

Returns the OFNumber as an unsigned short.

Returns
The OFNumber as an unsigned short

Property Documentation

◆ type

- (of_number_type_t) type
readnonatomicassign

The type of the number.


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