├── .clang-format
├── .github
├── FUNDING.yml
└── workflows
│ ├── documentation.yml
│ ├── ubuntu.yml
│ └── windows.yml
├── .gitignore
├── CMakeLists.txt
├── CMakePresets.json
├── CONTRIBUTING.md
├── LICENSE
├── README.md
├── art
├── eventbus_logo.afdesign
└── export
│ ├── bus_icon.png
│ ├── bus_icon.svg
│ ├── bus_icon_thumbnail.png
│ ├── bus_icon_web.svg
│ ├── full_logo.png
│ ├── full_logo.svg
│ └── logo_no_text.png
├── benchmark
├── CMakeLists.txt
└── src
│ ├── event_bus.cpp
│ └── main.cpp
├── cmake
├── CPM.cmake
├── CompilerWarnings.cmake
└── tools.cmake
├── demo
├── CMakeLists.txt
└── main.cpp
├── documentation
├── CMakeLists.txt
└── Doxyfile
└── eventbus
├── CMakeLists.txt
├── include
└── eventbus
│ ├── detail
│ ├── function_traits.hpp
│ ├── storage_policy.hpp
│ └── value_traits.hpp
│ └── event_bus.hpp
└── test
├── event_bus_tests.cpp
└── main.cpp
/.clang-format:
--------------------------------------------------------------------------------
1 | ---
2 | BasedOnStyle: Google
3 | AccessModifierOffset: '-2'
4 | AlignTrailingComments: 'true'
5 | AllowAllParametersOfDeclarationOnNextLine: 'false'
6 | BreakBeforeBraces: Attach
7 | ColumnLimit: '100'
8 | ConstructorInitializerAllOnOneLineOrOnePerLine: 'false'
9 | IncludeBlocks: Regroup
10 | IndentPPDirectives: AfterHash
11 | IndentWidth: '4'
12 | NamespaceIndentation: All
13 | BreakBeforeBinaryOperators: None
14 | BreakBeforeTernaryOperators: 'true'
15 | AlwaysBreakTemplateDeclarations: 'Yes'
16 | ...
17 |
--------------------------------------------------------------------------------
/.github/FUNDING.yml:
--------------------------------------------------------------------------------
1 | # Thanks for any donations! :)
2 |
3 | github: DeveloperPaul123
4 |
--------------------------------------------------------------------------------
/.github/workflows/documentation.yml:
--------------------------------------------------------------------------------
1 | name: Documentation
2 |
3 | on:
4 | push:
5 | tags:
6 | - "*"
7 | workflow_dispatch:
8 |
9 | env:
10 | CPM_SOURCE_CACHE: ${{ github.workspace }}/cpm_modules
11 |
12 | jobs:
13 | build:
14 | name: Build and publish documentation
15 | runs-on: windows-latest
16 | steps:
17 | - uses: actions/checkout@v3
18 |
19 | - uses: actions/cache@v3
20 | with:
21 | path: "**/cpm_modules"
22 | key: ${{ github.workflow }}-cpm-modules-${{ hashFiles('**/CMakeLists.txt', '**/*.cmake') }}
23 |
24 | - name: Install dependencies
25 | run: |
26 | choco install doxygen.install -y
27 | choco install Graphviz -y
28 |
29 | - name: Build
30 | run: |
31 | cmake -S documentation -B build
32 | cmake --build build --target GenerateDocs
33 |
34 | - name: Publish
35 | uses: peaceiris/actions-gh-pages@v3
36 | with:
37 | github_token: ${{ secrets.GITHUB_TOKEN }}
38 | publish_dir: ./build/doxygen/html
39 |
--------------------------------------------------------------------------------
/.github/workflows/ubuntu.yml:
--------------------------------------------------------------------------------
1 | name: Ubuntu
2 |
3 | on:
4 | push:
5 | branches: [ develop, main]
6 | pull_request:
7 | branches: [ develop, main ]
8 |
9 | env:
10 | CTEST_OUTPUT_ON_FAILURE: 1
11 |
12 | jobs:
13 | build-gcc:
14 | runs-on: ${{matrix.os}}
15 | name: ${{ matrix.os}} gcc${{ matrix.version }} C++${{ matrix.cpp }}
16 | strategy:
17 | fail-fast: false
18 | max-parallel: 4
19 | matrix:
20 | os: [ubuntu-20.04, ubuntu-22.04]
21 | cpp: [17]
22 | version: [9, 10, 11]
23 | include:
24 | - os: ubuntu-22.04
25 | version: 12
26 | - os: ubuntu-20.04
27 | version: 7
28 | - os: ubuntu-20.04
29 | version: 8
30 | env:
31 | CPP_STANDARD: ${{ matrix.cpp }}
32 | steps:
33 | - uses: actions/checkout@v3
34 |
35 | - uses: actions/cache@v3
36 | with:
37 | path: "**/cpm_modules"
38 | key: ${{ github.workflow }}-cpm-modules-${{ hashFiles('**/CMakeLists.txt', '**/*.cmake') }}
39 |
40 | - name: set up GCC
41 | uses: egor-tensin/setup-gcc@v1
42 | with:
43 | version: ${{matrix.version}}
44 | platform: x64
45 |
46 | - name: Configure
47 | run: cmake -S . -B build
48 |
49 | - name: Build
50 | run: cmake --build build --config Debug -j4
51 |
52 | - name: Run tests
53 | run: |
54 | cd build
55 | ctest --build-config Debug
56 | build-clang:
57 | runs-on: ${{matrix.os}}
58 | name: ${{ matrix.os}} clang${{ matrix.version }} C++${{ matrix.cpp }}
59 | strategy:
60 | fail-fast: false
61 | max-parallel: 4
62 | matrix:
63 | os: [ubuntu-20.04, ubuntu-22.04]
64 | cpp: [17]
65 | version: [14, 15, 16, 17]
66 | include:
67 | - os: ubuntu-22.04
68 | version: 18
69 | env:
70 | CPP_STANDARD: ${{ matrix.cpp }}
71 | steps:
72 | - uses: actions/checkout@v3
73 |
74 | - uses: actions/cache@v3
75 | with:
76 | path: "**/cpm_modules"
77 | key: ${{ github.workflow }}-cpm-modules-${{ hashFiles('**/CMakeLists.txt', '**/*.cmake') }}
78 |
79 | # clang needs GCC
80 | - name: set up GCC
81 | uses: egor-tensin/setup-gcc@v1
82 | with:
83 | version: 11
84 | platform: x64
85 |
86 | - name: Install libs
87 | run: |
88 | sudo apt-get update
89 | sudo apt-get install build-essential -y
90 |
91 | - name: Set up Clang
92 | run: |
93 | wget -O llvm.sh https://apt.llvm.org/llvm.sh
94 | chmod +x llvm.sh
95 | sudo ./llvm.sh ${{matrix.version}}
96 |
97 | - name: Configure
98 | run: cmake -S . -B build
99 | env:
100 | CC: clang-${{matrix.version}}
101 | CXX: clang++-${{matrix.version}}
102 |
103 | - name: Build
104 | run: cmake --build build --config Debug -j4
105 |
106 | - name: Run tests
107 | run: |
108 | cd build
109 | ctest --build-config Debug
110 |
--------------------------------------------------------------------------------
/.github/workflows/windows.yml:
--------------------------------------------------------------------------------
1 | name: Windows
2 |
3 | on:
4 | push:
5 | branches: [ develop, main]
6 | pull_request:
7 | branches: [ develop, main ]
8 |
9 | env:
10 | CTEST_OUTPUT_ON_FAILURE: 1
11 |
12 | jobs:
13 | build:
14 | runs-on: ${{ matrix.os }}
15 | name: ${{ matrix.version }} C++${{ matrix.cpp }}
16 | strategy:
17 | fail-fast: false
18 | max-parallel: 2
19 | matrix:
20 | os: [windows-latest]
21 | cpp: [17]
22 | version: [msvc, clangcl]
23 | include:
24 | - version: msvc
25 | generator: '"Visual Studio 17 2022"'
26 | - version: clangcl
27 | generator: '"Visual Studio 17 2022" -T "clangcl"'
28 | env:
29 | CPP_STANDARD: ${{ matrix.cpp }}
30 | steps:
31 | - uses: actions/checkout@v1
32 |
33 | - name: Configure
34 | run: cmake -G ${{ matrix.generator }} -S . -B build
35 |
36 | - name: Build
37 | run: cmake --build build --config Debug -j4
38 |
39 | - name: Run tests
40 | run: |
41 | cd build
42 | ctest --build-config Debug
43 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | /build*
2 | .vscode/
3 | /act*
4 | .vs/*
5 | out/
6 |
--------------------------------------------------------------------------------
/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 3.25)
2 |
3 | project(eventbus)
4 |
5 | set(CXX_STANDARD 17)
6 | set(CXX_STANDARD_REQUIRED ON)
7 |
8 | list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
9 | include(CPM)
10 |
11 | option(EVENTBUS_BUILD_TESTS "Build unit tests." ON)
12 | option(EVENTBUS_BUILD_BENCHMARKS "Build benchmarks." OFF)
13 | option(EVENTBUS_BUILD_EXAMPLES "Build examples" OFF)
14 |
15 | # set up warnings interface project to re-use
16 | include(CompilerWarnings)
17 | add_library(project_warnings INTERFACE)
18 | set_project_warnings(project_warnings)
19 |
20 | # set up options interface project to re-use
21 | add_library(project_options INTERFACE)
22 | # this project requires C++17
23 | target_compile_features(project_options INTERFACE cxx_std_17)
24 |
25 | if(EVENTBUS_BUILD_TESTS)
26 | CPMAddPackage(
27 | NAME doctest
28 | GITHUB_REPOSITORY onqtam/doctest
29 | # bump CMake version to 3.5
30 | GIT_TAG 3a01ec37828affe4c9650004edb5b304fb9d5b75
31 | VERSION 2.4.11
32 | )
33 |
34 | # this needs to be in the top level directory
35 | # before any calls to `add_subdirectory()` for
36 | # ctest to be set up properly
37 | enable_testing()
38 | endif()
39 |
40 | add_subdirectory(eventbus)
41 |
42 | if(EVENTBUS_BUILD_EXAMPLES)
43 | add_subdirectory(demo)
44 | endif()
45 |
46 | if(EVENTBUS_BUILD_BENCHMARKS)
47 | add_subdirectory(benchmark)
48 | endif()
49 |
--------------------------------------------------------------------------------
/CMakePresets.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": 3,
3 | "configurePresets": [
4 | {
5 | "name": "base",
6 | "hidden": true,
7 | "generator": "Ninja",
8 | "binaryDir": "${sourceDir}/build/${presetName}",
9 | "installDir": "${sourceDir}/build/install/${presetName}",
10 | "cacheVariables": {
11 | "CMAKE_EXPORT_COMPILE_COMMANDS": "YES",
12 | "EVENTBUS_BUILD_TESTS": "ON",
13 | "EVENTBUS_BUILD_EXAMPLES": "ON",
14 | "EVENTBUS_BUILD_BENCHMARKS": "ON"
15 | }
16 | },
17 | {
18 | "name": "macos-base",
19 | "hidden": true,
20 | "inherits": "base",
21 | "condition": {
22 | "type": "equals",
23 | "lhs": "${hostSystemName}",
24 | "rhs": "Darwin"
25 | }
26 | },
27 | {
28 | "name": "clang-debug",
29 | "inherits": "macos-base",
30 | "displayName": "macOS Clang Debug",
31 | "cacheVariables": {
32 | "CMAKE_BUILD_TYPE": "Debug",
33 | "CMAKE_CXX_COMPILER": "clang++",
34 | "CMAKE_C_COMPILER": "clang"
35 | }
36 | },
37 | {
38 | "name": "clang-release",
39 | "inherits": "macos-base",
40 | "displayName": "macOS Clang Release",
41 | "cacheVariables": {
42 | "CMAKE_BUILD_TYPE": "Release",
43 | "CMAKE_CXX_COMPILER": "clang++",
44 | "CMAKE_C_COMPILER": "clang"
45 | }
46 | },
47 | {
48 | "name": "linux-base",
49 | "hidden": true,
50 | "inherits": "base",
51 | "description": "Target the Windows Subsystem for Linux (WSL) or a remote Linux system.",
52 | "condition": {
53 | "type": "equals",
54 | "lhs": "${hostSystemName}",
55 | "rhs": "Linux"
56 | },
57 | "vendor": {
58 | "microsoft.com/VisualStudioRemoteSettings/CMake/1.0": {
59 | "sourceDir": "$env{HOME}/.vs/$ms{projectDirName}"
60 | }
61 | }
62 | },
63 | {
64 | "name": "windows-base",
65 | "description": "Target Windows with the Visual Studio development environment.",
66 | "hidden": true,
67 | "inherits": "base",
68 | "cacheVariables": {
69 | "CMAKE_CXX_COMPILER": "cl",
70 | "CMAKE_C_COMPILER": "cl"
71 | },
72 | "condition": {
73 | "type": "equals",
74 | "lhs": "${hostSystemName}",
75 | "rhs": "Windows"
76 | },
77 | "architecture": {
78 | "value": "x64",
79 | "strategy": "external"
80 | },
81 | "toolset": {
82 | "value": "host=x64",
83 | "strategy": "external"
84 | }
85 | },
86 | {
87 | "name": "gcc-base",
88 | "hidden": true,
89 | "inherits": "linux-base",
90 | "cacheVariables": {
91 | "CMAKE_CXX_COMPILER": "g++",
92 | "CMAKE_C_COMPILER": "gcc"
93 | }
94 | },
95 | {
96 | "name": "gcc-debug",
97 | "inherits": "gcc-base",
98 | "displayName": "GCC Debug",
99 | "cacheVariables": {
100 | "CMAKE_BUILD_TYPE": "Debug"
101 | }
102 | },
103 | {
104 | "name": "gcc-release",
105 | "inherits": "gcc-base",
106 | "displayName": "GCC Release",
107 | "cacheVariables": {
108 | "CMAKE_BUILD_TYPE": "Release"
109 | }
110 | },
111 | {
112 | "name": "clang-base",
113 | "hidden": true,
114 | "inherits": "linux-base",
115 | "cacheVariables": {
116 | "CMAKE_CXX_COMPILER": "clang++",
117 | "CMAKE_C_COMPILER": "clang"
118 | }
119 | },
120 | {
121 | "name": "clang-debug",
122 | "inherits": "clang-base",
123 | "displayName": "Clang Debug",
124 | "cacheVariables": {
125 | "CMAKE_BUILD_TYPE": "Debug"
126 | }
127 | },
128 | {
129 | "name": "clang-release",
130 | "inherits": "clang-base",
131 | "displayName": "Clang Release",
132 | "cacheVariables": {
133 | "CMAKE_BUILD_TYPE": "Release"
134 | }
135 | },
136 | {
137 | "name": "clang-release-with-debug-info",
138 | "inherits": "clang-base",
139 | "displayName": "Clang RelWithDebInfo",
140 | "cacheVariables": {
141 | "CMAKE_BUILD_TYPE": "RelWithDebInfo"
142 | }
143 | },
144 | {
145 | "name": "x64-debug",
146 | "displayName": "x64 Debug",
147 | "description": "Target Windows (64-bit) with the Visual Studio development environment. (Debug)",
148 | "inherits": "windows-base",
149 | "architecture": {
150 | "value": "x64",
151 | "strategy": "external"
152 | },
153 | "cacheVariables": {
154 | "CMAKE_BUILD_TYPE": "Debug"
155 | }
156 | },
157 | {
158 | "name": "x64-debug-clang",
159 | "displayName": "x64 Debug Clang",
160 | "description": "Target Windows (64-bit) with Clang",
161 | "inherits": "windows-base",
162 | "cacheVariables": {
163 | "CMAKE_C_COMPILER": "clang",
164 | "CMAKE_CXX_COMPILER": "clang++",
165 | "CMAKE_BUILD_TYPE": "Debug"
166 | }
167 | },
168 | {
169 | "name": "x64-release-clang",
170 | "displayName": "x64 Release Clang",
171 | "description": "Target Windows (64-bit) with Clang (Release)",
172 | "inherits": "windows-base",
173 | "cacheVariables": {
174 | "CMAKE_C_COMPILER": "clang",
175 | "CMAKE_CXX_COMPILER": "clang++",
176 | "CMAKE_BUILD_TYPE": "Release"
177 | }
178 | },
179 | {
180 | "name": "x64-release",
181 | "displayName": "x64 Release",
182 | "description": "Target Windows (64-bit) with the Visual Studio development environment. (Release)",
183 | "inherits": "x64-debug",
184 | "cacheVariables": {
185 | "CMAKE_BUILD_TYPE": "Release"
186 | }
187 | },
188 | {
189 | "name": "x64-release-with-debug",
190 | "displayName": "x64 Release w/Debug",
191 | "description": "Target Windows (64-bit) with the Visual Studio development environment. (RelWithDebInfo)",
192 | "inherits": "x64-debug",
193 | "cacheVariables": {
194 | "CMAKE_BUILD_TYPE": "RelWithDebInfo"
195 | }
196 | }
197 | ]
198 | }
199 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Contributing to eventbus
2 |
3 | :thumbsup: First, thanks for contributing! Your help is much appreciated :thumbsup:
4 |
5 | The following is a set of guidelines for contributing to the `eventbus` C++ library. These are *guidelines*, not rules. Always use sound judgement and when it doubt, ask!
6 |
7 | ## Table of Contents
8 |
9 | - [Contributing to eventbus](#contributing-to-eventbus)
10 | - [Table of Contents](#table-of-contents)
11 | - [Code of Conduct](#code-of-conduct)
12 | - [TL;DR](#tldr)
13 | - [Guidelines](#guidelines)
14 | - [How to Contribute](#how-to-contribute)
15 | - [Report a Bug](#report-a-bug)
16 | - [Suggest New Features](#suggest-new-features)
17 | - [Contribute Code](#contribute-code)
18 |
19 | ## Code of Conduct
20 |
21 | All who work on this project are expected to be respectful of all other people along with their ideas and suggestions. Abusive behavior, harassment of any kind, or any sort of vulgar comments will **not** be tolerated. Please always be kind and reasonable when dealing with others. All who contribute to this project are expected to adhere to this code of conduct.
22 |
23 | ## TL;DR
24 |
25 | If you have a question, I encourage you to join the [Discord](https://discord.gg/yNQ9dW4). Please do **not** file an issue to ask a question.
26 |
27 | ## Guidelines
28 |
29 | ### How to Contribute
30 |
31 | You don't have to write code to contribute to the project. There are many ways to help out!
32 |
33 | #### Report a Bug
34 |
35 | Before reporting a bug, please check that an issue isn't already open for the bug you found. Bugs are tracked as Github issues in this project. You need to fill out as much information as possible when filing a bug so that it can be hunted and squashed properly. Follow the Github template and fill out the information as requested.
36 |
37 | #### Suggest New Features
38 |
39 | Have a good idea on how to make the app better? Please share! Before filing an issue however, it would be best to first discuss the idea on [Discord](https://discord.gg/yNQ9dW4) before filing an issue on Github.
40 |
41 | #### Contribute Code
42 |
43 | Arguably the best way to contribute is to submit a pull request (PR). Before doing so, please keep in mind the following reminders:
44 |
45 | - **Respect the Style**: When making contributions please respect the existing coding style present in the existing code. PRs made to make sweeping changes to code style will not be accepted.
46 | - **Commits**: Please be verbose in your commit messages. Limit the first line to ~72 characters and use good, long descriptions. I prefer too much information as opposed to too little.
47 | - **Document you Code**: Large chunks of un-documented code will not be accepted. Please use comments liberarly where needed in your code and also provide proper documentation.
48 |
49 | The general flow for contributers should be something like:
50 |
51 | - Fork the project
52 | - Clone locally (if needed)
53 | - Create a new branch (`feature/my-new-awesome-feature`)
54 | - Create commits and push
55 | - File PR to `eventbus/develop` (PRs on `master` will *not* be accepted).
56 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Apache License
2 | Version 2.0, January 2004
3 | http://www.apache.org/licenses/
4 |
5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6 |
7 | 1. Definitions.
8 |
9 | "License" shall mean the terms and conditions for use, reproduction,
10 | and distribution as defined by Sections 1 through 9 of this document.
11 |
12 | "Licensor" shall mean the copyright owner or entity authorized by
13 | the copyright owner that is granting the License.
14 |
15 | "Legal Entity" shall mean the union of the acting entity and all
16 | other entities that control, are controlled by, or are under common
17 | control with that entity. For the purposes of this definition,
18 | "control" means (i) the power, direct or indirect, to cause the
19 | direction or management of such entity, whether by contract or
20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
21 | outstanding shares, or (iii) beneficial ownership of such entity.
22 |
23 | "You" (or "Your") shall mean an individual or Legal Entity
24 | exercising permissions granted by this License.
25 |
26 | "Source" form shall mean the preferred form for making modifications,
27 | including but not limited to software source code, documentation
28 | source, and configuration files.
29 |
30 | "Object" form shall mean any form resulting from mechanical
31 | transformation or translation of a Source form, including but
32 | not limited to compiled object code, generated documentation,
33 | and conversions to other media types.
34 |
35 | "Work" shall mean the work of authorship, whether in Source or
36 | Object form, made available under the License, as indicated by a
37 | copyright notice that is included in or attached to the work
38 | (an example is provided in the Appendix below).
39 |
40 | "Derivative Works" shall mean any work, whether in Source or Object
41 | form, that is based on (or derived from) the Work and for which the
42 | editorial revisions, annotations, elaborations, or other modifications
43 | represent, as a whole, an original work of authorship. For the purposes
44 | of this License, Derivative Works shall not include works that remain
45 | separable from, or merely link (or bind by name) to the interfaces of,
46 | the Work and Derivative Works thereof.
47 |
48 | "Contribution" shall mean any work of authorship, including
49 | the original version of the Work and any modifications or additions
50 | to that Work or Derivative Works thereof, that is intentionally
51 | submitted to Licensor for inclusion in the Work by the copyright owner
52 | or by an individual or Legal Entity authorized to submit on behalf of
53 | the copyright owner. For the purposes of this definition, "submitted"
54 | means any form of electronic, verbal, or written communication sent
55 | to the Licensor or its representatives, including but not limited to
56 | communication on electronic mailing lists, source code control systems,
57 | and issue tracking systems that are managed by, or on behalf of, the
58 | Licensor for the purpose of discussing and improving the Work, but
59 | excluding communication that is conspicuously marked or otherwise
60 | designated in writing by the copyright owner as "Not a Contribution."
61 |
62 | "Contributor" shall mean Licensor and any individual or Legal Entity
63 | on behalf of whom a Contribution has been received by Licensor and
64 | subsequently incorporated within the Work.
65 |
66 | 2. Grant of Copyright License. Subject to the terms and conditions of
67 | this License, each Contributor hereby grants to You a perpetual,
68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69 | copyright license to reproduce, prepare Derivative Works of,
70 | publicly display, publicly perform, sublicense, and distribute the
71 | Work and such Derivative Works in Source or Object form.
72 |
73 | 3. Grant of Patent License. Subject to the terms and conditions of
74 | this License, each Contributor hereby grants to You a perpetual,
75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76 | (except as stated in this section) patent license to make, have made,
77 | use, offer to sell, sell, import, and otherwise transfer the Work,
78 | where such license applies only to those patent claims licensable
79 | by such Contributor that are necessarily infringed by their
80 | Contribution(s) alone or by combination of their Contribution(s)
81 | with the Work to which such Contribution(s) was submitted. If You
82 | institute patent litigation against any entity (including a
83 | cross-claim or counterclaim in a lawsuit) alleging that the Work
84 | or a Contribution incorporated within the Work constitutes direct
85 | or contributory patent infringement, then any patent licenses
86 | granted to You under this License for that Work shall terminate
87 | as of the date such litigation is filed.
88 |
89 | 4. Redistribution. You may reproduce and distribute copies of the
90 | Work or Derivative Works thereof in any medium, with or without
91 | modifications, and in Source or Object form, provided that You
92 | meet the following conditions:
93 |
94 | (a) You must give any other recipients of the Work or
95 | Derivative Works a copy of this License; and
96 |
97 | (b) You must cause any modified files to carry prominent notices
98 | stating that You changed the files; and
99 |
100 | (c) You must retain, in the Source form of any Derivative Works
101 | that You distribute, all copyright, patent, trademark, and
102 | attribution notices from the Source form of the Work,
103 | excluding those notices that do not pertain to any part of
104 | the Derivative Works; and
105 |
106 | (d) If the Work includes a "NOTICE" text file as part of its
107 | distribution, then any Derivative Works that You distribute must
108 | include a readable copy of the attribution notices contained
109 | within such NOTICE file, excluding those notices that do not
110 | pertain to any part of the Derivative Works, in at least one
111 | of the following places: within a NOTICE text file distributed
112 | as part of the Derivative Works; within the Source form or
113 | documentation, if provided along with the Derivative Works; or,
114 | within a display generated by the Derivative Works, if and
115 | wherever such third-party notices normally appear. The contents
116 | of the NOTICE file are for informational purposes only and
117 | do not modify the License. You may add Your own attribution
118 | notices within Derivative Works that You distribute, alongside
119 | or as an addendum to the NOTICE text from the Work, provided
120 | that such additional attribution notices cannot be construed
121 | as modifying the License.
122 |
123 | You may add Your own copyright statement to Your modifications and
124 | may provide additional or different license terms and conditions
125 | for use, reproduction, or distribution of Your modifications, or
126 | for any such Derivative Works as a whole, provided Your use,
127 | reproduction, and distribution of the Work otherwise complies with
128 | the conditions stated in this License.
129 |
130 | 5. Submission of Contributions. Unless You explicitly state otherwise,
131 | any Contribution intentionally submitted for inclusion in the Work
132 | by You to the Licensor shall be under the terms and conditions of
133 | this License, without any additional terms or conditions.
134 | Notwithstanding the above, nothing herein shall supersede or modify
135 | the terms of any separate license agreement you may have executed
136 | with Licensor regarding such Contributions.
137 |
138 | 6. Trademarks. This License does not grant permission to use the trade
139 | names, trademarks, service marks, or product names of the Licensor,
140 | except as required for reasonable and customary use in describing the
141 | origin of the Work and reproducing the content of the NOTICE file.
142 |
143 | 7. Disclaimer of Warranty. Unless required by applicable law or
144 | agreed to in writing, Licensor provides the Work (and each
145 | Contributor provides its Contributions) on an "AS IS" BASIS,
146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147 | implied, including, without limitation, any warranties or conditions
148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149 | PARTICULAR PURPOSE. You are solely responsible for determining the
150 | appropriateness of using or redistributing the Work and assume any
151 | risks associated with Your exercise of permissions under this License.
152 |
153 | 8. Limitation of Liability. In no event and under no legal theory,
154 | whether in tort (including negligence), contract, or otherwise,
155 | unless required by applicable law (such as deliberate and grossly
156 | negligent acts) or agreed to in writing, shall any Contributor be
157 | liable to You for damages, including any direct, indirect, special,
158 | incidental, or consequential damages of any character arising as a
159 | result of this License or out of the use or inability to use the
160 | Work (including but not limited to damages for loss of goodwill,
161 | work stoppage, computer failure or malfunction, or any and all
162 | other commercial damages or losses), even if such Contributor
163 | has been advised of the possibility of such damages.
164 |
165 | 9. Accepting Warranty or Additional Liability. While redistributing
166 | the Work or Derivative Works thereof, You may choose to offer,
167 | and charge a fee for, acceptance of support, warranty, indemnity,
168 | or other liability obligations and/or rights consistent with this
169 | License. However, in accepting such obligations, You may act only
170 | on Your own behalf and on Your sole responsibility, not on behalf
171 | of any other Contributor, and only if You agree to indemnify,
172 | defend, and hold each Contributor harmless for any liability
173 | incurred by, or claims asserted against, such Contributor by reason
174 | of your accepting any such warranty or additional liability.
175 |
176 | END OF TERMS AND CONDITIONS
177 |
178 | APPENDIX: How to apply the Apache License to your work.
179 |
180 | To apply the Apache License to your work, attach the following
181 | boilerplate notice, with the fields enclosed by brackets "[]"
182 | replaced with your own identifying information. (Don't include
183 | the brackets!) The text should be enclosed in the appropriate
184 | comment syntax for the file format. We also recommend that a
185 | file or class name and description of purpose be included on the
186 | same "printed page" as the copyright notice for easier
187 | identification within third-party archives.
188 |
189 | Copyright [yyyy] [name of copyright owner]
190 |
191 | Licensed under the Apache License, Version 2.0 (the "License");
192 | you may not use this file except in compliance with the License.
193 | You may obtain a copy of the License at
194 |
195 | http://www.apache.org/licenses/LICENSE-2.0
196 |
197 | Unless required by applicable law or agreed to in writing, software
198 | distributed under the License is distributed on an "AS IS" BASIS,
199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200 | See the License for the specific language governing permissions and
201 | limitations under the License.
202 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |