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