diff --git a/Core/StandardSamples/IFactory.h b/Core/StandardSamples/IFactory.h index f0a0396253c2eadd910ba9dbd902092d11fa6658..7e88f7049dce8110470320db868e1eb5b4e5e0ee 100644 --- a/Core/StandardSamples/IFactory.h +++ b/Core/StandardSamples/IFactory.h @@ -98,6 +98,12 @@ protected: DescriptionMap_t m_descriptions; //!< map of correspondence of objectsId and description }; +//! Returns new instance of class T. +//! +//! This templated function is used in catalogues in form of a function pointer +//! 'create_new<T>', with no function arguments supplied. Equivalently, we could +//! use a lambda function '[](){return new T;}'. + template <class T> T* create_new() { return new T();