aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/property_tree.cpp
Commit message (Collapse)AuthorAgeFilesLines
* host: Throw exception when accessing properties with incorrect typeLane Kolbly2022-02-071-4/+4
|
* host: Minor cleanups in property_tree codeLane Kolbly2022-02-071-15/+28
|
* uhd: Replace Boost mutexes and locks with standard optionsMartin Braun2021-10-191-10/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a very mechanical task that could almost have been done with sed. Boost versions of mutexes and locks were removed, and replaced with std:: versions. The replacement tables are as follows: == Mutexes == - boost::mutex -> std::mutex - boost::recursive_mutex -> std::recursive_mutex Mutexes behave identically between Boost and std:: and have the same API. == Locks == C++11 has only two types of lock that we use/need in UHD: - std::lock_guard: Identical to boost::lock_guard - std::unique_lock: Identical to boost::unique_lock Boost also has boost::mutex::scoped_lock, which is a typedef for boost::unique_lock<>. However, we often have used scoped_lock where we meant to use lock_guard<>. The name is a bit misleading, "scoped lock" sounding a bit like an RAII mechanism. Therefore, some previous boost::mutex::scoped_lock are now std::lock_guard<>. std::unique_lock is required when doing more than RAII locking (i.e., unlocking, relocking, usage with condition variables, etc.). == Condition Variables == Condition variables were out of the scope of this lock/mutex change, but in UHD, we inconsistently use boost::condition vs. boost::condition_variable. The former is a templated version of the latter, and thus works fine with std::mutex'es. Therefore, some boost::condition_variable where changed to boost::condition. All locks and mutexes use `#include <mutex>`. The corresponding Boost includes were removed. In some cases, this exposed issues with implicit Boost includes elsewhere. The missing explicit includes were added.
* host: Update code base using clang-tidyMartin Braun2021-03-041-8/+7
| | | | | | | | | The checks from the new clang-tidy file are applied to the source tree using: $ find . -name "*.cpp" | sort -u | xargs \ --max-procs 8 --max-args 1 clang-tidy --format-style=file \ --fix -p /path/to/compile_commands.json
* uhd: revert "Check property type at access..."Steven Koo2021-01-081-25/+1
| | | | | | | | | | This change reverts cb9329a681552e6ac6277d16e1627afcbb23e637. The type checking is causing some conversion issues on clang/macos. The type_index checking doesn't work correctly across shared libraries and should not be relied on to verify type, since it can vary from compiler to compiler. Signed-off-by: Steven Koo <steven.koo@ni.com>
* uhd: Apply clang-format against all .cpp and .hpp files in host/Martin Braun2020-03-031-4/+6
| | | | | Note: template_lvbitx.{cpp,hpp} need to be excluded from the list of files that clang-format gets applied against.
* uhd: Replace usage of boost smart pointers with C++11 counterpartsMartin Braun2019-11-261-8/+8
| | | | | | | | | | | | | | | | | | | This removes the following Boost constructs: - boost::shared_ptr, boost::weak_ptr - boost::enable_shared_from_this - boost::static_pointer_cast, boost::dynamic_pointer_cast The appropriate includes were also removed. All C++11 versions of these require #include <memory>. Note that the stdlib and Boost versions have the exact same syntax, they only differ in the namespace (boost vs. std). The modifications were all done using sed, with the exception of boost::scoped_ptr, which was replaced by std::unique_ptr. References to boost::smart_ptr were also removed. boost::intrusive_ptr is not removed in this commit, since it does not have a 1:1 mapping to a C++11 construct.
* uhd: Check property type at access; error if mismatchAaron Rossetto2019-11-261-1/+24
|
* Revert "uhd: Check property type at access; error if mismatch"Martin Braun2019-09-301-24/+1
| | | | | | | This reverts commit 94592641f0647563bc4d2163805d5284a6796273. The commit itself was OK, but it changed the requirements such that UHD could only be compiled with C++11.
* uhd: Check property type at access; error if mismatchAaron Rossetto2019-09-041-1/+24
|
* prop_tree: add pop() functionBrent Stapleton2019-05-021-0/+23
| | | | | Adding pop function to property tree, which will remove and return a property from the property tree. This also includes unit tests.
* prop_tree: formatting property tree filesBrent Stapleton2019-05-021-58/+82
| | | | | | | | | | | | - Ran clang-format - Fixed typos - Updated copyright headers clang-format -i --style=file \ host/include/uhd/property_tree.hpp \ host/include/uhd/property_tree.ipp clang-format -i --style=file \ host/lib/property_tree.cpp host/tests/property_test.cpp
* uhd: Update license headersMartin Braun2018-02-191-1/+2
| | | | | | | All copyright is now attributed to "Ettus Research, a National Instruments company". SPDX headers were also updated to latest version 3.0.
* Move all license headers to SPDX format.Martin Braun2017-12-221-12/+1
|
* uhd: Replaced many lexical_cast with appropriate C++11 equivalentsMartin Braun2017-06-291-1/+1
|
* uhd: replace BOOST_FOREACH with C++11 range-based for loopAndrej Rode2017-02-101-6/+5
| | | | | Note: This is the first commit that uses for-range, and range-based for-loops are now usable for UHD development.
* prop_tree: Added advanced coercion capability to propertyAshish Chaudhari2016-02-111-1/+1
| | | | | | - Added auto and manual coerce modes - Added set_coerced API for manual coercion - Added detailed doxy comments describing behavior of property class
* Merge branch 'maint'Martin Braun2014-09-231-0/+6
|\
| * uhd: Added an operator/ for (fs_path, size_t)Martin Braun2014-09-231-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | This is useful when constructing property tree paths. With this path, the following code would be valid: size_t mb_index = 0; fs_path mb_root = "/mboards"; mb_root = mb_root / mb_index; This is a shortcut for the (in UHD very common) mb_root = mb_root / boost::lexical_cast<std::string(mb_index);
* | Added missing pure virtual destructors to base classesNicholas Corgan2014-09-011-1/+5
|/
* uhd: replaced boost filesystem path with fs_path in property treeJosh Blum2011-07-221-29/+73
|
* uhd: tweaks for windows boost 1.47 compileJosh Blum2011-07-181-16/+21
|
* uhd: added subtree capability to property treeJosh Blum2011-07-081-34/+65
|
* uhd: added properties unit tests, use shared ptr<void> in treeJosh Blum2011-06-281-3/+4
|
* usrp2: restored discovery and most of io_implJosh Blum2011-06-271-6/+2
|
* uhd: forgot to commit properties fileJosh Blum2011-06-251-0/+104