The cache assumes that the image data is stored in fixed-size rectangles called pages. The main purpose of this class is the definition of a common API for cached image objects. Like ilImage , ilCacheImg is an abstract class, requiring further derivation to be used as an object. The real work of implementing a caching mechanism is deferred to derived classes such as ilMemCacheImg . The constructor handles all necessary initialization of the call backs.
Derived classes are responsible for everything else.
This function can used to add a callback on paging operations for this object. The cb parameter is a callback method or function. When the callback is invoked, the pageDesc argument will contain a pointer to this image object and the location and status of the page. This is a virtual function that must be implemented by the derived class. Derived classes that access an image file can call this function in their destructor before the file is closed to ensure that all data is written.