MCPcopy Create free account
hub / github.com/DragonJoker/RenderGraph / ContextObjectT

Class ContextObjectT

include/RenderGraph/FrameGraphStructs.hpp:311–338  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

309
310 template< typename VkTypeT >
311 struct ContextObjectT
312 {
313 ContextObjectT( ContextObjectT const & rhs ) = delete;
314 ContextObjectT( ContextObjectT && rhs )noexcept = delete;
315 ContextObjectT & operator=( ContextObjectT const & rhs ) = delete;
316 ContextObjectT & operator=( ContextObjectT && rhs )noexcept = delete;
317
318 explicit ContextObjectT( GraphContext & ctx
319 , VkTypeT obj = {}
320 , void( *dtor )( GraphContext &, VkTypeT & )noexcept = nullptr )
321 : context{ ctx }
322 , object{ obj }
323 , destroy{ dtor }
324 {
325 }
326
327 ~ContextObjectT()noexcept
328 {
329 if ( destroy && object )
330 {
331 destroy( context, object );
332 }
333 }
334
335 GraphContext & context;
336 VkTypeT object;
337 void ( *destroy )( GraphContext &, VkTypeT & )noexcept;
338 };
339
340 struct SemaphoreWait
341 {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected