This repository contains the source code for the object property tree library. With this library it is easy to create a property tree where objects and pointers can be stored. Nodes can be set and accessed via dot delimited strings.
This library can be particularly useful in a multi-threaded application where objects need to be accessed by different threads.
This library is build using cmake. The library depends on Boost so make sure that you have it installed. To build:
- Change directory to the repository's root directory.
- Make a build directory
mkdir build
. cd build
.- Run cmake
cmake ..
. - Make
make -j 4
. - Install
sudo make install
.
Documentation can be generated using doxygen
- Install doxygen
sudo apt install doxygen
. - Change directory to the repository's root directory.
- Run doxygen
doxygen Doxyfile
. - Open the
docs/html/index.html
file with you browser. - Read the docs.
A tests application is supplied with the library. To build it set the variable BUILD_TESTS
ON.
cmake -DBUILD_TESTS=ON
This test application can be executed to ensure that the library is working as intended on your system.
The source code of the tests are located in src/tests
. The tests for the ObjectPropertyTree class can be used as an
example of the use of the library.
The underlying PropertyTree class is templated such that it will allow any key and value types. This can be used as is or used to facilitate the creation of new types of property trees. If you think that a property tree design you developed based on this library can be useful to others, get in touch.
This library is based from work that was developed by Barry Hill.