packages feed

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

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

class (IOGRCurve a) => IOGRSimpleCurve a where

upcastOGRSimpleCurve ::
                     forall a . (FPtr a, IOGRSimpleCurve a) => a -> OGRSimpleCurve
upcastOGRSimpleCurve h
  = let fh = get_fptr h
        fh2 :: Ptr RawOGRSimpleCurve = castPtr fh
      in cast_fptr_to_obj fh2

downcastOGRSimpleCurve ::
                       forall a . (FPtr a, IOGRSimpleCurve a) => OGRSimpleCurve -> a
downcastOGRSimpleCurve h
  = let fh = get_fptr h
        fh2 = castPtr fh
      in cast_fptr_to_obj fh2