objc

NXNumber.h
Go to the documentation of this file.
1 
7 #pragma once
8 
9 #include "NXObject.h"
10 #include <stdint.h>
11 
12 @class NXString;
13 
15 // PUBLIC METHODS
16 
25 int32_t NXRandInt32();
26 
34 uint32_t NXRandUnsignedInt32();
35 
37 // CLASS DEFINITIONS
38 
48 
54 + (NXNumber *)numberWithBool:(BOOL)value;
55 
61 + (NXNumber *)numberWithInt16:(int16_t)value;
62 
69 + (NXNumber *)numberWithUnsignedInt16:(uint16_t)value;
70 
76 + (NXNumber *)numberWithInt32:(int32_t)value;
77 
84 + (NXNumber *)numberWithUnsignedInt32:(uint32_t)value;
85 
91 + (NXNumber *)numberWithInt64:(int64_t)value;
92 
99 + (NXNumber *)numberWithUnsignedInt64:(uint64_t)value;
100 
105 + (NXNumber *)trueValue;
106 
111 + (NXNumber *)falseValue;
112 
117 + (NXNumber *)zeroValue;
118 
125 - (BOOL)boolValue;
126 
132 - (int16_t)int16Value;
133 
139 - (uint16_t)unsignedInt16Value;
140 
146 - (int32_t)int32Value;
147 
153 - (uint32_t)unsignedInt32Value;
154 
160 - (int64_t)int64Value;
161 
167 - (uint64_t)unsignedInt64Value;
168 
169 @end
The base class for NXNumber instances.
Definition: NXNumber.h:47
int16_t int16Value()
Returns the 16-bit signed integer value stored in this NXNumber instance.
int64_t int64Value()
Returns the 64-bit signed integer value stored in this NXNumber instance.
uint32_t unsignedInt32Value()
Returns the 32-bit unsigned integer value stored in this NXNumber instance.
uint16_t unsignedInt16Value()
Returns the 16-bit unsigned integer value stored in this NXNumber instance.
NXNumber * falseValue()
Returns a NXNumber instance representing the boolean value false.
uint32_t NXRandUnsignedInt32()
Generate a random unsigned 32-bit integer.
bool BOOL
A Boolean value.
Definition: runtime.h:60
NXNumber * zeroValue()
Return an instance of a zero value.
A class for managing and manipulating string objects.
Definition: NXString.h:20
Defines the NXObject class, the base class for the Foundation framework.
The base class for objects in the Foundation framework.
Definition: NXObject.h:21
int32_t int32Value()
Returns the 32-bit signed integer value stored in this NXNumber instance.
A protocol that defines JSON methods for an Object.
Definition: JSON+Protocol.h:14
uint64_t unsignedInt64Value()
Returns the 64-bit unsigned integer value stored in this NXNumber instance.
int32_t NXRandInt32()
Generate a random signed 32-bit integer.
NXNumber * trueValue()
Returns a NXNumber instance representing the boolean value true.
BOOL boolValue()
Returns the boolean value stored in this NXNumber instance.