hgdal-1.0.0.0: src/GDAL/OGRPoint/Interface.hs
{-# LANGUAGE EmptyDataDecls, ExistentialQuantification,
FlexibleContexts, FlexibleInstances, ForeignFunctionInterface,
MultiParamTypeClasses, ScopedTypeVariables, TypeFamilies,
TypeSynonymInstances #-}
module GDAL.OGRPoint.Interface where
import Data.Word
import Data.Int
import Foreign.C
import Foreign.Ptr
import FFICXX.Runtime.Cast
import GDAL.OGRPoint.RawType
import GDAL.OGRGeometry.Interface
class (IOGRGeometry a) => IOGRPoint a where
upcastOGRPoint :: forall a . (FPtr a, IOGRPoint a) => a -> OGRPoint
upcastOGRPoint h
= let fh = get_fptr h
fh2 :: Ptr RawOGRPoint = castPtr fh
in cast_fptr_to_obj fh2
downcastOGRPoint ::
forall a . (FPtr a, IOGRPoint a) => OGRPoint -> a
downcastOGRPoint h
= let fh = get_fptr h
fh2 = castPtr fh
in cast_fptr_to_obj fh2