Inherits From:
ITKValue : NSObject
Conforms To: NSObject (NSObject)
Declared in: itkJavaScript/ITKJSVal.h
The native representation mentioned in the class description of ITKValue is defined to be a JSVal by the ITKJSVal class. JSVal is conceptually equivalent to the jsval type from the low-level JavaScript API exported by jsapi.h, but is defined as a union containing a few useless fields besides the actual jsval so it can be distinguished from a plain integer in method type signatures. ITKJSVal.h provides two macros, JSVal() and jsval() to convert between the JSVal union and the actual jsval. If you don't want to use the low-level JavaScript API, you need not worry about this at all. The Objective-C API should be sufficient for almost every purpose.
jsVal:
(JSVal)valueCreates and returns an ITKJSVal wrapping value.
See also: - initWithJSVal:
nullValue
Returns an ITKJSVal wrapping the JavaScript "undefined" value.
See also: - isNull
valueWithArray:
(NSArray *)valuesCreates and returns an ITKJSVal wrapping a JavaScript array composed of values, all of which have to be instances of ITKJSVal.
See also: - initWithArray:
valueWithNativeRep:
(void *)value Creates and returns an ITKJSVal wrapping value, which must be a valid JSVal. To avoid complicated type casting of the argument you should consider using the equivalent jsVal: method instead.
See also: - initWithNativeRep:
arrayValue
If the wrapped value is a JavaScript array, returns its elements as an NSArray of ITKJSVal's. Raises an exception otherwise.
initWithArray:
(NSArray *)valuesInitializes a newly created ITKJSVal with a JavaScript array composed of values, all of which have to be instances of ITKJSVal.
See also: + valueWithArray:
initWithJSVal:
(JSVal)valueInitializes a newly created ITKJSVal with value.
See also: + jsVal:
initWithNativeRep:
(void *)value Initializes a newly created ITKJSVal with value, which must be a valid JSVal. To avoid complicated type casting of the argument you should consider using the equivalent initWithJSVal: method instead.
See also: + valueWithNativeRep:
isNull
Returns YES if the wrapped value equals the JavaScript "undefined" value.
See also: + nullValue
jsVal
Returns the JSVal wrapped by the receiver.
nativeRep
Returns the JSVal wrapped by the receiver. You won't ever need to use this method unless you want to use the low-level JavaScript API exported by jsapi.h, and even then you should consider using the equivalent jsVal method instead, to avoid complicated type casting of the return value.