API  1.0.0
CPNumber Class Reference

A bridged object to native Javascript numbers. More...

#import <CPNumber.h>

+ Inheritance diagram for CPNumber:

Instance Methods

(BOOL) - boolValue
 
(char) - charValue
 
(CPComparisonResult) - compare:
 
(CPDecimal) - decimalValue
 
(CPString- description
 
(CPString- descriptionWithLocale:
 
(double) - doubleValue
 
(void) - encodeWithCoder:
 
(float) - floatValue
 
(id) - initWithBool:
 
(id) - initWithChar:
 
(id) - initWithCoder:
 
(id) - initWithDouble:
 
(id) - initWithFloat:
 
(id) - initWithInt:
 
(id) - initWithLong:
 
(id) - initWithLongLong:
 
(id) - initWithShort:
 
(id) - initWithUnsignedChar:
 
(id) - initWithUnsignedInt:
 
(id) - initWithUnsignedLong:
 
(id) - initWithUnsignedShort:
 
(int) - integerValue
 
(int) - intValue
 
(BOOL) - isEqualToNumber:
 
(long long) - longLongValue
 
(long) - longValue
 
(short) - shortValue
 
(CPString- stringValue
 
(CPString- UID
 
(unsigned char) - unsignedCharValue
 
(unsigned int) - unsignedIntValue
 
(unsigned long) - unsignedLongValue
 
(unsigned short) - unsignedShortValue
 
- Instance Methods inherited from CPObject
(void) - addObserver:forKeyPath:options:context:
 
(void) - applyChange:toKeyPath:
 
(id) - autorelease
 
(id) - awakeAfterUsingCoder:
 
(void) - awakeFromCib
 
(void) - bind:toObject:withKeyPath:options:
 
(Class) - classForCoder
 
(Class) - classForKeyedArchiver
 
(CPString- className
 
(id) - copy
 
(void) - dealloc
 
(CPDictionary- dictionaryWithValuesForKeys:
 
(void) - didChange:valuesAtIndexes:forKey:
 
(void) - didChangeValueForKey:
 
(void) - didChangeValueForKey:withSetMutation:usingObjects:
 
(void) - doesNotRecognizeSelector:
 
(CPArray) - exposedBindings
 
(id) - forwardingTargetForSelector:
 
(void) - forwardInvocation:
 
(unsigned) - hash
 
(BOOL) - implementsSelector:
 
(CPDictionary- infoForBinding:
 
(id) - init
 
(BOOL) - isEqual:
 
(BOOL) - isKindOfClass:
 
(BOOL) - isMemberOfClass:
 
(BOOL) - isProxy
 
(IMP) - methodForSelector:
 
(CPMethodSignature) - methodSignatureForSelector:
 
(id) - mutableArrayValueForKey:
 
(id) - mutableArrayValueForKeyPath:
 
(id) - mutableCopy
 
(id) - mutableSetValueForKey:
 
(id) - mutableSetValueForKeyPath:
 
(id) - performSelector:
 
(id) - performSelector:withObject:
 
(void) - performSelector:withObject:afterDelay:
 
(void) - performSelector:withObject:afterDelay:inModes:
 
(id) - performSelector:withObject:withObject:
 
(id) - performSelector:withObjects:
 
(void) - release
 
(void) - removeObserver:forKeyPath:
 
(id) - replacementObjectForArchiver:
 
(id) - replacementObjectForCoder:
 
(id) - replacementObjectForKeyedArchiver:
 
(BOOL) - respondsToSelector:
 
(id) - retain
 
(id) - self
 
(void) - setValue:forKey:
 
(void) - setValue:forKeyPath:
 
(void) - setValue:forUndefinedKey:
 
(void) - setValuesForKeysWithDictionary:
 
(void) - unbind:
 
(Class) - valueClassForBinding:
 
(id) - valueForKey:
 
(id) - valueForKeyPath:
 
(id) - valueForUndefinedKey:
 
(void) - willChange:valuesAtIndexes:forKey:
 
(void) - willChangeValueForKey:
 
(void) - willChangeValueForKey:withSetMutation:usingObjects:
 

Class Methods

(id) + alloc
 
(id) + numberWithBool:
 
(id) + numberWithChar:
 
(id) + numberWithDouble:
 
(id) + numberWithFloat:
 
(id) + numberWithInt:
 
(id) + numberWithLong:
 
(id) + numberWithLongLong:
 
(id) + numberWithShort:
 
(id) + numberWithUnsignedChar:
 
(id) + numberWithUnsignedInt:
 
(id) + numberWithUnsignedLong:
 
(id) + numberWithUnsignedShort:
 
- Class Methods inherited from CPObject
(BOOL) + accessInstanceVariablesDirectly
 
(id) + allocWithCoder:
 
(BOOL) + automaticallyNotifiesObserversForKey:
 
(void) + cancelPreviousPerformRequestsWithTarget:
 
(void) + cancelPreviousPerformRequestsWithTarget:selector:object:
 
(Class) + class
 
(BOOL) + conformsToProtocol:
 
(void) + exposeBinding:
 
(void) + initialize
 
(IMP) + instanceMethodForSelector:
 
(BOOL) + instancesImplementSelector:
 
(BOOL) + instancesRespondToSelector:
 
(BOOL) + isBindingExclusive:
 
(BOOL) + isSubclassOfClass:
 
(CPSet) + keyPathsForValuesAffectingValueForKey:
 
(void) + load
 
(id) + new
 
(void) + object:performSelector:withObject:afterDelay:inModes:
 
(void) + setVersion:
 
(Class) + superclass
 
(int) + version
 

Detailed Description

A bridged object to native Javascript numbers.

This class primarily exists for source compatibility. The JavaScript Number type can be changed on the fly based on context, so there is no need to call any of these methods.

In other words, native JavaScript numbers are bridged to CPNumber, so you can use them interchangeably (including operators and methods).

Definition at line 2 of file CPNumber.h.

Method Documentation

◆ alloc()

+ (id) alloc
implementation

Allocates a new instance of the receiving class

Reimplemented from CPObject.

Reimplemented in CPDecimalNumber.

Definition at line 44 of file CPNumber.j.

◆ boolValue()

- (BOOL) boolValue
implementation

Reimplemented in CPDecimalNumber.

Definition at line 206 of file CPNumber.j.

◆ charValue()

- (char) charValue
implementation

Reimplemented in CPDecimalNumber.

Definition at line 212 of file CPNumber.j.

◆ compare:()

- (CPComparisonResult) compare: (CPNumber aNumber
implementation

Reimplemented in CPDecimalNumber.

Definition at line 313 of file CPNumber.j.

◆ decimalValue()

- (CPDecimal) decimalValue
implementation

Reimplemented in CPDecimalNumber.

Definition at line 220 of file CPNumber.j.

◆ description()

- (CPString) description
implementation

Returns a human readable string describing the receiver

Reimplemented from CPObject.

Reimplemented in CPDecimalNumber.

Definition at line 233 of file CPNumber.j.

◆ descriptionWithLocale:()

- (CPString) descriptionWithLocale: (CPDictionary aDictionary
implementation

Reimplemented in CPDecimalNumber.

Definition at line 225 of file CPNumber.j.

◆ doubleValue()

- (double) doubleValue
implementation

Reimplemented in CPDecimalNumber.

Definition at line 238 of file CPNumber.j.

◆ encodeWithCoder:()

- (void) encodeWithCoder: (CPCoder aCoder
implementation

Reimplemented in CPDecimalNumber.

Provided by category CPNumber(CPCoding).

Definition at line 340 of file CPNumber.j.

◆ floatValue()

- (float) floatValue
implementation

Reimplemented in CPDecimalNumber.

Definition at line 246 of file CPNumber.j.

◆ initWithBool:()

- (id) initWithBool: (BOOL)  aBoolean
implementation

Reimplemented in CPDecimalNumber.

Definition at line 122 of file CPNumber.j.

◆ initWithChar:()

- (id) initWithChar: (char)  aChar
implementation

Reimplemented in CPDecimalNumber.

Definition at line 127 of file CPNumber.j.

◆ initWithCoder:()

- (id) initWithCoder: (CPCoder aCoder
implementation

Reimplemented in CPDecimalNumber.

Provided by category CPNumber(CPCoding).

Definition at line 335 of file CPNumber.j.

◆ initWithDouble:()

- (id) initWithDouble: (double)  aDouble
implementation

Reimplemented in CPDecimalNumber.

Definition at line 135 of file CPNumber.j.

◆ initWithFloat:()

- (id) initWithFloat: (float)  aFloat
implementation

Reimplemented in CPDecimalNumber.

Definition at line 140 of file CPNumber.j.

◆ initWithInt:()

- (id) initWithInt: (int)  anInt
implementation

Reimplemented in CPDecimalNumber.

Definition at line 145 of file CPNumber.j.

◆ initWithLong:()

- (id) initWithLong: (long)  aLong
implementation

Reimplemented in CPDecimalNumber.

Definition at line 150 of file CPNumber.j.

◆ initWithLongLong:()

- (id) initWithLongLong: (long long)  aLongLong
implementation

Reimplemented in CPDecimalNumber.

Definition at line 155 of file CPNumber.j.

◆ initWithShort:()

- (id) initWithShort: (short)  aShort
implementation

Reimplemented in CPDecimalNumber.

Definition at line 160 of file CPNumber.j.

◆ initWithUnsignedChar:()

- (id) initWithUnsignedChar: (unsigned char)  aChar
implementation

Reimplemented in CPDecimalNumber.

Definition at line 165 of file CPNumber.j.

◆ initWithUnsignedInt:()

- (id) initWithUnsignedInt: (unsigned)  anUnsignedInt
implementation

Reimplemented in CPDecimalNumber.

Definition at line 173 of file CPNumber.j.

◆ initWithUnsignedLong:()

- (id) initWithUnsignedLong: (unsigned long)  anUnsignedLong
implementation

Reimplemented in CPDecimalNumber.

Definition at line 178 of file CPNumber.j.

◆ initWithUnsignedShort:()

- (id) initWithUnsignedShort: (unsigned short)  anUnsignedShort
implementation

Reimplemented in CPDecimalNumber.

Definition at line 188 of file CPNumber.j.

◆ integerValue()

- (int) integerValue
implementation

Definition at line 259 of file CPNumber.j.

◆ intValue()

- (int) intValue
implementation

Reimplemented in CPDecimalNumber.

Definition at line 254 of file CPNumber.j.

◆ isEqualToNumber:()

- (BOOL) isEqualToNumber: (CPNumber aNumber
implementation

Reimplemented in CPDecimalNumber.

Definition at line 326 of file CPNumber.j.

◆ longLongValue()

- (long long) longLongValue
implementation

Reimplemented in CPDecimalNumber.

Definition at line 264 of file CPNumber.j.

◆ longValue()

- (long) longValue
implementation

Reimplemented in CPDecimalNumber.

Definition at line 269 of file CPNumber.j.

◆ numberWithBool:()

+ (id) numberWithBool: (BOOL)  aBoolean
implementation

Reimplemented in CPDecimalNumber.

Definition at line 51 of file CPNumber.j.

◆ numberWithChar:()

+ (id) numberWithChar: (char)  aChar
implementation

Reimplemented in CPDecimalNumber.

Definition at line 56 of file CPNumber.j.

◆ numberWithDouble:()

+ (id) numberWithDouble: (double)  aDouble
implementation

Reimplemented in CPDecimalNumber.

Definition at line 64 of file CPNumber.j.

◆ numberWithFloat:()

+ (id) numberWithFloat: (float)  aFloat
implementation

Reimplemented in CPDecimalNumber.

Definition at line 69 of file CPNumber.j.

◆ numberWithInt:()

+ (id) numberWithInt: (int)  anInt
implementation

Reimplemented in CPDecimalNumber.

Definition at line 74 of file CPNumber.j.

◆ numberWithLong:()

+ (id) numberWithLong: (long)  aLong
implementation

Reimplemented in CPDecimalNumber.

Definition at line 79 of file CPNumber.j.

◆ numberWithLongLong:()

+ (id) numberWithLongLong: (long long)  aLongLong
implementation

Reimplemented in CPDecimalNumber.

Definition at line 84 of file CPNumber.j.

◆ numberWithShort:()

+ (id) numberWithShort: (short)  aShort
implementation

Reimplemented in CPDecimalNumber.

Definition at line 89 of file CPNumber.j.

◆ numberWithUnsignedChar:()

+ (id) numberWithUnsignedChar: (unsigned char)  aChar
implementation

Reimplemented in CPDecimalNumber.

Definition at line 94 of file CPNumber.j.

◆ numberWithUnsignedInt:()

+ (id) numberWithUnsignedInt: (unsigned)  anUnsignedInt
implementation

Reimplemented in CPDecimalNumber.

Definition at line 102 of file CPNumber.j.

◆ numberWithUnsignedLong:()

+ (id) numberWithUnsignedLong: (unsigned long)  anUnsignedLong
implementation

Reimplemented in CPDecimalNumber.

Definition at line 107 of file CPNumber.j.

◆ numberWithUnsignedShort:()

+ (id) numberWithUnsignedShort: (unsigned short)  anUnsignedShort
implementation

Reimplemented in CPDecimalNumber.

Definition at line 117 of file CPNumber.j.

◆ shortValue()

- (short) shortValue
implementation

Reimplemented in CPDecimalNumber.

Definition at line 274 of file CPNumber.j.

◆ stringValue()

- (CPString) stringValue
implementation

Reimplemented in CPDecimalNumber.

Definition at line 279 of file CPNumber.j.

◆ UID()

- (CPString) UID
implementation

Reimplemented from CPObject.

Reimplemented in CPDecimalNumber.

Definition at line 193 of file CPNumber.j.

◆ unsignedCharValue()

- (unsigned char) unsignedCharValue
implementation

Reimplemented in CPDecimalNumber.

Definition at line 284 of file CPNumber.j.

◆ unsignedIntValue()

- (unsigned int) unsignedIntValue
implementation

Reimplemented in CPDecimalNumber.

Definition at line 289 of file CPNumber.j.

◆ unsignedLongValue()

- (unsigned long) unsignedLongValue
implementation

Reimplemented in CPDecimalNumber.

Definition at line 301 of file CPNumber.j.

◆ unsignedShortValue()

- (unsigned short) unsignedShortValue
implementation

Reimplemented in CPDecimalNumber.

Definition at line 307 of file CPNumber.j.


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