Open the file that implements the CIPlugInRegistration protocol. In it you’ll find a load method, as shown in Listing 4-1. You have the option to add code to this method to perform any initialization that’s needed, such as a registration check. The method returns true if the filter is loaded successfully. If you don’t need any custom initialization, you can leave the load method as it is.
Listing 4-1 The load method provided by the image unit template
-(BOOL)load:(void*)host |
{ |
// custom image unit initialization code goes here |
return YES; |
} |
If you want, you can write an unload method to perform any cleanup tasks that might be required by your filter.
Last updated: 2008-06-09