| 63 | /// </summary> |
| 64 | template<typename T> |
| 65 | API_CLASS(InBuild) class SoftAssetReference : public SoftAssetReferenceBase |
| 66 | { |
| 67 | public: |
| 68 | typedef T AssetType; |
| 69 | typedef SoftAssetReference<T> Type; |
| 70 | |
| 71 | public: |
| 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 | |
| 122 | public: |