GNU Radio's TEST Package
osmosdr::meta_range_t Struct Reference

#include <ranges.h>

Inheritance diagram for osmosdr::meta_range_t:

Public Member Functions

 meta_range_t (void)
 A default constructor for an empty meta-range.
template<typename InputIterator>
 meta_range_t (InputIterator first, InputIterator last)
 meta_range_t (double start, double stop, double step=0)
double start (void) const
 Get the overall start value for this meta-range.
double stop (void) const
 Get the overall stop value for this meta-range.
double step (void) const
 Get the overall step value for this meta-range.
double clip (double value, bool clip_step=false) const
std::vector< double > values () const
const std::string to_pp_string (void) const
 Convert this meta-range to a printable string.

Detailed Description

A meta-range object holds a list of individual ranges.

Constructor & Destructor Documentation

◆ meta_range_t() [1/3]

osmosdr::meta_range_t::meta_range_t ( void )

A default constructor for an empty meta-range.

◆ meta_range_t() [2/3]

template<typename InputIterator>
osmosdr::meta_range_t::meta_range_t ( InputIterator first,
InputIterator last )
inline

Input iterator constructor: Makes boost::assign::list_of work.

Parameters
firstthe begin iterator
lastthe end iterator

◆ meta_range_t() [3/3]

osmosdr::meta_range_t::meta_range_t ( double start,
double stop,
double step = 0 )

A convenience constructor for a single range. A step size of zero implies infinite precision.

Parameters
startthe minimum value for this range
stopthe maximum value for this range
stepthe step size for this range

References start(), step(), and stop().

Member Function Documentation

◆ clip()

double osmosdr::meta_range_t::clip ( double value,
bool clip_step = false ) const

Clip the target value to a possible range value.

Parameters
valuethe value to clip to this range
clip_stepif true, clip to steps as well
Returns
a value that is in one of the ranges

◆ start()

double osmosdr::meta_range_t::start ( void ) const

Get the overall start value for this meta-range.

Referenced by meta_range_t().

◆ step()

double osmosdr::meta_range_t::step ( void ) const

Get the overall step value for this meta-range.

Referenced by meta_range_t().

◆ stop()

double osmosdr::meta_range_t::stop ( void ) const

Get the overall stop value for this meta-range.

Referenced by meta_range_t().

◆ to_pp_string()

const std::string osmosdr::meta_range_t::to_pp_string ( void ) const

Convert this meta-range to a printable string.

◆ values()

std::vector< double > osmosdr::meta_range_t::values ( ) const

return a vector containing all values of the range


The documentation for this struct was generated from the following file: