Class CPValue

CPObject
    extended byCPValue

@implementation CPValue : CPObject

The class can be subclassed to hold different types of scalar values.


Method Summary
+(id)valueWithJSObject:(JSObject)aJSObject
          Creates a value from the specified JavaScript object.
-(id)initWithCoder:(CPCoder)aCoder
          Initializes the value from a coder.
-(id)initWithJSObject:(JSObject)aJSObject
          Initializes the value from a JavaScript object.
-(JSObject)JSObject
          Returns the JavaScript object backing this value.
-(void)encodeWithCoder:(CPCoder)aCoder
          Encodes the data into the specified coder.

Methods inherited from class CPObject
initialize, alloc, class, instanceMethodForSelector, instancesRespondToSelector, isSubclassOfClass, load, new, setVersion, superclass, version, init, autorelease, awakeAfterUsingCoder, class, classForCoder, classForKeyedArchiver, className, copy, dealloc, description, doesNotRecognizeSelector, forwardInvocation, hash, isEqual, isKindOfClass, isMemberOfClass, isProxy, methodForSelector, methodSignatureForSelector, mutableCopy, performSelector, performSelector, performSelector, release, replacementObjectForArchiver, replacementObjectForCoder, replacementObjectForKeyedArchiver, respondsToSelector, retain, self, superclass


Method Detail

valueWithJSObject

+(id)valueWithJSObject:(JSObject)aJSObject
Creates a value from the specified JavaScript object
Parameters:
aJSObject - a JavaScript object containing a value
Returns:
the converted CPValue

initWithCoder

-(id)initWithCoder:(CPCoder)aCoder
Initializes the value from a coder.
Parameters:
aCoder - the coder from which to initialize
Returns:
the initialized CPValue

initWithJSObject

-(id)initWithJSObject:(JSObject)aJSObject
Initializes the value from a JavaScript object
Parameters:
aJSObject - the object to get data from
Returns:
the initialized CPValue

JSObject

-(JSObject)JSObject
Returns the JavaScript object backing this value.

encodeWithCoder

-(void)encodeWithCoder:(CPCoder)aCoder
Encodes the data into the specified coder.
Parameters:
aCoder

Created on Sat Sep 13 14:15:43 PDT 2008