Path: blob/master/thirdparty/metal-cpp/Metal/MTL4LibraryFunctionDescriptor.hpp
21072 views
//-------------------------------------------------------------------------------------------------------------------------------------------------------------1//2// Metal/MTL4LibraryFunctionDescriptor.hpp3//4// Copyright 2020-2025 Apple Inc.5//6// Licensed under the Apache License, Version 2.0 (the "License");7// you may not use this file except in compliance with the License.8// You may obtain a copy of the License at9//10// http://www.apache.org/licenses/LICENSE-2.011//12// Unless required by applicable law or agreed to in writing, software13// distributed under the License is distributed on an "AS IS" BASIS,14// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.15// See the License for the specific language governing permissions and16// limitations under the License.17//18//-------------------------------------------------------------------------------------------------------------------------------------------------------------1920#pragma once2122#include "../Foundation/Foundation.hpp"23#include "MTL4FunctionDescriptor.hpp"24#include "MTLDefines.hpp"25#include "MTLHeaderBridge.hpp"26#include "MTLPrivate.hpp"2728namespace MTL429{30class LibraryFunctionDescriptor;31}3233namespace MTL34{35class Library;36}3738namespace MTL439{40class LibraryFunctionDescriptor : public NS::Copying<LibraryFunctionDescriptor, FunctionDescriptor>41{42public:43static LibraryFunctionDescriptor* alloc();4445LibraryFunctionDescriptor* init();4647MTL::Library* library() const;4849NS::String* name() const;5051void setLibrary(const MTL::Library* library);5253void setName(const NS::String* name);54};5556}57_MTL_INLINE MTL4::LibraryFunctionDescriptor* MTL4::LibraryFunctionDescriptor::alloc()58{59return NS::Object::alloc<MTL4::LibraryFunctionDescriptor>(_MTL_PRIVATE_CLS(MTL4LibraryFunctionDescriptor));60}6162_MTL_INLINE MTL4::LibraryFunctionDescriptor* MTL4::LibraryFunctionDescriptor::init()63{64return NS::Object::init<MTL4::LibraryFunctionDescriptor>();65}6667_MTL_INLINE MTL::Library* MTL4::LibraryFunctionDescriptor::library() const68{69return Object::sendMessage<MTL::Library*>(this, _MTL_PRIVATE_SEL(library));70}7172_MTL_INLINE NS::String* MTL4::LibraryFunctionDescriptor::name() const73{74return Object::sendMessage<NS::String*>(this, _MTL_PRIVATE_SEL(name));75}7677_MTL_INLINE void MTL4::LibraryFunctionDescriptor::setLibrary(const MTL::Library* library)78{79Object::sendMessage<void>(this, _MTL_PRIVATE_SEL(setLibrary_), library);80}8182_MTL_INLINE void MTL4::LibraryFunctionDescriptor::setName(const NS::String* name)83{84Object::sendMessage<void>(this, _MTL_PRIVATE_SEL(setName_), name);85}868788