#include <ConverterRegistry.hpp>
◆ ConverterFunction
typedef void(* SoapySDR::ConverterRegistry::ConverterFunction) (const void *, void *, const size_t, const double) |
A typedef for a conversion function pointer. A conversion function converts an input buffer into an output buffer. The parameters are (input pointer, output pointer, number of elements, optional scalar)
◆ FormatConverters
FormatConverters: a map of possible conversion functions for a given Source/Target Format.
◆ TargetFormatConverterPriority
TargetFormatConverterPriority: a map of possible conversion functions for a given Priority.
◆ TargetFormatConverters
TargetFormatConverters: a map of possible conversion functions for a given Target/Priority Format.
◆ FunctionPriority
FormatConverterPriority: allow selection of a converter function with a given source and target format
Enumerator |
---|
GENERIC | |
VECTORIZED | |
CUSTOM | |
◆ ConverterRegistry()
SoapySDR::ConverterRegistry::ConverterRegistry |
( |
const std::string & |
sourceFormat, |
|
|
const std::string & |
targetFormat, |
|
|
const FunctionPriority & |
priority, |
|
|
ConverterFunction |
converter |
|
) |
| |
Class constructor for managing the Converter Registry. refuses to register converter and logs error if a source/target/priority entry already exists
- Parameters
-
sourceFormat | the source format markup string |
targetFormat | the target format markup string |
priority | the FunctionPriority of the converter to register |
converter | function to register |
◆ getFunction() [1/2]
static ConverterFunction SoapySDR::ConverterRegistry::getFunction |
( |
const std::string & |
sourceFormat, |
|
|
const std::string & |
targetFormat |
|
) |
| |
|
static |
Get a converter between a source and target format.
- Exceptions
-
invalid_argument | when the conversion does not exist and logs error |
- Parameters
-
sourceFormat | the source format markup string |
targetFormat | the target format markup string |
- Returns
- a conversion function pointer
◆ getFunction() [2/2]
static ConverterFunction SoapySDR::ConverterRegistry::getFunction |
( |
const std::string & |
sourceFormat, |
|
|
const std::string & |
targetFormat, |
|
|
const FunctionPriority & |
priority |
|
) |
| |
|
static |
◆ listAvailableSourceFormats()
static std::vector<std::string> SoapySDR::ConverterRegistry::listAvailableSourceFormats |
( |
void |
| ) |
|
|
static |
Get a list of known source formats in the registry.
◆ listPriorities()
static std::vector<FunctionPriority> SoapySDR::ConverterRegistry::listPriorities |
( |
const std::string & |
sourceFormat, |
|
|
const std::string & |
targetFormat |
|
) |
| |
|
static |
Get a list of available converter priorities for a given source and target format.
- Parameters
-
sourceFormat | the source format markup string |
targetFormat | the target format markup string |
- Returns
- a vector of priorities or an empty vector if none found
◆ listSourceFormats()
static std::vector<std::string> SoapySDR::ConverterRegistry::listSourceFormats |
( |
const std::string & |
targetFormat | ) |
|
|
static |
Get a list of formats to which we can convert the target format from. There is a registered conversion function from every source format returned in the result vector to the specified target format.
- Parameters
-
targetFormat | the target format markup string |
- Returns
- a vector of source formats or an empty vector if none found
◆ listTargetFormats()
static std::vector<std::string> SoapySDR::ConverterRegistry::listTargetFormats |
( |
const std::string & |
sourceFormat | ) |
|
|
static |
Get a list of formats to which we can convert the source format into. There is a registered conversion function from the specified source format to every target format returned in the result vector.
- Parameters
-
sourceFormat | the source format markup string |
- Returns
- a vector of target formats or an empty vector if none found
The documentation for this class was generated from the following file: