MCPcopy Create free account
hub / github.com/KhronosGroup/Vulkan-Samples / insert

Method insert

framework/debug_info.h:186–204  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

184 */
185 template <template <typename> class C, typename T, typename... A>
186 void insert(const std::string &label, A &&...args)
187 {
188 static_assert(std::is_base_of<field::Base, C<T>>::value, "C is not a type of field::Base.");
189
190 for (auto &field : fields)
191 {
192 if (field->label == label)
193 {
194 if (dynamic_cast<typename field::template Static<T> *>(field.get()))
195 {
196 field = std::make_unique<C<T>>(label, args...);
197 }
198 return;
199 }
200 }
201
202 auto field = std::make_unique<C<T>>(label, std::forward<A>(args)...);
203 fields.push_back(std::move(field));
204 }
205
206 private:
207 std::vector<std::unique_ptr<field::Base>> fields;

Callers 15

prepare_meshletsFunction · 0.45
load_sceneMethod · 0.45
load_modelMethod · 0.45
recreate_swapchainMethod · 0.45
prepareMethod · 0.45
create_render_targetMethod · 0.45
update_texturesMethod · 0.45
update_texturesMethod · 0.45
update_pipelinesMethod · 0.45

Calls 1

getMethod · 0.45

Tested by

no test coverage detected