SoapySDR  0.3.0-g02fc7af6
Vendor and platform neutral SDR interface library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
Registry.hpp
Go to the documentation of this file.
1 
11 #pragma once
12 #include <SoapySDR/Config.hpp>
13 #include <SoapySDR/Version.hpp>
14 #include <SoapySDR/Types.hpp>
15 #include <vector>
16 #include <string>
17 #include <map>
18 
19 namespace SoapySDR
20 {
21 
23 class Device;
24 
26 typedef std::vector<Kwargs> (*FindFunction)(const Kwargs &);
27 
29 typedef Device* (*MakeFunction)(const Kwargs &);
30 
32 typedef std::map<std::string, FindFunction> FindFunctions;
33 
35 typedef std::map<std::string, MakeFunction> MakeFunctions;
36 
41 {
42 public:
43 
51  Registry(const std::string &name, const FindFunction &find, const MakeFunction &make, const std::string &abi);
52 
57  static FindFunctions listFindFunctions(void);
58 
63  static MakeFunctions listMakeFunctions(void);
64 };
65 
66 }
std::map< std::string, std::string > Kwargs
Typedef for a dictionary of key-value string arguments.
Definition: Types.hpp:22
Device *(* MakeFunction)(const Kwargs &)
typedef for a device factory function
Definition: Registry.hpp:29
std::map< std::string, MakeFunction > MakeFunctions
typedef for a dictionary of make functions
Definition: Registry.hpp:35
Definition: Registry.hpp:40
std::map< std::string, FindFunction > FindFunctions
typedef for a dictionary of find functions
Definition: Registry.hpp:32
Definition: Device.hpp:30
#define SOAPY_SDR_API
Definition: Config.h:41
std::vector< Kwargs >(* FindFunction)(const Kwargs &)
typedef for a device enumeration function
Definition: Registry.hpp:26