Static Public Member Functions | List of all members

#include <converter.h>

Static Public Member Functions

template<typename T >
static unsigned int get_elements (const T &)
template<typename Src , typename Dst >
static void convert_array (const Src *src, Dst *dst, unsigned int srcsize, unsigned int dstsize, bool autoscale=true)

Detailed Description

Helper class for conversion between numbers

Definition at line 46 of file converter.h.

Member Function Documentation

§ convert_array()

template<typename Src , typename Dst >
static void Converter::convert_array ( const Src *  src,
Dst *  dst,
unsigned int  srcsize,
unsigned int  dstsize,
bool  autoscale = true 

Converts array 'src' with 'srcsize' elements to array 'dst' with 'dstsize' elements Will scale "around 0" if 0 is part of the source value range. Elsewise values will be offset towards 0. If destination is unsigned values will be offset to be positive domain if necessary. If autoscale is "false" or if destination is floating point no scaling is done at all.

Definition at line 79 of file converter.h.

§ get_elements()

template<typename T >
static unsigned int Converter::get_elements ( const T &  )

Returns number of scalar numbers in this number type, e.g. complex has 2

Definition at line 64 of file converter.h.

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