You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Docs/advanced-guides/using-factories.rst
+2-3Lines changed: 2 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -2,11 +2,10 @@ Using Factories
2
2
========================================
3
3
4
4
Factory functor can be provided to manually create a service.
5
-
Functor should return unique_ptr and as an argument should optionally take other services ().
6
-
Functor scheme (Services...) -> std::unique_ptr
5
+
Functor should return unique_ptr or T if object is movable/copyable and should optionally take other services as arguments.
6
+
Functor scheme (Services...) -> std::unique_ptr< T> | T
7
7
Where Services are pointers, in place objects (if object is movable or copyable), unique pointers, references, vectors with pointers or unique pointers
Copy file name to clipboardExpand all lines: Docs/basic-guides/services-lifetime.rst
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
Services LifeTime
2
2
========================================
3
3
4
-
Service providers can create scoped validInstance providers:
4
+
Service providers can create scoped service providers:
5
5
6
6
.. code-block:: cpp
7
7
@@ -11,7 +11,7 @@ Service providers can create scoped validInstance providers:
11
11
12
12
Service can be registered as a singleton, scoped, or transient.
13
13
14
-
* Singleton: validInstance provider will create only one instance of this validInstance (accessible via the getService method)
14
+
* Singleton: service provider will create only one instance of this service (accessible via the getService method)
15
15
* Scoped: instance provider will create only one instance of this instance for each scope (accessible via the getService method)
16
16
* Transient: services are always unique, a new service is provided every time it is requested, and the service provider returns, in this case, std::unique_ptr (accessible via createService method)
0 commit comments