std.serialization

Jacob Carlborg doob at me.com
Mon Feb 17 12:10:21 PST 2014


On 2014-02-17 13:20, Rory McGuire wrote:
> Interesting, do you have to run though all registered classes that are
> sub-classes of the base class and cast them checking for null?

No, that's not required. When a subclass is registered I'm storing a 
templated delegate which performs the downcast. Have a look at these two 
methods:

https://github.com/jacob-carlborg/orange/blob/master/orange/serialization/Serializer.d#L241-L262

-- 
/Jacob Carlborg


More information about the Digitalmars-d-announce mailing list