Open Phibedy opened 8 years ago
We could add
extern "C" getLMSTypes(){
vector vec;
vec.add(LMSTYPE(<Type>));
return vec;
to each library. (LMSTYPE(<Type>)
creates a struct with a ID and a function to get the DataChannel
If one LMS instance wants data from another, we could send the ID, therefore we could create and use an instance of the object "without knowing" the type. The libraries have to be still available and loaded so the LMSTYPES are set. An service could do it easily. The libraries could be copied in the config-directory.
If the user now uses protobuffers #106, version checking would be enabled automatically, but as our datachannels should still be able to contain functions, protobuffers aren't the solution. As most of the time, the proto buffer sould be used as a container inside a class and the class still has to be available for the receiver.
Check if the dataChannel has a method called
We could create a macrp LMSTYPE(ClassName,namespace) which sets the classname as the name and the hash(classname,namespace) as id.
Furthermore we could introduce an init() function to libraries. This init function would provide all classes with it's LMSTypes. It would be needed for deserialization (LMS GUI) + it would enable us to have polymorphic datachannels