mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 00:30:53 +00:00
Implement -className
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@13806 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
5fb6293cdf
commit
70471a39f7
3 changed files with 45 additions and 17 deletions
|
@ -802,6 +802,30 @@ static BOOL double_release_check_enabled = NO;
|
|||
return [[self alloc] init];
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the class of which the receiver is an instance.<br />
|
||||
* The default implementation returns the private <code>isa</code>
|
||||
* instance variable of NSObject, which is used to store a pointer
|
||||
* to the objects class.<br />
|
||||
* NB. When NSZombie is enabled (see NSDebug.h) this pointer is
|
||||
* changed upon object deallocation.
|
||||
*/
|
||||
- (Class) class
|
||||
{
|
||||
return object_get_class(self);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the name of the class of the receiving object by using
|
||||
* the NSStringFromClass() function.<br />
|
||||
* This is a MacOS-X addition for apple scripting, which is also
|
||||
* generally useful.
|
||||
*/
|
||||
- (NSString*) className
|
||||
{
|
||||
return NSStringFromClass([self class]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates and returns a copy of the reciever by calling -copyWithZone:
|
||||
* passing NSDefaultMallocZone()
|
||||
|
@ -1164,19 +1188,6 @@ static BOOL double_release_check_enabled = NO;
|
|||
return self;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the class of which the receiver is an instance.<br />
|
||||
* The default implementation returns the private <code>isa</code>
|
||||
* instance variable of NSObject, which is used to store a pointer
|
||||
* to the objects class.<br />
|
||||
* NB. When NSZombie is enabled (see NSDebug.h) this pointer is
|
||||
* changed upon object deallocation.
|
||||
*/
|
||||
- (Class) class
|
||||
{
|
||||
return object_get_class(self);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the hash of the receiver. Subclasses should ensure that their
|
||||
* implementations of this method obey the rule that if the -isEqual: method
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue