NSHashInsertKnownAbsent
エレメントを指定したハッシュテーブルに追加します
void NSHashInsertKnownAbsent ( NSHashTable * table , const void * pointer );
解説
エレメントを指定したハッシュテーブルに追加します。
返り値
引数
( NSHashTable * )table
( const void * )pointer
フレームワーク
Foundation
クラス
NSHashInsertKnownAbsent
Function
使用可能
10.0
参照
NSHashRemove
NSHashInsert
NSHashInsertIfAbsent
例文
#import "MyObject.h" @implementation MyObject - (IBAction)myAction:(id)sender { NSHashTable *hTable = NSCreateHashTable(NSNonOwnedPointerHashCallBacks, 10); NSHashInsert(hTable, @"aaa"); NSHashInsert(hTable, @"bbb"); NSHashInsert(hTable, @"ccc"); NSLog([NSString stringWithFormat:@"%d",sizeof(hTable)]); NSLog(NSStringFromHashTable(hTable)); NSHashInsertKnownAbsent(hTable, @"ddd"); NSLog(NSStringFromHashTable(hTable)); } @end