SoapySDR: ConverterRegistry.hpp Source File

| SoapySDR 0.7.2-ARCH Vendor and platform neutral SDR interface library

ConverterRegistry.hpp
Go to the documentation of this file.
1
12 #pragma once
13 #include <SoapySDR/Config.hpp>
14 #include <SoapySDR/Logger.hpp>
15 #include <SoapySDR/Formats.hpp>
16 #include <utility>
17 #include <vector>
18 #include <map>
19 #include <string>
20
21 namespace SoapySDR
22 {
33 class SOAPY_SDR_API ConverterRegistry
34 {
35 public:
42 typedef void (*ConverterFunction)(const void *, void *, const size_t, const double);
43
47 enum FunctionPriority{
48 GENERIC = 0,
49 VECTORIZED = 3,
50 CUSTOM = 5
51 };
52
57 typedef std::map<FunctionPriority, ConverterFunction> TargetFormatConverterPriority;
58
63 typedef std::map<std::string, TargetFormatConverterPriority> TargetFormatConverters;
64
69 typedef std::map<std::string, TargetFormatConverters> FormatConverters;
70
81 ConverterRegistry(const std::string &sourceFormat, const std::string &targetFormat, const FunctionPriority &priority, ConverterFunction converter);
82
90 static std::vector<std::string> listTargetFormats(const std::string &sourceFormat);
91
99 static std::vector<std::string> listSourceFormats(const std::string &targetFormat);
100
107 static std::vector<FunctionPriority> listPriorities(const std::string &sourceFormat, const std::string &targetFormat);
108
116 static ConverterFunction getFunction(const std::string &sourceFormat, const std::string &targetFormat);
117
122 static ConverterFunction getFunction(const std::string &sourceFormat, const std::string &targetFormat, const FunctionPriority &priority);
123
127 static std::vector<std::string> listAvailableSourceFormats(void);
128
129 };
130
131 }
SoapySDR::ConverterRegistry::FormatConverters
std::map< std::string, TargetFormatConverters > FormatConverters
Definition: ConverterRegistry.hpp:69
SOAPY_SDR_API
#define SOAPY_SDR_API
Definition: Config.h:41
SoapySDR
Definition: ConverterPrimitives.hpp:14
SoapySDR::ConverterRegistry::TargetFormatConverters
std::map< std::string, TargetFormatConverterPriority > TargetFormatConverters
Definition: ConverterRegistry.hpp:63
Config.hpp
SoapySDR::ConverterRegistry::TargetFormatConverterPriority
std::map< FunctionPriority, ConverterFunction > TargetFormatConverterPriority
Definition: ConverterRegistry.hpp:57
Logger.hpp
SoapySDR::ConverterRegistry
Definition: ConverterRegistry.hpp:33
SoapySDR::ConverterRegistry::FunctionPriority
FunctionPriority
Definition: ConverterRegistry.hpp:47
Formats.hpp