I am currently embedding python in a C++ module. I have a problem in that one of the functions I am trying to build must be capable of accepting various structures for processing specific commands.
The function should be declared in C++ as follows
void Write(char *cmd, void* mystruct, struct_type structID);
The function itself should then take the 3rd parameter (it is an enumeration containing structure type id's) and then process the void pointer (2nd parameter) based on the structure type.
I am exporting all structure types into python, so it should have access to each type of structure. In the python code, I will fill out the structure, then send it to the Write function.
Is this possible?