We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 2594b01 + b362c82 commit 30f8c34Copy full SHA for 30f8c34
1 file changed
include/vsg/core/Object.h
@@ -283,4 +283,15 @@ namespace vsg
283
return new_object.template cast<T>();
284
}
285
286
+ /// clone a named meta data object stored within an object's Auxliary object if available, others default construct object
287
+ template<class T, class C>
288
+ ref_ptr<T> clone(const std::string& key, C container)
289
+ {
290
+ if (container)
291
292
+ if (auto prototype = container->template getRefObject<T>(key)) return vsg::clone(prototype);
293
+ }
294
+ return T::create();
295
296
+
297
} // namespace vsg
0 commit comments