Revision daa537d3 host/include/uhd/types/ranges.ipp

b/host/include/uhd/types/ranges.ipp
22 22
#include <boost/foreach.hpp>
23 23
#include <algorithm>
24 24
#include <stdexcept>
25
#include <iostream>
25
#include <sstream>
26 26

  
27 27
namespace uhd{
28 28

  
......
66 66
        return _impl->step;
67 67
    }
68 68

  
69
    template <typename T> const std::string range_t<T>::to_pp_string(void) const{
70
        std::stringstream ss;
71
        ss << "(" << this->start();
72
        if (this->start() != this->stop()) ss << ", " << this->stop();
73
        if (this->step() != T(0)) ss << ", " << this->step();
74
        ss << ")";
75
        return ss.str();
76
    }
77

  
69 78
    /*******************************************************************
70 79
     * meta_range_t implementation code
71 80
     ******************************************************************/
......
163 172
        return last_stop;
164 173
    }
165 174

  
175
    template <typename T> const std::string meta_range_t<T>::to_pp_string(void) const{
176
        std::stringstream ss;
177
        BOOST_FOREACH(const range_t<T> &r, (*this)){
178
            ss << r.to_pp_string() << std::endl;
179
        }
180
        return ss.str();
181
    }
182

  
166 183
} //namespace uhd
167 184

  
168 185
#endif /* INCLUDED_UHD_TYPES_RANGES_IPP */

Also available in: Unified diff