packages feed

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

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

class (IOGRGeometry a) => IOGRGeometryCollection a where

upcastOGRGeometryCollection ::
                            forall a . (FPtr a, IOGRGeometryCollection a) =>
                              a -> OGRGeometryCollection
upcastOGRGeometryCollection h
  = let fh = get_fptr h
        fh2 :: Ptr RawOGRGeometryCollection = castPtr fh
      in cast_fptr_to_obj fh2

downcastOGRGeometryCollection ::
                              forall a . (FPtr a, IOGRGeometryCollection a) =>
                                OGRGeometryCollection -> a
downcastOGRGeometryCollection h
  = let fh = get_fptr h
        fh2 = castPtr fh
      in cast_fptr_to_obj fh2