yum-mirror/VkFFT
git clone https://git.yummers.dev/yum-mirror/VkFFT
ba7001c
master
1//------------------------------------------------------------------------------------------------------------------------------------------------------------- 2// 3// Metal/MTLDynamicLibrary.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#include "MTLDefines.hpp" 24#include "MTLHeaderBridge.hpp" 25#include "MTLPrivate.hpp" 26 27#include <Foundation/Foundation.hpp> 28 29namespace MTL 30{ 31_MTL_ENUM (NS ::UInteger ,DynamicLibraryError ) { 32DynamicLibraryErrorNone = 0 , 33DynamicLibraryErrorInvalidFile = 1 , 34DynamicLibraryErrorCompilationFailure = 2 , 35DynamicLibraryErrorUnresolvedInstallName = 3 , 36DynamicLibraryErrorDependencyLoadFailure = 4 , 37DynamicLibraryErrorUnsupported = 5 , 38}; 39 40class DynamicLibrary :public NS ::Referencing < DynamicLibrary > 41{ 42public : 43NS ::String * label ()const ; 44void setLabel (const NS ::String * label ); 45 46class Device * device ()const ; 47 48NS ::String * installName ()const ; 49 50bool serializeToURL (const NS ::URL * url ,NS ::Error ** error ); 51}; 52 53} 54 55// property: label 56_MTL_INLINE NS ::String * MTL ::DynamicLibrary ::label ()const 57{ 58return Object ::sendMessage < NS ::String *> (this ,_MTL_PRIVATE_SEL (label )); 59} 60 61_MTL_INLINE voidMTL ::DynamicLibrary ::setLabel (const NS ::String * label ) 62{ 63Object ::sendMessage < void > (this ,_MTL_PRIVATE_SEL (setLabel_ ),label ); 64} 65 66// property: device 67_MTL_INLINE MTL ::Device * MTL ::DynamicLibrary ::device ()const 68{ 69return Object ::sendMessage < MTL ::Device *> (this ,_MTL_PRIVATE_SEL (device )); 70} 71 72// property: installName 73_MTL_INLINE NS ::String * MTL ::DynamicLibrary ::installName ()const 74{ 75return Object ::sendMessage < NS ::String *> (this ,_MTL_PRIVATE_SEL (installName )); 76} 77 78// method: serializeToURL:error: 79_MTL_INLINE boolMTL ::DynamicLibrary ::serializeToURL (const NS ::URL * url ,NS ::Error ** error ) 80{ 81return Object ::sendMessage < bool > (this ,_MTL_PRIVATE_SEL (serializeToURL_error_ ),url ,error ); 82}