packages feed

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

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

class (IDeletable a) => IOGRFeature a where

upcastOGRFeature ::
                 forall a . (FPtr a, IOGRFeature a) => a -> OGRFeature
upcastOGRFeature h
  = let fh = get_fptr h
        fh2 :: Ptr RawOGRFeature = castPtr fh
      in cast_fptr_to_obj fh2

downcastOGRFeature ::
                   forall a . (FPtr a, IOGRFeature a) => OGRFeature -> a
downcastOGRFeature h
  = let fh = get_fptr h
        fh2 = castPtr fh
      in cast_fptr_to_obj fh2