MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / GPUResourceProperty

Class GPUResourceProperty

Source/Engine/Graphics/GPUResourceProperty.h:37–164  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35/// </summary>
36template<typename T = GPUResource>
37class GPUResourceProperty : public GPUResourcePropertyBase
38{
39public:
40 /// <summary>
41 /// Initializes a new instance of the <see cref="GPUResourceProperty"/> class.
42 /// </summary>
43 GPUResourceProperty()
44 {
45 }
46
47 /// <summary>
48 /// Initializes a new instance of the <see cref="GPUResourceProperty"/> class.
49 /// </summary>
50 /// <param name="resource">The resource.</param>
51 GPUResourceProperty(T* resource)
52 {
53 OnSet(resource);
54 }
55
56 /// <summary>
57 /// Initializes a new instance of the <see cref="GPUResourceProperty"/> class.
58 /// </summary>
59 /// <param name="other">The other value.</param>
60 GPUResourceProperty(const GPUResourceProperty& other)
61 {
62 OnSet(other.Get());
63 }
64
65 /// <summary>
66 /// Initializes a new instance of the <see cref="GPUResourceProperty"/> class.
67 /// </summary>
68 /// <param name="other">The other value.</param>
69 GPUResourceProperty(GPUResourceProperty&& other)
70 {
71 OnSet(other.Get());
72 other.OnSet(nullptr);
73 }
74
75 GPUResourceProperty& operator=(GPUResourceProperty&& other)
76 {
77 if (&other != this)
78 {
79 OnSet(other._resource);
80 other.OnSet(nullptr);
81 }
82 return *this;
83 }
84
85 /// <summary>
86 /// Finalizes an instance of the <see cref="GPUResourceProperty"/> class.
87 /// </summary>
88 ~GPUResourceProperty()
89 {
90 }
91
92public:
93 FORCE_INLINE bool operator==(T* other) const
94 {

Callers

nothing calls this directly

Calls 2

OnSetFunction · 0.85
OnSetMethod · 0.45

Tested by

no test coverage detected