{-# LANGUAGE EmptyDataDecls, ExistentialQuantification, FlexibleContexts, FlexibleInstances, ForeignFunctionInterface, MultiParamTypeClasses, ScopedTypeVariables, TypeFamilies, TypeSynonymInstances #-} module GDAL.OGREnvelope.Interface where import Data.Word import Data.Int import Foreign.C import Foreign.Ptr import FFICXX.Runtime.Cast import GDAL.OGREnvelope.RawType import STD.Deletable.Interface class (IDeletable a) => IOGREnvelope a where upcastOGREnvelope :: forall a . (FPtr a, IOGREnvelope a) => a -> OGREnvelope upcastOGREnvelope :: forall a. (FPtr a, IOGREnvelope a) => a -> OGREnvelope upcastOGREnvelope 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 RawOGREnvelope fh2 :: Ptr RawOGREnvelope = Ptr (Raw a) -> Ptr RawOGREnvelope forall a b. Ptr a -> Ptr b castPtr Ptr (Raw a) fh in Ptr (Raw OGREnvelope) -> OGREnvelope forall a. FPtr a => Ptr (Raw a) -> a cast_fptr_to_obj Ptr (Raw OGREnvelope) Ptr RawOGREnvelope fh2 downcastOGREnvelope :: forall a . (FPtr a, IOGREnvelope a) => OGREnvelope -> a downcastOGREnvelope :: forall a. (FPtr a, IOGREnvelope a) => OGREnvelope -> a downcastOGREnvelope OGREnvelope h = let fh :: Ptr (Raw OGREnvelope) fh = OGREnvelope -> Ptr (Raw OGREnvelope) forall a. FPtr a => a -> Ptr (Raw a) get_fptr OGREnvelope h fh2 :: Ptr (Raw a) fh2 = Ptr RawOGREnvelope -> Ptr (Raw a) forall a b. Ptr a -> Ptr b castPtr Ptr (Raw OGREnvelope) Ptr RawOGREnvelope fh in Ptr (Raw a) -> a forall a. FPtr a => Ptr (Raw a) -> a cast_fptr_to_obj Ptr (Raw a) fh2