hgdal-1.0.0.0: src/GDAL/OGREnvelope/Interface.hs
{-# 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 h
= let fh = get_fptr h
fh2 :: Ptr RawOGREnvelope = castPtr fh
in cast_fptr_to_obj fh2
downcastOGREnvelope ::
forall a . (FPtr a, IOGREnvelope a) => OGREnvelope -> a
downcastOGREnvelope h
= let fh = get_fptr h
fh2 = castPtr fh
in cast_fptr_to_obj fh2