#include <RasterPager.h>

Public Member Functions | |
| virtual RasterPage * | getPage (DataRequest *pOriginalRequest, DimensionDescriptor startRow, DimensionDescriptor startColumn, DimensionDescriptor startBand)=0 |
| virtual void | releasePage (RasterPage *pPage)=0 |
| virtual int | getSupportedRequestVersion () const =0 |
Protected Member Functions | |
| virtual | ~RasterPager () |
This plug-in interface is used by the RasterElement to map sensor data from the source into memory so that it can be accessed from the rest of the application. Each importer that supports on disk processing should provide an implementation of this interface to the RasterElement object representing the data being loaded by the importer. This interface has no set methods because each importer should create it's own implementation of this interface, meaning that each importer should pass in any information needed by their implementation by using any set methods they provide on their implementation of this interface. Each importer should actually subclass RasterPagerShell which provides some default implementation.
An instance of the RasterPager interface must be created by utilizing PlugInManagerServices::createPlugIn(). This is to ensure that PlugInManagerServices can reference count the resources currently be accessed by the Core from within the plugin dll, so that the plugin dll is not unloaded prematurely.
Each RasterElement instance will have its own unique instance of the RasterPager interface. The RasterPager instance will have a lifetime equal to that of the RasterElement it is associated with. The RasterPager is required to return all resources back to the operating system on destruction. It is not explicitly required to return resources back to the operating system during the call of its releaseBlock() method.
Definition at line 52 of file RasterPager.h.
| virtual RasterPager::~RasterPager | ( | ) | [protected, virtual] |
Since the RasterPager interface is usually used in conjunction with the PlugIn and Executable interfaces, this should be destroyed by casting to the PlugIn interface and calling PlugInManagerServices::destroyPlugIn().
Definition at line 160 of file RasterPager.h.
| virtual RasterPage* RasterPager::getPage | ( | DataRequest * | pOriginalRequest, | |
| DimensionDescriptor | startRow, | |||
| DimensionDescriptor | startColumn, | |||
| DimensionDescriptor | startBand | |||
| ) | [pure virtual] |
This method should return an implementation of the RasterPage interface that will allow access to an in memory pointer of the requested data that has been loaded from the original file on disk.
The in memory pointer should point to a section of memory that adheres to the following constraints:
| pOriginalRequest | The request as originally made. The fields on this object should be examined to determine if this pager can handle the request, and how to format it. Use the other parameters to this method to determine where to start the RasterPage. | |
| startRow | the start row of data that should be loaded from the original data file on disk into memory. | |
| startColumn | the start column of data that should be loaded from the original data file on disk into memory. | |
| startBand | the start band of data that should be loaded from the original data file on disk into memory. |
Implemented in CachedPager.
| virtual void RasterPager::releasePage | ( | RasterPage * | pPage | ) | [pure virtual] |
This method will release the RasterPage* that was requested earlier via the getPage() method.
This method should only release those RasterPage* that were returned by the getPage() method of the same instance of the RasterPager. This method may be called simultaneously by multiple threads and is up to the implementer of this method to guarantee thread-safety in that case.
| pPage | the RasterPage that should be released. |
Implemented in CachedPager.
| virtual int RasterPager::getSupportedRequestVersion | ( | ) | const [pure virtual] |
Get the highest version of DataRequest that this pager supports.
RasterPagers can support a variety of conversions from the native data to that request in a DataRequest. getPage() should be implemented to check for these conversions and return NULL if unsupported.
As features are added, additional fields may be added to DataRequest. The defaults for these fields will always be the same as on the RasterElement being accessed. Since these fields may be added without breaking compatibility with existing RasterPager plug-ins, there will be existing plug-ins which do not know to check these new fields and return NULL if unsupported.
Return a value here to state what version of DataRequest is supported. If any higher-version fields are changed from the defaults, the core will assume that the RasterPager is unable to handle them, and the request will not be fulfilled.
Implemented in CachedPager.