21
21
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
23
23
<title>NSClassDescription class reference</title>
24
$Date: 2002/02/12 12:33:57 $ $Revision: 1.6 $
24
$Date: 2005/02/22 11:22:43 $ $Revision: 1.9 $
27
#include <Foundation/NSClassDescription.h>
28
#include <Foundation/NSLock.h>
29
#include <Foundation/NSMapTable.h>
30
#include <Foundation/NSNotification.h>
27
#include "Foundation/NSClassDescription.h"
28
#include "Foundation/NSLock.h"
29
#include "Foundation/NSMapTable.h"
30
#include "Foundation/NSNotification.h"
34
* Each instance of this class provides descriptive information for an
35
* Objective C class. This is used for key-value coding, a framework
36
* used in Cocoa for scripting with Objective-C objects. Scripting is
37
* available in GNUstep using Guile, however that implementation does
38
* not make use of class descriptions. Therefore the primary purpose
39
* of this class is to smooth the process of porting between GNUstep
40
* and other OpenStep-derived systems.
33
42
@implementation NSClassDescription
35
44
static NSRecursiveLock *mapLock = nil;
36
45
static NSMapTable *classMap;
39
* Returns the class descriptuion for aClass. If there is no such description
40
* available, sends an NSClassDescriptionNeededForClassNotification (with
41
* aClass as its object) so that objects providing class descriptions can
42
* register one, and tries again to find one.<br />
43
* Returns nil if there is no description found.<br />
44
* Handles locking to ensure thread safety and ensures that the returned
45
* object will not be destroyed by other threads.
48
* Returns the class description for aClass. If there is no such description
50
* <code>NSClassDescriptionNeededForClassNotification</code> (with aClass as
51
* its object) so that objects providing class descriptions can register one,
52
* and tries again to find one.<br /> Returns nil if there is no description
53
* found.<br /> Handles locking to ensure thread safety and ensures that the
54
* returned object will not be destroyed by other threads.
47
56
+ (NSClassDescription*) classDescriptionForClass: (Class)aClass