-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtmp.h
More file actions
50 lines (39 loc) · 1.24 KB
/
Copy pathtmp.h
File metadata and controls
50 lines (39 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/*
* This file is the header for HelloWorldPluginTmp.cxx
* Auto-generated header file
*/
#ifndef HELLO_WORLD_PLUGIN_TMP_H
#define HELLO_WORLD_PLUGIN_TMP_H
#include <map>
#include <string>
#include <functional>
#include <memory>
#include <type_traits>
#include <cstdint>
// Function map class for managing type information and functions
class FunctionMap {
public:
// Functions structure for set, get, and getRaw operations
struct Functions {
std::function<void(std::string, void*)> set;
std::function<std::string(void*)> get;
std::function<void*()> getRaw;
};
// Type entry structure to store functions
struct TypeEntry {
Functions functions;
};
// Register a new type with the function map
template<typename T>
static void registerType(const std::string& typeName);
// Get functions for a specific type
static Functions& getFunctions(const std::string& typeName);
private:
// Static map to store type information
static std::map<std::string, TypeEntry> typeMap;
};
// Function to get data for a specific type
FunctionMap::Functions GetDataTmp(std::string name);
// Function to register all supported data types
void RegisterDataTmp();
#endif // HELLO_WORLD_PLUGIN_TMP_H