cast OGR shapefile pointer to shapefile class