Closed daviddoria closed 13 years ago
The "pull" style Host interface is legacy, from when the image completer was meant to be a Photoshop plugin. Photoshop has a custom memory manager, and separates a single large, multilayer image into tile caches. I wanted an interface where the image completer could query the host to allocate and free the blocks of memory it needed to do the completion.
When I moved away from the plugin idea, the Host interface was pared down to the core method set you see now. At this point, there's no reason the data couldn't be straight pushed into the system like you suggest.
buh bye Host
Can you explain the idea of this pattern? I am very untrained in computer science, but I would have probably done something like this:
class Completer { void SetParameters(Settings); void SetImage(Image); void SetMask(Mask*); };
Also, could HostImage just be named Image? It is pure virtual, so the user would see "Ah, this is a generic container to store the Image for the algorithm. I should provide these functionalities using whatever image library I want." I see HostImage and wonder what the Host is, etc.