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

Class SoftAssetReference

Source/Engine/Content/SoftAssetReference.h:65–250  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

63/// </summary>
64template<typename T>
65API_CLASS(InBuild) class SoftAssetReference : public SoftAssetReferenceBase
66{
67public:
68 typedef T AssetType;
69 typedef SoftAssetReference<T> Type;
70
71public:
72 /// <summary>
73 /// Initializes a new instance of the <see cref="SoftAssetReference"/> class.
74 /// </summary>
75 SoftAssetReference()
76 {
77 }
78
79 /// <summary>
80 /// Initializes a new instance of the <see cref="SoftAssetReference"/> class.
81 /// </summary>
82 explicit SoftAssetReference(decltype(__nullptr))
83 {
84 }
85
86 /// <summary>
87 /// Initializes a new instance of the <see cref="SoftAssetReference"/> class.
88 /// </summary>
89 /// <param name="asset">The asset to set.</param>
90 SoftAssetReference(T* asset)
91 {
92 OnSet(asset);
93 }
94
95 /// <summary>
96 /// Initializes a new instance of the <see cref="SoftAssetReference"/> class.
97 /// </summary>
98 /// <param name="other">The other.</param>
99 SoftAssetReference(const SoftAssetReference& other)
100 {
101 OnSet(other.GetID());
102 }
103
104 SoftAssetReference(const Guid& id)
105 {
106 OnSet(id);
107 }
108
109 SoftAssetReference(SoftAssetReference&& other)
110 {
111 OnSet(other.GetID());
112 other.OnSet(Guid::Empty);
113 }
114
115 /// <summary>
116 /// Finalizes an instance of the <see cref="SoftAssetReference"/> class.
117 /// </summary>
118 ~SoftAssetReference()
119 {
120 }
121
122public:

Callers

nothing calls this directly

Calls 3

OnSetFunction · 0.85
GetIDMethod · 0.80
OnSetMethod · 0.45

Tested by

no test coverage detected