MusicKit
0.0.0
|
00001 /* 00002 $Id$ 00003 Defined In: The MusicKit 00004 00005 Description: 00006 Private class. 00007 00008 Original Author: David A. Jaffe 00009 00010 Copyright (c) 1988-1992, NeXT Computer, Inc. 00011 Portions Copyright (c) 1994 NeXT Computer, Inc. and reproduced under license from NeXT 00012 Portions Copyright (c) 1994 Stanford University 00013 Portions Copyright (c) 1999-2000 The MusicKit Project. 00014 */ 00015 #ifndef __MK__SharedSynthInfo_H___ 00016 #define __MK__SharedSynthInfo_H___ 00017 00018 #import <Foundation/NSObject.h> 00019 #import <Foundation/NSDictionary.h> 00020 00021 @interface _SharedSynthInfo : NSObject 00022 { 00023 id synthObject; /* The value we're interested in finding. */ 00024 NSMutableArray *theList; /* Back pointer to the NSMutableArray of values that match the keyObj. */ 00025 id theKeyObject; /* Back pointer to key object. */ 00026 MKOrchMemSegment segment; /* Which segment or MK_noSegment for wildcard. */ 00027 int length; /* Or 0 for wild card */ 00028 int referenceCount; 00029 MKOrchSharedType type; /* Which type or MK_noOrchSharedType for wildcard. */ 00030 } 00031 00032 @end 00033 00034 /* _SharedSynthKey functions */ 00035 extern BOOL _MKCollectSharedDataGarbage(id orch, NSHashTable *garbageTable); 00036 extern NSHashTable *_MKGetSharedSynthGarbage(MKOrchestra *self); 00037 extern BOOL _MKInstallSharedObject(NSMutableDictionary* _sharedSet, id aSynthObj, id aKeyObj, 00038 MKOrchMemSegment whichSegment, int howLong, 00039 MKOrchSharedType type); 00040 extern id _MKFindSharedSynthObj(NSMutableDictionary* sharedSet, NSHashTable *garbageTable, id aKeyObj, 00041 MKOrchMemSegment whichSegment, int howLong, MKOrchSharedType type); 00042 extern void _MKAddSharedSynthClaim(_SharedSynthInfo *aKey); 00043 extern id _MKFreeSharedSet(NSMutableDictionary *sharedSet, NSHashTable **garbageTable); 00044 extern NSMutableDictionary* _MKNewSharedSet(NSHashTable **garbageTable); 00045 extern BOOL _MKReleaseSharedSynthClaim(_SharedSynthInfo *aKey, BOOL lazy); 00046 extern int _MKGetSharedSynthReferenceCount(_SharedSynthInfo *sharedSynthKey); 00047 00048 #endif