Path: blob/master/thirdparty/metal-cpp/Metal/MTL4LibraryDescriptor.hpp
21066 views
//-------------------------------------------------------------------------------------------------------------------------------------------------------------1//2// Metal/MTL4LibraryDescriptor.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 "MTLDefines.hpp"24#include "MTLHeaderBridge.hpp"25#include "MTLPrivate.hpp"2627namespace MTL428{29class LibraryDescriptor;30}3132namespace MTL33{34class CompileOptions;35}3637namespace MTL438{39class LibraryDescriptor : public NS::Copying<LibraryDescriptor>40{41public:42static LibraryDescriptor* alloc();4344LibraryDescriptor* init();4546NS::String* name() const;4748MTL::CompileOptions* options() const;4950void setName(const NS::String* name);5152void setOptions(const MTL::CompileOptions* options);5354void setSource(const NS::String* source);55NS::String* source() const;56};5758}59_MTL_INLINE MTL4::LibraryDescriptor* MTL4::LibraryDescriptor::alloc()60{61return NS::Object::alloc<MTL4::LibraryDescriptor>(_MTL_PRIVATE_CLS(MTL4LibraryDescriptor));62}6364_MTL_INLINE MTL4::LibraryDescriptor* MTL4::LibraryDescriptor::init()65{66return NS::Object::init<MTL4::LibraryDescriptor>();67}6869_MTL_INLINE NS::String* MTL4::LibraryDescriptor::name() const70{71return Object::sendMessage<NS::String*>(this, _MTL_PRIVATE_SEL(name));72}7374_MTL_INLINE MTL::CompileOptions* MTL4::LibraryDescriptor::options() const75{76return Object::sendMessage<MTL::CompileOptions*>(this, _MTL_PRIVATE_SEL(options));77}7879_MTL_INLINE void MTL4::LibraryDescriptor::setName(const NS::String* name)80{81Object::sendMessage<void>(this, _MTL_PRIVATE_SEL(setName_), name);82}8384_MTL_INLINE void MTL4::LibraryDescriptor::setOptions(const MTL::CompileOptions* options)85{86Object::sendMessage<void>(this, _MTL_PRIVATE_SEL(setOptions_), options);87}8889_MTL_INLINE void MTL4::LibraryDescriptor::setSource(const NS::String* source)90{91Object::sendMessage<void>(this, _MTL_PRIVATE_SEL(setSource_), source);92}9394_MTL_INLINE NS::String* MTL4::LibraryDescriptor::source() const95{96return Object::sendMessage<NS::String*>(this, _MTL_PRIVATE_SEL(source));97}9899100