CPObject
@implementation CPObject
* CPObject.j * Foundation * * Created by Francisco Tolmasky. * Copyright 2008, 280 North, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Method Summary | |
---|---|
+(void) | initialize |
+(BOOL) | accessInstanceVariablesDirectly |
+(id) | alloc Allocates a new instance of the receiving class. |
+(Class) | class Returns the Class object for this class definition. |
+(IMP) | instanceMethodForSelector:(SEL)aSelector Returns the address of the receiving class' method for the provided selector. |
+(BOOL) | instancesRespondToSelector:(SEL)aSelector Test whether instances of this class respond to the provided selector. |
+(BOOL) | isSubclassOfClass:(Class)aClass Returns YES if the receiving class is a subclass of aClass . |
+(void) | load |
+(id) | new Allocates a new instance of the receiver, and sends it an init . |
+(id) | setVersion:(int)aVersion Sets the class version number. |
+(Class) | superclass Returns the class object super class. |
+(int) | version Returns the class version number. |
-(id) | init Initializes the receiver. |
-(id) | autorelease Does nothing. |
-(id) | awakeAfterUsingCoder:(CPCoder)aCoder Subclasses override this method to possibly substitute the unarchived object with another. |
-(id) | awakeAfterUsingCoder:(CPCoder)aDecoder Called after an object is unarchived in case a different object should be used in place of it. |
-(void) | awakeFromCib |
-(Class) | class Returns the receiver's Class . |
-(Class) | classForCoder Can be overridden by subclasses to substitute a different class to represent the receiver during coding. |
-(Class) | classForKeyedArchiver Can be overridden by subclasses to substitute a different class to represent the receiver for keyed archiving. |
-(CPString) | className Returns the class name. |
-(id) | copy Makes a deep copy of the receiver. |
-(void) | dealloc Not necessary to call in Objective-J. |
-(CPString) | description Returns a human readable string describing the receiver. |
-(void) | doesNotRecognizeSelector:(SEL)aSelector Called by the Objective-J runtime when an object can't respond to a message. |
-(void) | forwardInvocation:(CPInvocation)anInvocation Subclasses can override this method to forward message to other objects. |
-(unsigned) | hash Returns a hash for the object. |
-(BOOL) | isEqual:(id)anObject Determines if anObject is functionally equivalent to the receiver. |
-(BOOL) | isKindOfClass:(Class)aClass Returns YES if the receiver is a aClass type, or a subtype of it. |
-(BOOL) | isMemberOfClass:(Class)aClass Returns YES if the receiver is of the aClass class type. |
-(BOOL) | isProxy Determines whether the receiver's root object is a proxy. |
-(IMP) | methodForSelector:(SEL)aSelector Returns the address of the receiver's method for the provided selector. |
-(CPMethodSignature) | methodSignatureForSelector:(SEL)aSelector Returns the method signature for the provided selector. |
-(id) | mutableCopy Creates a deep mutable copy of the receiver. |
-(id) | performSelector:(SEL)aSelector Sends the specified message to the receiver. |
-(id) | performSelector:(SEL)aSelector withObject:(id)anObject Sends the specified message to the receiver, with one argument. |
-(id) | performSelector:(SEL)aSelector withObject:(id)anObject withObject:(id)anotherObject Sends the specified message to the receiver, with two arguments. |
-(void) | release Does nothing. |
-(id) | replacementObjectForArchiver:(CPArchiver)anArchiver Can be overridden by subclasses to substitute another object during archiving. |
-(id) | replacementObjectForCoder:(CPCoder)aCoder Can be overridden by subclasses to substitute another object during coding. |
-(id) | replacementObjectForKeyedArchiver:(CPKeyedArchiver)anArchiver Can be overridden by subclasses to substitute another object during keyed archiving. |
-(BOOL) | respondsToSelector:(SEL)aSelector Tests whether the receiver responds to the provided selector. |
-(id) | retain Does nothing. |
-(id) | self Returns the receiver. |
-(void) | setValue:(id)aValue forKey:(CPString)aKey |
-(void) | setValue:(id)aValue forKeyPath:(CPString)aKeyPath |
-(void) | setValue:(id)aValue forUndefinedKey:(CPString)aKey |
-(Class) | superclass Returns the receiver's super class. |
-(id) | valueForKey:(CPString)aKey |
-(id) | valueForKeyPath:(CPString)aKeyPath |
-(id) | valueForUndefinedKey:(CPString)aKey |
Method Detail |
---|
+(void)initialize
+(BOOL)accessInstanceVariablesDirectly
+(id)alloc
+(Class)class
Class
object for this class definition.+(IMP)instanceMethodForSelector:(SEL)aSelector
aSelector
- the selector for the class method to return+(BOOL)instancesRespondToSelector:(SEL)aSelector
aSelector
- the selector for which to test the classYES
if instances of the class respond to the selector
+(BOOL)isSubclassOfClass:(Class)aClass
YES
if the receiving class is a subclass of aClass
.aClass
- the class to test inheritance from+(void)load
+(id)new
init
+(id)setVersion:(int)aVersion
aVersion
+(Class)superclass
+(int)version
-(id)init
-(id)autorelease
-(id)awakeAfterUsingCoder:(CPCoder)aCoder
CPCoder
.aCoder
- the coder that contained the receiver's data-(id)awakeAfterUsingCoder:(CPCoder)aDecoder
self
. Interested subclasses should override this.aDecoder
- -(void)awakeFromCib
-(Class)class
Class
-(Class)classForCoder
-(Class)classForKeyedArchiver
nil
means to ignore the method result.
-(CPString)className
-(id)copy
-(void)dealloc
-(CPString)description
-(void)doesNotRecognizeSelector:(SEL)aSelector
aSelector
-(void)forwardInvocation:(CPInvocation)anInvocation
methodSignatureForSelector:
allows the receiver to
forward messages for which it does not respond, to another object that does.anInvocation
-(unsigned)hash
-(BOOL)isEqual:(id)anObject
anObject
is functionally equivalent to the receiver.anObject
YES
if anObject
is functionally equivalent to the receiver.
-(BOOL)isKindOfClass:(Class)aClass
YES
if the receiver is a aClass
type, or a subtype of it.aClass
- the class to test as the receiver's class or super class.-(BOOL)isMemberOfClass:(Class)aClass
YES
if the receiver is of the aClass
class type.aClass
- the class to test the receiper-(BOOL)isProxy
YES
if the root object is a proxy
-(IMP)methodForSelector:(SEL)aSelector
aSelector
- the selector for the method to return-(CPMethodSignature)methodSignatureForSelector:(SEL)aSelector
aSelector
- the selector for which to find the method signature-(id)mutableCopy
-(id)performSelector:(SEL)aSelector
aSelector
- the message to send-(id)performSelector:(SEL)aSelector withObject:(id)anObject
aSelector
- the message to sendanObject
- the message argument-(id)performSelector:(SEL)aSelector withObject:(id)anObject withObject:(id)anotherObject
aSelector
- the message to sendanObject
- the first message argumentanotherObject
- the second message argument-(void)release
-(id)replacementObjectForArchiver:(CPArchiver)anArchiver
anArchiver
- that archiver-(id)replacementObjectForCoder:(CPCoder)aCoder
aCoder
- the coder-(id)replacementObjectForKeyedArchiver:(CPKeyedArchiver)anArchiver
anArchiver
-(BOOL)respondsToSelector:(SEL)aSelector
aSelector
- the selector for which to test the receiverYES
if the receiver responds to the selector
-(id)retain
-(id)self
-(void)setValue:(id)aValue forKey:(CPString)aKey
aValue
aKey
-(void)setValue:(id)aValue forKeyPath:(CPString)aKeyPath
aValue
aKeyPath
-(void)setValue:(id)aValue forUndefinedKey:(CPString)aKey
aValue
aKey
-(Class)superclass
-(id)valueForKey:(CPString)aKey
aKey
-(id)valueForKeyPath:(CPString)aKeyPath
aKeyPath
-(id)valueForUndefinedKey:(CPString)aKey
aKey
Created on Sat Sep 13 14:15:43 PDT 2008