[Dxfreader-info] DXFReader with delegates?
Status: Beta
Brought to you by:
allandaly
|
From: Michael C. <mic...@gm...> - 2009-02-28 15:37:30
|
Hey list, thought it might be cool to add delegates to the DXFReader Model class. I think that if one wanted to add multi-threading to the loader, it would be easier that way. The reader could continue reading, calling delegates as it hits things like entities, header sections, etc. If the delegate chose to, it could kick off a thread to do it's processing on that element. The element would still be added to the model for later if so desired, but the processor would have a chance to create, say a DK drawing layer and render the element on it, while the reader is busy reading. I don't know if it would be all that much of a performance gain though and I'd probably want to do some profiling before adding it in there, but it's an idea. It's kind of a cross between what a SAX and DOM parser is to XML. One is streaming using callbacks, and the other is model-based. Best of both worlds. Michael ------------------------------------------------ mic...@gm... http://techrad.wordpress.com http://mrcaron.wordpress.com |