GDALRegister driver setup questions
|Reported by:||Kurt Schwehr||Owned by:||Kurt Schwehr|
- Some check GDALGetDriverByName(), others do not
- Some check the version, others do not. e.g. GDAL_CHECK_VERSION("OGR/DODS driver")
- Some use a generic driver and set parameters. e.g. GDALDriver *poDriver = new GDALDriver(); There is a wide range of what is set on this. e.g. how many of the pfn functions are set
- Some just set a new instance of themselves. e.g. OGRSFDriver* poDriver = new OGRXPlaneDriver
- Some have an extern "C" declaration for the register function in the cpp file, some wrap the function in it, some do not have it. Yet all OGR drivers are inside of CPL_C_START in ogrsf_frmts.h. The local externs are therefore redundant.
- Raster drivers have gdal_frmts.h, but mostly use a local definition. Why not remove all local definitions and just use that header?
I think we should:
- Remove all local declarations from cpp and just have them in two headers
- Remove all voids from the declarations
- Remove all wrapping of the actual functions definitions in cpp files within CPL_C_START
- Sort the driver list in the headers or add a comment to explain why they are in a particular order. Are they in the register order or random order?
Change History (2)
Note: See TracTickets for help on using tickets.