Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
godotengine
GitHub Repository: godotengine/godot
Path: blob/master/thirdparty/metal-cpp/Metal/MTL4LibraryFunctionDescriptor.hpp
21072 views
1
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
2
//
3
// Metal/MTL4LibraryFunctionDescriptor.hpp
4
//
5
// Copyright 2020-2025 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 "../Foundation/Foundation.hpp"
24
#include "MTL4FunctionDescriptor.hpp"
25
#include "MTLDefines.hpp"
26
#include "MTLHeaderBridge.hpp"
27
#include "MTLPrivate.hpp"
28
29
namespace MTL4
30
{
31
class LibraryFunctionDescriptor;
32
}
33
34
namespace MTL
35
{
36
class Library;
37
}
38
39
namespace MTL4
40
{
41
class LibraryFunctionDescriptor : public NS::Copying<LibraryFunctionDescriptor, FunctionDescriptor>
42
{
43
public:
44
static LibraryFunctionDescriptor* alloc();
45
46
LibraryFunctionDescriptor* init();
47
48
MTL::Library* library() const;
49
50
NS::String* name() const;
51
52
void setLibrary(const MTL::Library* library);
53
54
void setName(const NS::String* name);
55
};
56
57
}
58
_MTL_INLINE MTL4::LibraryFunctionDescriptor* MTL4::LibraryFunctionDescriptor::alloc()
59
{
60
return NS::Object::alloc<MTL4::LibraryFunctionDescriptor>(_MTL_PRIVATE_CLS(MTL4LibraryFunctionDescriptor));
61
}
62
63
_MTL_INLINE MTL4::LibraryFunctionDescriptor* MTL4::LibraryFunctionDescriptor::init()
64
{
65
return NS::Object::init<MTL4::LibraryFunctionDescriptor>();
66
}
67
68
_MTL_INLINE MTL::Library* MTL4::LibraryFunctionDescriptor::library() const
69
{
70
return Object::sendMessage<MTL::Library*>(this, _MTL_PRIVATE_SEL(library));
71
}
72
73
_MTL_INLINE NS::String* MTL4::LibraryFunctionDescriptor::name() const
74
{
75
return Object::sendMessage<NS::String*>(this, _MTL_PRIVATE_SEL(name));
76
}
77
78
_MTL_INLINE void MTL4::LibraryFunctionDescriptor::setLibrary(const MTL::Library* library)
79
{
80
Object::sendMessage<void>(this, _MTL_PRIVATE_SEL(setLibrary_), library);
81
}
82
83
_MTL_INLINE void MTL4::LibraryFunctionDescriptor::setName(const NS::String* name)
84
{
85
Object::sendMessage<void>(this, _MTL_PRIVATE_SEL(setName_), name);
86
}
87
88