{-# LANGUAGE EmptyDataDecls, ExistentialQuantification, FlexibleContexts, FlexibleInstances, ForeignFunctionInterface, MultiParamTypeClasses, ScopedTypeVariables, TypeFamilies, TypeSynonymInstances #-} module GDAL.OGRCurvePolygon.Interface where import Data.Word import Data.Int import Foreign.C import Foreign.Ptr import FFICXX.Runtime.Cast import GDAL.OGRCurvePolygon.RawType import GDAL.OGRSurface.Interface class (IOGRSurface a) => IOGRCurvePolygon a where upcastOGRCurvePolygon :: forall a . (FPtr a, IOGRCurvePolygon a) => a -> OGRCurvePolygon upcastOGRCurvePolygon :: forall a. (FPtr a, IOGRCurvePolygon a) => a -> OGRCurvePolygon upcastOGRCurvePolygon a h = let fh :: Ptr (Raw a) fh = a -> Ptr (Raw a) forall a. FPtr a => a -> Ptr (Raw a) get_fptr a h Ptr RawOGRCurvePolygon fh2 :: Ptr RawOGRCurvePolygon = Ptr (Raw a) -> Ptr RawOGRCurvePolygon forall a b. Ptr a -> Ptr b castPtr Ptr (Raw a) fh in Ptr (Raw OGRCurvePolygon) -> OGRCurvePolygon forall a. FPtr a => Ptr (Raw a) -> a cast_fptr_to_obj Ptr (Raw OGRCurvePolygon) Ptr RawOGRCurvePolygon fh2 downcastOGRCurvePolygon :: forall a . (FPtr a, IOGRCurvePolygon a) => OGRCurvePolygon -> a downcastOGRCurvePolygon :: forall a. (FPtr a, IOGRCurvePolygon a) => OGRCurvePolygon -> a downcastOGRCurvePolygon OGRCurvePolygon h = let fh :: Ptr (Raw OGRCurvePolygon) fh = OGRCurvePolygon -> Ptr (Raw OGRCurvePolygon) forall a. FPtr a => a -> Ptr (Raw a) get_fptr OGRCurvePolygon h fh2 :: Ptr (Raw a) fh2 = Ptr RawOGRCurvePolygon -> Ptr (Raw a) forall a b. Ptr a -> Ptr b castPtr Ptr (Raw OGRCurvePolygon) Ptr RawOGRCurvePolygon fh in Ptr (Raw a) -> a forall a. FPtr a => Ptr (Raw a) -> a cast_fptr_to_obj Ptr (Raw a) fh2