hgdal-1.0.0.0: src/GDAL/OGRLayer/Interface.hs
{-# LANGUAGE EmptyDataDecls, ExistentialQuantification,
FlexibleContexts, FlexibleInstances, ForeignFunctionInterface,
MultiParamTypeClasses, ScopedTypeVariables, TypeFamilies,
TypeSynonymInstances #-}
module GDAL.OGRLayer.Interface where
import Data.Word
import Data.Int
import Foreign.C
import Foreign.Ptr
import FFICXX.Runtime.Cast
import GDAL.OGRLayer.RawType
import GDAL.OGRFeature.RawType
import GDAL.OGRFeatureDefn.RawType
import GDAL.GDALMajorObject.Interface
class (IGDALMajorObject a) => IOGRLayer a where
getFeature :: () => a -> CInt -> IO OGRFeature
getFeatureCount :: () => a -> CInt -> IO CInt
getLayerDefn :: () => a -> IO OGRFeatureDefn
getNextFeature :: () => a -> IO OGRFeature
resetReading :: () => a -> IO ()
upcastOGRLayer :: forall a . (FPtr a, IOGRLayer a) => a -> OGRLayer
upcastOGRLayer h
= let fh = get_fptr h
fh2 :: Ptr RawOGRLayer = castPtr fh
in cast_fptr_to_obj fh2
downcastOGRLayer ::
forall a . (FPtr a, IOGRLayer a) => OGRLayer -> a
downcastOGRLayer h
= let fh = get_fptr h
fh2 = castPtr fh
in cast_fptr_to_obj fh2