Skip to content

Commit

Permalink
Add property-db class to record & write structured data. (#397)
Browse files Browse the repository at this point in the history
Add property-db class to record & write structured data.

This adds a utility to record structured data in the form of a property database where the keys are a property path with string or number values. The data can be converted to a string, or written to a file, as JSON.
  • Loading branch information
grafikrobot authored May 28, 2024
1 parent e329ca3 commit c30bce8
Show file tree
Hide file tree
Showing 15 changed files with 25,150 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Continuously tested on:
* FreeBSD Clang 11, 12, 13, 14, 15, 16, 17
* FreeBSD GCC 9, 10, 11, 12, 13
* Linux Clang 3.6, 3.7, 3.8, 3.9, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17
* Linux GCC 4.7, 4.8, 4.9, 5, 6, 7, 8, 9, 10, 11, 12, 13
* Linux GCC 4.8, 4.9, 5, 6, 7, 8, 9, 10, 11, 12, 13
* macOS Xcode 11.7, 12.4, 12.5.1, 13.4.1, 14.0.1, 14.1, 14.2, 14.3.1, 15.0.1
* Windows MinGW 8.1.0
* Windows 2015, 2017, 2019, 2022
Expand Down
2 changes: 1 addition & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ stages:
GCC 5: {CXX: g++-5, TOOLSET: gcc-5, PACKAGES: g++-5, CONTAINER: "ubuntu_1804"}
GCC 4.9: {CXX: g++-4.9, TOOLSET: gcc-4.9, PACKAGES: g++-4.9, CONTAINER: "ubuntu_1604"}
GCC 4.8: {CXX: g++-4.8, TOOLSET: gcc-4.8, PACKAGES: g++-4.8, CONTAINER: "ubuntu_1804"}
GCC 4.7: {CXX: g++-4.7, TOOLSET: gcc-4.7, PACKAGES: g++-4.7, CONTAINER: "ubuntu_1604"}
# GCC 4.7: {CXX: g++-4.7, TOOLSET: gcc-4.7, PACKAGES: g++-4.7, CONTAINER: "ubuntu_1604"}
Clang 9: {CXX: clang++-9, TOOLSET: clang-9, PACKAGES: clang-9, LLVM_VER: 9, LLVM_OS: 'bionic', CONTAINER: "ubuntu_1804"}
Clang 8: {CXX: clang++-8, TOOLSET: clang-8, PACKAGES: clang-8, LLVM_VER: 8, LLVM_OS: 'bionic', CONTAINER: "ubuntu_1804"}
Clang 7: {CXX: clang++-7, TOOLSET: clang-7, PACKAGES: clang-7, LLVM_VER: 7, LLVM_OS: 'bionic', CONTAINER: "ubuntu_1804"}
Expand Down
33 changes: 33 additions & 0 deletions doc/src/appendix.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
[[b2.appendix]]
[appendix]
= Licenses

In addition to B2 being licensed under the Boost Software License - Version 1.0,
B2 makes use of additional libraries that are differently licensed as follows.

== MIT License

```
MIT License

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
```

https://github.com/nlohmann/json[JSON for Modern C++]::
Copyright (c) 2013-2022 Niels Lohmann
1 change: 1 addition & 0 deletions doc/src/reference.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -775,6 +775,7 @@ include::../../src/engine/mod_regex.h[tag=reference]
include::../../src/engine/mod_set.h[tag=reference]
include::../../src/engine/mod_string.h[tag=reference]
include::../../src/engine/mod_version.h[tag=reference]
include::../../src/engine/mod_db.h[tag=reference]

include::path.adoc[]

Expand Down
2 changes: 2 additions & 0 deletions doc/src/standalone.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,6 @@ include::code_ref.adoc[]

include::history.adoc[]

include::appendix.adoc[]

:leveloffset: -1
4 changes: 3 additions & 1 deletion src/engine/bindjam.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ Distributed under the Boost Software License, Version 1.0.
#include "value.h"
#include "variable.h"

#include "mod_db.h"
#include "mod_jam_builtin.h"
#include "mod_jam_class.h"
#include "mod_jam_errors.h"
Expand Down Expand Up @@ -821,7 +822,8 @@ void bind_jam(FRAME * f)
.bind(set_module())
.bind(string_module())
.bind(sysinfo_module())
.bind(version_module());
.bind(version_module())
.bind(db_module());
}

}} // namespace b2::jam
1 change: 1 addition & 0 deletions src/engine/build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ set B2_SOURCES=%B2_SOURCES% native.cpp option.cpp output.cpp parse.cpp pathnt.cp
set B2_SOURCES=%B2_SOURCES% pathsys.cpp pathunix.cpp regexp.cpp rules.cpp scan.cpp search.cpp jam_strings.cpp
set B2_SOURCES=%B2_SOURCES% startup.cpp tasks.cpp
set B2_SOURCES=%B2_SOURCES% timestamp.cpp value.cpp variable.cpp w32_getreg.cpp
set B2_SOURCES=%B2_SOURCES% mod_db.cpp
set B2_SOURCES=%B2_SOURCES% mod_jam_builtin.cpp
set B2_SOURCES=%B2_SOURCES% mod_jam_class.cpp
set B2_SOURCES=%B2_SOURCES% mod_jam_errors.cpp
Expand Down
1 change: 1 addition & 0 deletions src/engine/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -487,6 +487,7 @@ timestamp.cpp \
value.cpp \
variable.cpp \
w32_getreg.cpp \
mod_db.cpp \
mod_jam_builtin.cpp \
mod_jam_class.cpp \
mod_jam_errors.cpp \
Expand Down
Loading

0 comments on commit c30bce8

Please sign in to comment.