-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathIFactory.h
More file actions
29 lines (26 loc) · 1 KB
/
IFactory.h
File metadata and controls
29 lines (26 loc) · 1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#pragma once
namespace Platform::Interfaces {
template <typename...>
struct IFactory;
/// <summary>
/// <para>Defines a factory that produces instances of a specific type.</para>
/// <para>Определяет фабрику, которая производит экземпляры определенного типа.</para>
/// </summary>
/// <typeparam name="TProduct">
/// <para>Type of produced instances.</para>
/// <para>Тип производимых экземпляров.</para>
/// </typeparam>
template <typename TProduct>
struct IFactory<TProduct> {
/// <summary>
/// <para>Creates an instance of TProduct type.</para>
/// <para>Создает экземпляр типа TProduct.</para>
/// </summary>
/// <returns>
/// <para>The instance of TProduct type.</para>
/// <para>Экземпляр типа TProduct.</para>
/// </returns>
virtual TProduct Create() = 0;
virtual ~IFactory() = default;
};
} // namespace Platform::Interfaces