Function pointer from mangled name at runtime?
    Jacob Carlborg via Digitalmars-d 
    digitalmars-d at puremagic.com
       
    Sun Sep  3 23:54:53 PDT 2017
    
    
  
On 2017-09-01 22:53, bitwise wrote:
> Basically, the problem is deserializing a scene-graph from a json text 
> file. The architecture of my scene-graph enforces that some 
> template-function will be instantiated for every symbol that is 
> reflected. So what I'm trying to avoid is having to store all of the 
> instantiated type information in a central repository.
> 
> Imagine I gave you a static library, and a json file, and I told you 
> that all the necessary symbols to deserialize that json file were in 
> that static lib. If we both had the same serialization library that was 
> used, you would be able to deserialize the json file without me giving 
> you any source, or having you register all the needed types yourself in 
> some centralized type library.
I'm not sure how your serialization library works or is intended to 
work. But at some point you need a static type to be able to do 
something with the deserialized data.
In my serialization [1] it's possible (de)serialize any types without 
registering them. The only exception is when serializing an object 
through a base class reference, then the subclass(es) need to be registered.
[1] https://github.com/jacob-carlborg/orange
-- 
/Jacob Carlborg
    
    
More information about the Digitalmars-d
mailing list