Release 1.0 Copyright ©1994 by Don Yacktman. All Rights Reserved.
Object (MiscRuntimeExtensions) |
Declared In: | <misckit/MiscRuntimeExtensions.h> |
Category Description |
Method Types |
Determining the size of an object | ![]() ![]() ![]() | |
Changing an object's class | ![]() | |
Comparing objects | ![]() |
Class Methods |
instanceSize |
+ (int)instanceSize |
Returns the size of an instance of the receiving class. Note that an Objective-C class is represented by the compiler as a C structure. This method returns the size of that structure, but does not return any information about data that instance variables may point to, which means that memory allocated by this object is not taken into consideration. |
Instance Methods |
becomeClass |
- becomeClass:aClass |
- (int)compare:anObject |
Attempts to compare two objects. Returns zero (0) if they compare as "equal", one (1) if the receiver is "greater" than
anObject or a negative one (-1) if the receiver is "less" than anObject. The default implementation attempts to
compare string values (as obtained with -stringValue) of two objects. Subclasses should override this if there is a
more useful comparison possible.
See also: - isEqual: (Object), strcmp()
|
- (int)instanceSize |
- (int)sizeOf |
Returns the size of an instance. This may be overridden to take into account the space taken up by allocated memory such as string pointers and objects pointed to (in composite objects). |