{-# LANGUAGE EmptyDataDecls, ExistentialQuantification, FlexibleContexts, FlexibleInstances, ForeignFunctionInterface, MultiParamTypeClasses, ScopedTypeVariables, TypeFamilies, TypeSynonymInstances #-} module OGDF.DPoint.Interface where import Data.Word import Data.Int import Foreign.C import Foreign.Ptr import FFICXX.Runtime.Cast import OGDF.DPoint.RawType import STD.Deletable.Interface class (IDeletable a) => IDPoint a where upcastDPoint :: forall a . (FPtr a, IDPoint a) => a -> DPoint upcastDPoint :: forall a. (FPtr a, IDPoint a) => a -> DPoint upcastDPoint a h = let fh :: Ptr (Raw a) fh = a -> Ptr (Raw a) forall a. FPtr a => a -> Ptr (Raw a) get_fptr a h Ptr RawDPoint fh2 :: Ptr RawDPoint = Ptr (Raw a) -> Ptr RawDPoint forall a b. Ptr a -> Ptr b castPtr Ptr (Raw a) fh in Ptr (Raw DPoint) -> DPoint forall a. FPtr a => Ptr (Raw a) -> a cast_fptr_to_obj Ptr (Raw DPoint) Ptr RawDPoint fh2 downcastDPoint :: forall a . (FPtr a, IDPoint a) => DPoint -> a downcastDPoint :: forall a. (FPtr a, IDPoint a) => DPoint -> a downcastDPoint DPoint h = let fh :: Ptr (Raw DPoint) fh = DPoint -> Ptr (Raw DPoint) forall a. FPtr a => a -> Ptr (Raw a) get_fptr DPoint h fh2 :: Ptr (Raw a) fh2 = Ptr RawDPoint -> Ptr (Raw a) forall a b. Ptr a -> Ptr b castPtr Ptr (Raw DPoint) Ptr RawDPoint fh in Ptr (Raw a) -> a forall a. FPtr a => Ptr (Raw a) -> a cast_fptr_to_obj Ptr (Raw a) fh2