Skip to content

Commit 6cb4956

Browse files
author
devsh
committed
system::to_string for IAsset::E_TYPE
1 parent 3344a58 commit 6cb4956

File tree

1 file changed

+68
-0
lines changed

1 file changed

+68
-0
lines changed

include/nbl/asset/IAsset.h

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,4 +194,72 @@ concept Asset = std::is_base_of_v<IAsset,T>;
194194

195195
}
196196

197+
namespace nbl::system::impl
198+
{
199+
template<>
200+
struct to_string_helper<asset::IAsset::E_TYPE>
201+
{
202+
private:
203+
using enum_t = asset::IAsset::E_TYPE;
204+
205+
public:
206+
static inline std::string __call(const enum_t value)
207+
{
208+
switch (value)
209+
{
210+
case enum_t::ET_BUFFER:
211+
return "ICPUBuffer";
212+
case enum_t::ET_BUFFER_VIEW:
213+
return "ICPUBufferView";
214+
case enum_t::ET_SAMPLER:
215+
return "ICPUSampler";
216+
case enum_t::ET_IMAGE:
217+
return "ICPUImage";
218+
case enum_t::ET_IMAGE_VIEW:
219+
return "ICPUImageView";
220+
case enum_t::ET_DESCRIPTOR_SET:
221+
return "ICPUDescriptorSet";
222+
case enum_t::ET_DESCRIPTOR_SET_LAYOUT:
223+
return "ICPUDescriptorSetLayout";
224+
case enum_t::ET_SKELETON:
225+
return "ICPUSkeleton";
226+
case enum_t::ET_ANIMATION_LIBRARY:
227+
return "ICPUAnimationLibrary";
228+
case enum_t::ET_PIPELINE_LAYOUT:
229+
return "ICPUPipelineLayout";
230+
case enum_t::ET_SHADER:
231+
return "IShader";
232+
case enum_t::ET_GEOMETRY:
233+
return "IGeometry<ICPUBuffer>";
234+
case enum_t::ET_RENDERPASS:
235+
return "ICPURenderpass";
236+
case enum_t::ET_FRAMEBUFFER:
237+
return "ICPUFramebuffer";
238+
case enum_t::ET_GRAPHICS_PIPELINE:
239+
return "ICPUGraphicsPipeline";
240+
case enum_t::ET_BOTOM_LEVEL_ACCELERATION_STRUCTURE:
241+
return "ICPUBottomLevelAccelerationStructure";
242+
case enum_t::ET_TOP_LEVEL_ACCELERATION_STRUCTURE:
243+
return "ICPUTopLevelAccelerationStructure";
244+
case enum_t::ET_GEOMETRY_COLLECTION:
245+
return "ICPUGeometryCollection";
246+
case enum_t::ET_MORPH_TARGETS:
247+
return "ICPUMorphTargets";
248+
case enum_t::ET_COMPUTE_PIPELINE:
249+
return "ICPUComputePipeline";
250+
case enum_t::ET_PIPELINE_CACHE:
251+
return "ICPUPipelineCache";
252+
case enum_t::ET_SCENE:
253+
return "ICPUScene";
254+
case enum_t::ET_RAYTRACING_PIPELINE:
255+
return "ICPURayTracingPipeline";
256+
case enum_t::ET_IMPLEMENTATION_SPECIFIC_METADATA:
257+
return "";
258+
default:
259+
break;
260+
}
261+
return "";
262+
}
263+
};
264+
}
197265
#endif

0 commit comments

Comments
 (0)