packages feed

hgdal-1.0.0.0: src/GDAL/OGRSurface/Interface.hs

{-# LANGUAGE EmptyDataDecls, ExistentialQuantification,
  FlexibleContexts, FlexibleInstances, ForeignFunctionInterface,
  MultiParamTypeClasses, ScopedTypeVariables, TypeFamilies,
  TypeSynonymInstances #-}
module GDAL.OGRSurface.Interface where
import Data.Word
import Data.Int
import Foreign.C
import Foreign.Ptr
import FFICXX.Runtime.Cast
import GDAL.OGRSurface.RawType
import GDAL.OGRGeometry.Interface

class (IOGRGeometry a) => IOGRSurface a where

upcastOGRSurface ::
                 forall a . (FPtr a, IOGRSurface a) => a -> OGRSurface
upcastOGRSurface h
  = let fh = get_fptr h
        fh2 :: Ptr RawOGRSurface = castPtr fh
      in cast_fptr_to_obj fh2

downcastOGRSurface ::
                   forall a . (FPtr a, IOGRSurface a) => OGRSurface -> a
downcastOGRSurface h
  = let fh = get_fptr h
        fh2 = castPtr fh
      in cast_fptr_to_obj fh2