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