MTLLinkedFunctions.hpp
1 //------------------------------------------------------------------------------------------------------------------------------------------------------------- 2 // 3 // Metal/MTLLinkedFunctions.hpp 4 // 5 // Copyright 2020-2024 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 29 namespace MTL 30 { 31 class LinkedFunctions : public NS::Copying<LinkedFunctions> 32 { 33 public: 34 static class LinkedFunctions* alloc(); 35 36 class LinkedFunctions* init(); 37 38 static class LinkedFunctions* linkedFunctions(); 39 40 NS::Array* functions() const; 41 void setFunctions(const NS::Array* functions); 42 43 NS::Array* binaryFunctions() const; 44 void setBinaryFunctions(const NS::Array* binaryFunctions); 45 46 NS::Dictionary* groups() const; 47 void setGroups(const NS::Dictionary* groups); 48 49 NS::Array* privateFunctions() const; 50 void setPrivateFunctions(const NS::Array* privateFunctions); 51 }; 52 53 } 54 55 // static method: alloc 56 _MTL_INLINE MTL::LinkedFunctions* MTL::LinkedFunctions::alloc() 57 { 58 return NS::Object::alloc<MTL::LinkedFunctions>(_MTL_PRIVATE_CLS(MTLLinkedFunctions)); 59 } 60 61 // method: init 62 _MTL_INLINE MTL::LinkedFunctions* MTL::LinkedFunctions::init() 63 { 64 return NS::Object::init<MTL::LinkedFunctions>(); 65 } 66 67 // static method: linkedFunctions 68 _MTL_INLINE MTL::LinkedFunctions* MTL::LinkedFunctions::linkedFunctions() 69 { 70 return Object::sendMessage<MTL::LinkedFunctions*>(_MTL_PRIVATE_CLS(MTLLinkedFunctions), _MTL_PRIVATE_SEL(linkedFunctions)); 71 } 72 73 // property: functions 74 _MTL_INLINE NS::Array* MTL::LinkedFunctions::functions() const 75 { 76 return Object::sendMessage<NS::Array*>(this, _MTL_PRIVATE_SEL(functions)); 77 } 78 79 _MTL_INLINE void MTL::LinkedFunctions::setFunctions(const NS::Array* functions) 80 { 81 Object::sendMessage<void>(this, _MTL_PRIVATE_SEL(setFunctions_), functions); 82 } 83 84 // property: binaryFunctions 85 _MTL_INLINE NS::Array* MTL::LinkedFunctions::binaryFunctions() const 86 { 87 return Object::sendMessage<NS::Array*>(this, _MTL_PRIVATE_SEL(binaryFunctions)); 88 } 89 90 _MTL_INLINE void MTL::LinkedFunctions::setBinaryFunctions(const NS::Array* binaryFunctions) 91 { 92 Object::sendMessage<void>(this, _MTL_PRIVATE_SEL(setBinaryFunctions_), binaryFunctions); 93 } 94 95 // property: groups 96 _MTL_INLINE NS::Dictionary* MTL::LinkedFunctions::groups() const 97 { 98 return Object::sendMessage<NS::Dictionary*>(this, _MTL_PRIVATE_SEL(groups)); 99 } 100 101 _MTL_INLINE void MTL::LinkedFunctions::setGroups(const NS::Dictionary* groups) 102 { 103 Object::sendMessage<void>(this, _MTL_PRIVATE_SEL(setGroups_), groups); 104 } 105 106 // property: privateFunctions 107 _MTL_INLINE NS::Array* MTL::LinkedFunctions::privateFunctions() const 108 { 109 return Object::sendMessage<NS::Array*>(this, _MTL_PRIVATE_SEL(privateFunctions)); 110 } 111 112 _MTL_INLINE void MTL::LinkedFunctions::setPrivateFunctions(const NS::Array* privateFunctions) 113 { 114 Object::sendMessage<void>(this, _MTL_PRIVATE_SEL(setPrivateFunctions_), privateFunctions); 115 }