diff options
author | Paul David <paul.david@ettus.com> | 2017-05-09 21:36:02 -0400 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2017-05-23 17:14:32 -0700 |
commit | 2c0f1098351d6c0763d985c2085ec676a7992e2d (patch) | |
tree | 66b8c4cba5742f9e9a7f59d46c586957b35c4c28 /host/include | |
parent | 056dabcaf37469d0e614d269ded3e6e4c41d4cc8 (diff) | |
download | uhd-2c0f1098351d6c0763d985c2085ec676a7992e2d.tar.gz uhd-2c0f1098351d6c0763d985c2085ec676a7992e2d.tar.bz2 uhd-2c0f1098351d6c0763d985c2085ec676a7992e2d.zip |
Types: Added equality/inquality operators to support Boost.Python additions
- Added to subdev_spec_pair_t
- Added to range_t
- Added tests for the inequalities
Diffstat (limited to 'host/include')
-rw-r--r-- | host/include/uhd/types/ranges.hpp | 6 | ||||
-rw-r--r-- | host/include/uhd/usrp/subdev_spec.hpp | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/host/include/uhd/types/ranges.hpp b/host/include/uhd/types/ranges.hpp index ac632df93..b26b5d753 100644 --- a/host/include/uhd/types/ranges.hpp +++ b/host/include/uhd/types/ranges.hpp @@ -59,6 +59,12 @@ namespace uhd{ //! Convert this range to a printable string const std::string to_pp_string(void) const; + //! Equality operator + bool operator==(const range_t &other) const; + + //! Inequality operator + bool operator!=(const range_t &other) const; + private: double _start, _stop, _step; }; diff --git a/host/include/uhd/usrp/subdev_spec.hpp b/host/include/uhd/usrp/subdev_spec.hpp index 62c1fc177..4165a45f7 100644 --- a/host/include/uhd/usrp/subdev_spec.hpp +++ b/host/include/uhd/usrp/subdev_spec.hpp @@ -44,6 +44,12 @@ namespace uhd{ namespace usrp{ const std::string &db_name = "", const std::string &sd_name = "" ); + + //! overloaded equality operator + bool operator==(const subdev_spec_pair_t &other); + + //! overloaded inquality operator + bool operator!=(const subdev_spec_pair_t &other); }; //! overloaded comparison operator for subdev_spec_pair_t |