diff options
Diffstat (limited to 'host/include')
-rw-r--r-- | host/include/uhd/CMakeLists.txt | 1 | ||||
-rw-r--r-- | host/include/uhd/types/dict.hpp | 8 | ||||
-rw-r--r-- | host/include/uhd/usrp/dboard_base.hpp | 2 | ||||
-rw-r--r-- | host/include/uhd/utils/algorithm.hpp | 11 | ||||
-rw-r--r-- | host/include/uhd/utils/pimpl.hpp | 3 | ||||
-rw-r--r-- | host/include/uhd/version.hpp | 28 |
6 files changed, 39 insertions, 14 deletions
diff --git a/host/include/uhd/CMakeLists.txt b/host/include/uhd/CMakeLists.txt index c0339dbd3..ad528c9fb 100644 --- a/host/include/uhd/CMakeLists.txt +++ b/host/include/uhd/CMakeLists.txt @@ -25,6 +25,7 @@ INSTALL(FILES config.hpp device.hpp device.ipp + version.hpp wax.hpp DESTINATION ${INCLUDE_DIR}/uhd ) diff --git a/host/include/uhd/types/dict.hpp b/host/include/uhd/types/dict.hpp index 50a2b5c3b..de96ea768 100644 --- a/host/include/uhd/types/dict.hpp +++ b/host/include/uhd/types/dict.hpp @@ -20,7 +20,10 @@ #include <uhd/config.hpp> #include <boost/foreach.hpp> +#include <boost/format.hpp> +#include <boost/lexical_cast.hpp> #include <stdexcept> +#include <typeinfo> #include <vector> #include <list> @@ -117,7 +120,10 @@ namespace uhd{ BOOST_FOREACH(const pair_t &p, _map){ if (p.first == key) return p.second; } - throw std::invalid_argument("key not found in dict"); + throw std::invalid_argument(str(boost::format( + "key \"%s\" not found in dict(%s, %s)" + ) % boost::lexical_cast<std::string>(key) + % typeid(Key).name() % typeid(Val).name())); } /*! diff --git a/host/include/uhd/usrp/dboard_base.hpp b/host/include/uhd/usrp/dboard_base.hpp index e88d39876..9b75d791f 100644 --- a/host/include/uhd/usrp/dboard_base.hpp +++ b/host/include/uhd/usrp/dboard_base.hpp @@ -40,7 +40,7 @@ public: * Derived classes should pass the args into the base class, * but should not deal with the internals of the args. */ - struct ctor_args_impl; typedef ctor_args_impl* ctor_args_t; + typedef void * ctor_args_t; //structors dboard_base(ctor_args_t); diff --git a/host/include/uhd/utils/algorithm.hpp b/host/include/uhd/utils/algorithm.hpp index b52edc6b5..54bc78494 100644 --- a/host/include/uhd/utils/algorithm.hpp +++ b/host/include/uhd/utils/algorithm.hpp @@ -112,17 +112,6 @@ namespace std{ } /*! - * A templated signum implementation. - * \param n the comparable to process - * \return -1 when n negative, +1 when n positive, otherwise 0 - */ - template<typename T> inline int signum(T n){ - if (n < 0) return -1; - if (n > 0) return +1; - return 0; - } - - /*! * A templated clip implementation. * \param val the value to clip between an upper and lower limit * \param bound1 the upper or lower bound diff --git a/host/include/uhd/utils/pimpl.hpp b/host/include/uhd/utils/pimpl.hpp index 09bf0c0a2..18454f0c4 100644 --- a/host/include/uhd/utils/pimpl.hpp +++ b/host/include/uhd/utils/pimpl.hpp @@ -20,6 +20,7 @@ #include <uhd/config.hpp> #include <boost/shared_ptr.hpp> +#include <boost/make_shared.hpp> /*! \file pimpl.hpp * "Pimpl idiom" (pointer to implementation idiom). @@ -50,6 +51,6 @@ * \param _args the constructor args for the pimpl */ #define UHD_PIMPL_MAKE(_name, _args) \ - boost::shared_ptr<_name>(new _name _args) + boost::make_shared<_name> _args #endif /* INCLUDED_UHD_UTILS_PIMPL_HPP */ diff --git a/host/include/uhd/version.hpp b/host/include/uhd/version.hpp new file mode 100644 index 000000000..19d672e65 --- /dev/null +++ b/host/include/uhd/version.hpp @@ -0,0 +1,28 @@ +// +// Copyright 2010 Ettus Research LLC +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. +// + +#ifndef INCLUDED_UHD_VERSION_HPP +#define INCLUDED_UHD_VERSION_HPP + +#include <uhd/config.hpp> +#include <string> + +namespace uhd{ + UHD_API std::string get_version_string(void); +} //namespace uhd + +#endif /* INCLUDED_UHD_VERSION_HPP */ |