Skip to content

Commit 9a4583a

Browse files
authored
Merge pull request #21 from 7bitcoder/dev
Add version 3.1.0
2 parents 866983c + 6521174 commit 9a4583a

File tree

80 files changed

+1267
-1103
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+1267
-1103
lines changed

.github/workflows/DevCI.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ on:
1010

1111
jobs:
1212
test:
13+
timeout-minutes: 30
14+
1315
strategy:
1416
fail-fast: false
1517
matrix:

.github/workflows/Linux.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ on:
1010

1111
jobs:
1212
test:
13+
timeout-minutes: 30
14+
1315
strategy:
1416
fail-fast: false
1517
matrix:

.github/workflows/MacOs.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ on:
1010

1111
jobs:
1212
test:
13+
timeout-minutes: 30
14+
1315
strategy:
1416
fail-fast: false
1517
matrix:

.github/workflows/Windows.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ env:
1313

1414
jobs:
1515
test:
16+
timeout-minutes: 30
17+
1618
strategy:
1719
fail-fast: false
1820
matrix:

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.15.0)
33
set(_7BIT_DI_LIBRARY 7bitDI)
44

55
set(_7BIT_DI_VERSION_MAJOR 3)
6-
set(_7BIT_DI_VERSION_MINOR 0)
6+
set(_7BIT_DI_VERSION_MINOR 1)
77
set(_7BIT_DI_VERSION_PATCH 0)
88

99
set(_7BIT_DI_VERSION ${_7BIT_DI_VERSION_MAJOR}.${_7BIT_DI_VERSION_MINOR}.${_7BIT_DI_VERSION_PATCH})

Docs/advanced-guides.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,7 @@ Advanced Guides
99
advanced-guides/external-singleton
1010
advanced-guides/keyed-services
1111
advanced-guides/using-aliases
12+
advanced-guides/register-utility-class
13+
advanced-guides/injected-utility-class
1214
advanced-guides/configuring-service-provider
1315
advanced-guides/building-library
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
Injected Utility Class
2+
========================================
3+
4+
Library provides also Injected_ utility class.
5+
This base class has inject() method that can be used to inject services in simple inline way, also
6+
there are InjectedSingleton, InjectedScoped and InjectedTransient base classes that are inheriting
7+
from Injected and Registered classes to combine these two features. Injected class has also method
8+
getProvider(), raw provider can be used to get keyed services for example.
9+
10+
.. _Injected: ../reference/di/utils/injected.html
11+
12+
.. note::
13+
Class should inherit Injected constructor with 'using Injected::Injected;' in public section
14+
15+
.. literalinclude:: ../../Examples/Guides/InjectedUtilityClass.cpp
16+
:caption: Examples/Guides/InjectedUtilityClass
17+
:language: C++
18+
19+
.. code-block:: console
20+
:caption: Output
21+
22+
actionA, actionB executed.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
Register Utility Class
2+
========================================
3+
4+
Library provides simple template RegisterService_ utility class.
5+
This base class can be used to automatically register class in service collection with use of specialised TRegisterer.
6+
There are already created aliases RegisterSingleton_, RegisterScoped_, RegisterTransient_ that are registering services
7+
in GlobalServices_ singleton.
8+
9+
.. note::
10+
Class should inherit Injected constructor with 'using Injected::Injected;' in public section
11+
12+
.. _RegisterService: ../reference/di/utils/register.html
13+
.. _RegisterSingleton: ../reference/di/utils/register.html
14+
.. _RegisterScoped: ../reference/di/utils/register.html
15+
.. _RegisterTransient: ../reference/di/utils/register.html
16+
.. _GlobalServices: ../reference/di/utils/globalservices.html
17+
18+
.. literalinclude:: ../../Examples/Guides/RegisterUtilityClass.cpp
19+
:caption: Examples/Guides/RegisterUtilityClass
20+
:language: C++
21+
22+
.. code-block:: console
23+
:caption: Output
24+
25+
actionA_, actionB executed.

Docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ def createIfNotExists(path):
1212
project = "7bitDI"
1313
copyright = "2023, 7BitCoder Sylwester Dawida"
1414
author = "Sylwester Dawida"
15-
version = "3.0.0"
15+
version = "3.1.0"
1616

1717
extensions = [
1818
"sphinx.ext.autodoc",

Docs/examples.rst

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,5 @@ Examples
66
:titlesonly:
77

88
examples/simple
9+
examples/logger
910
examples/cli
10-
11-
12-
13-
14-

0 commit comments

Comments
 (0)