hgdal-1.0.0.0: src/GDAL/OGRCurve/Interface.hs
{-# LANGUAGE EmptyDataDecls, ExistentialQuantification,
FlexibleContexts, FlexibleInstances, ForeignFunctionInterface,
MultiParamTypeClasses, ScopedTypeVariables, TypeFamilies,
TypeSynonymInstances #-}
module GDAL.OGRCurve.Interface where
import Data.Word
import Data.Int
import Foreign.C
import Foreign.Ptr
import FFICXX.Runtime.Cast
import GDAL.OGRCurve.RawType
import GDAL.OGRPointIterator.RawType
import GDAL.OGRGeometry.Interface
class (IOGRGeometry a) => IOGRCurve a where
getNumPoints :: () => a -> IO CInt
getPointIterator :: () => a -> IO OGRPointIterator
upcastOGRCurve :: forall a . (FPtr a, IOGRCurve a) => a -> OGRCurve
upcastOGRCurve h
= let fh = get_fptr h
fh2 :: Ptr RawOGRCurve = castPtr fh
in cast_fptr_to_obj fh2
downcastOGRCurve ::
forall a . (FPtr a, IOGRCurve a) => OGRCurve -> a
downcastOGRCurve h
= let fh = get_fptr h
fh2 = castPtr fh
in cast_fptr_to_obj fh2