mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 16:30:41 +00:00
Add description methods.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@2408 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
df050acf75
commit
0bcb15c30f
4 changed files with 39 additions and 3 deletions
|
@ -23,6 +23,7 @@
|
|||
|
||||
#include <Foundation/NSConcreteValue.h>
|
||||
#include <Foundation/NSString.h>
|
||||
#include <Foundation/NSData.h>
|
||||
#include <Foundation/NSException.h>
|
||||
#include <Foundation/NSCoder.h>
|
||||
#include <Foundation/NSZone.h>
|
||||
|
@ -138,6 +139,16 @@
|
|||
return *((NSPoint *)data);
|
||||
}
|
||||
|
||||
- (NSString *) description
|
||||
{
|
||||
int size;
|
||||
NSData *rep;
|
||||
|
||||
size = objc_sizeof_type([objctype cString]);
|
||||
rep = [NSData dataWithBytes: data length: size];
|
||||
return [NSString stringWithFormat: @"(%@) %@", objctype, [rep description]];
|
||||
}
|
||||
|
||||
// NSCoding
|
||||
- (void)encodeWithCoder:(NSCoder *)coder
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue