aboutsummaryrefslogtreecommitdiffstats
path: root/host/tests/property_test.cpp
Commit message (Collapse)AuthorAgeFilesLines
* host: Throw exception when accessing properties with incorrect typeLane Kolbly2022-02-071-0/+25
|
* uhd: revert "Check property type at access..."Steven Koo2021-01-081-18/+0
| | | | | | | | | | 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-7/+12
| | | | | Note: template_lvbitx.{cpp,hpp} need to be excluded from the list of files that clang-format gets applied against.
* uhd: Replace all occurrences of boost::bind with std::bindMartin Braun2019-11-261-10/+11
| | | | | | | | | | | | | | | | | | | | | Note: Replacing everything with a lambda would be even better, but that can't be easily scripted so we'll do this as a first step to reduce the Boost footprint. This also removes occurences of #include <boost/bind.hpp>, and makes sure all usages of std::bind have an #include <functional>. clang-format wasn't always applied to minimize the changeset in this commit, however, it was applied to the blocks of #includes. Due to conflicts with other Boost libraries, the placeholders _1, _2, etc. could not be directly used, but had to be explicitly called out (as std::placeholders::_1, etc.). This makes the use of std::bind even uglier, which serves as another reminder that using std::bind (and even more so, boost::bind) should be avoided. nirio/rpc/rpc_client.cpp still contains a reference to boost::bind. It was not possible to remove it by simply doing a search and replace, so it will be removed in a separate commit.
* uhd: Check property type at access; error if mismatchAaron Rossetto2019-11-261-1/+19
|
* Revert "uhd: Check property type at access; error if mismatch"Martin Braun2019-09-301-19/+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/+19
|
* prop_tree: add pop() functionBrent Stapleton2019-05-021-0/+8
| | | | | 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-0/+1
| | | | | | | | | | | | - 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: mpm: apply clang-format to all filesBrent Stapleton2019-01-161-38/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Applying formatting changes to all .cpp and .hpp files in the following directories: ``` find host/examples/ -iname *.hpp -o -iname *.cpp | \ xargs clang-format -i -style=file find host/tests/ -iname *.hpp -o -iname *.cpp | \ xargs clang-format -i -style=file find host/lib/usrp/dboard/neon/ -iname *.hpp -o -iname *.cpp | \ xargs clang-format -i -style=file find host/lib/usrp/dboard/magnesium/ -iname *.hpp -o -iname *.cpp | \ xargs clang-format -i -style=file find host/lib/usrp/device3/ -iname *.hpp -o -iname *.cpp | \ xargs clang-format -i -style=file find host/lib/usrp/mpmd/ -iname *.hpp -o -iname *.cpp | \ xargs clang-format -i -style=file find host/lib/usrp/x300/ -iname *.hpp -o -iname *.cpp | \ xargs clang-format -i -style=file find host/utils/ -iname *.hpp -o -iname *.cpp | \ xargs clang-format -i -style=file find mpm/ -iname *.hpp -o -iname *.cpp | \ xargs clang-format -i -style=file ``` Also formatted host/include/, except Cpp03 was used as a the language standard instead of Cpp11. ``` sed -i 's/ Cpp11/ Cpp03/g' .clang-format find host/include/ -iname *.hpp -o -iname *.cpp | \ xargs clang-format -i -style=file ``` Formatting style was designated by the .clang-format file.
* 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
|
* prop_tree: Added advanced coercion capability to propertyAshish Chaudhari2016-02-111-1/+52
| | | | | | - Added auto and manual coerce modes - Added set_coerced API for manual coercion - Added detailed doxy comments describing behavior of property class
* prop_tree: Multiple API enhancements to uhd::propertyAshish Chaudhari2016-02-111-6/+6
| | | | | | | | | - Added desired and coerced values and accessors to property - Added support to register desired subscribers - set APIs don't reallocate storage for a property value - Renamed callback method registration APIs - Registering 2 coercers or publishers for a property will throw - Registering a coercer and a publisher for the same property will throw
* uhd: Added an operator/ for (fs_path, size_t)Martin Braun2014-09-231-0/+21
| | | | | | | | | | | | | 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);
* uhd: added unit test for properties subtreeJosh Blum2011-07-081-0/+16
|
* uhd: misc tweaks and also msvc compileJosh Blum2011-06-291-0/+7
|
* uhd: properties tweaks and docsJosh Blum2011-06-291-1/+1
|
* uhd: added properties unit tests, use shared ptr<void> in treeJosh Blum2011-06-281-18/+68
|
* uhd: re-work to make the properties easier to useJosh Blum2011-06-281-20/+22
|
* uhd: change for default prop create()Josh Blum2011-06-251-1/+1
|
* uhd: created a property tree to store propertiesJosh Blum2011-06-251-0/+25
|
* uhd: work on templated property classJosh Blum2011-06-251-0/+75