yum-mirror/VkFFT
git clone https://git.yummers.dev/yum-mirror/VkFFT
ba7001c
develop
1//------------------------------------------------------------------------------------------------------------------------------------------------------------- 2// 3// Foundation/NSDictionary.hpp 4// 5// Copyright 2020-2021 Apple Inc. 6// 7// Licensed under the Apache License, Version 2.0 (the "License"); 8// you may not use this file except in compliance with the License. 9// You may obtain a copy of the License at 10// 11// http://www.apache.org/licenses/LICENSE-2.0 12// 13// Unless required by applicable law or agreed to in writing, software 14// distributed under the License is distributed on an "AS IS" BASIS, 15// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16// See the License for the specific language governing permissions and 17// limitations under the License. 18// 19//------------------------------------------------------------------------------------------------------------------------------------------------------------- 20 21#pragma once 22 23//------------------------------------------------------------------------------------------------------------------------------------------------------------- 24 25#include "NSEnumerator.hpp" 26#include "NSObject.hpp" 27#include "NSTypes.hpp" 28 29//------------------------------------------------------------------------------------------------------------------------------------------------------------- 30 31namespace NS 32{ 33class Dictionary :public NS ::Copying < Dictionary > 34{ 35public : 36static Dictionary * dictionary (); 37static Dictionary * dictionary (const Object * pObject ,const Object * pKey ); 38static Dictionary * dictionary (const Object * const * pObjects ,const Object * const * pKeys ,UInteger count ); 39 40static Dictionary * alloc (); 41 42Dictionary * init (); 43Dictionary * init (const Object * const * pObjects ,const Object * const * pKeys ,UInteger count ); 44Dictionary * init (const class Coder * pCoder ); 45 46template < class _KeyType = Object > 47Enumerator < _KeyType >* keyEnumerator ()const ; 48 49template < class _Object = Object > 50_Object * object (const Object * pKey )const ; 51UInteger count ()const ; 52}; 53} 54 55//------------------------------------------------------------------------------------------------------------------------------------------------------------- 56 57_NS_INLINE NS ::Dictionary * NS ::Dictionary ::dictionary () 58{ 59return Object ::sendMessage < Dictionary *> (_NS_PRIVATE_CLS (NSDictionary ),_NS_PRIVATE_SEL (dictionary )); 60} 61 62//------------------------------------------------------------------------------------------------------------------------------------------------------------- 63 64_NS_INLINE NS ::Dictionary * NS ::Dictionary ::dictionary (const Object * pObject ,const Object * pKey ) 65{ 66return Object ::sendMessage < Dictionary *> (_NS_PRIVATE_CLS (NSDictionary ),_NS_PRIVATE_SEL (dictionaryWithObject_forKey_ ),pObject ,pKey ); 67} 68 69//------------------------------------------------------------------------------------------------------------------------------------------------------------- 70 71_NS_INLINE NS ::Dictionary * NS ::Dictionary ::dictionary (const Object * const * pObjects ,const Object * const * pKeys ,UInteger count ) 72{ 73return Object ::sendMessage < Dictionary *> (_NS_PRIVATE_CLS (NSDictionary ),_NS_PRIVATE_SEL (dictionaryWithObjects_forKeys_count_ ), 74pObjects ,pKeys ,count ); 75} 76 77//------------------------------------------------------------------------------------------------------------------------------------------------------------- 78 79_NS_INLINE NS ::Dictionary * NS ::Dictionary ::alloc () 80{ 81return NS ::Object ::alloc < Dictionary > (_NS_PRIVATE_CLS (NSDictionary )); 82} 83 84//------------------------------------------------------------------------------------------------------------------------------------------------------------- 85 86_NS_INLINE NS ::Dictionary * NS ::Dictionary ::init () 87{ 88return NS ::Object ::init < Dictionary > (); 89} 90 91//------------------------------------------------------------------------------------------------------------------------------------------------------------- 92 93_NS_INLINE NS ::Dictionary * NS ::Dictionary ::init (const Object * const * pObjects ,const Object * const * pKeys ,UInteger count ) 94{ 95return Object ::sendMessage < Dictionary *> (this ,_NS_PRIVATE_SEL (initWithObjects_forKeys_count_ ),pObjects ,pKeys ,count ); 96} 97 98//------------------------------------------------------------------------------------------------------------------------------------------------------------- 99 100_NS_INLINE NS ::Dictionary * NS ::Dictionary ::init (const class Coder * pCoder ) 101{ 102return Object ::sendMessage < Dictionary *> (this ,_NS_PRIVATE_SEL (initWithCoder_ ),pCoder ); 103} 104 105//------------------------------------------------------------------------------------------------------------------------------------------------------------- 106 107template < class _KeyType > 108_NS_INLINE NS ::Enumerator < _KeyType >* NS ::Dictionary ::keyEnumerator ()const 109{ 110return Object ::sendMessage < Enumerator < _KeyType >*> (this ,_NS_PRIVATE_SEL (keyEnumerator )); 111} 112 113//------------------------------------------------------------------------------------------------------------------------------------------------------------- 114 115template < class _Object > 116_NS_INLINE _Object * NS ::Dictionary ::object (const Object * pKey )const 117{ 118return Object ::sendMessage < _Object *> (this ,_NS_PRIVATE_SEL (objectForKey_ ),pKey ); 119} 120 121//------------------------------------------------------------------------------------------------------------------------------------------------------------- 122 123_NS_INLINE NS ::UInteger NS ::Dictionary ::count ()const 124{ 125return Object ::sendMessage < UInteger > (this ,_NS_PRIVATE_SEL (count )); 126} 127 128//-------------------------------------------------------------------------------------------------------------------------------------------------------------