{-# LANGUAGE EmptyDataDecls, ExistentialQuantification, FlexibleContexts, FlexibleInstances, ForeignFunctionInterface, MultiParamTypeClasses, ScopedTypeVariables, TypeFamilies, TypeSynonymInstances #-} module HROOT.Graf.TTUBE.Interface where import Data.Word import Data.Int import Foreign.C import Foreign.Ptr import FFICXX.Runtime.Cast import HROOT.Graf.TTUBE.RawType import HROOT.Graf.TShape.Interface class (ITShape a) => ITTUBE a where upcastTTUBE :: forall a . (FPtr a, ITTUBE a) => a -> TTUBE upcastTTUBE h = let fh = get_fptr h fh2 :: Ptr RawTTUBE = castPtr fh in cast_fptr_to_obj fh2 downcastTTUBE :: forall a . (FPtr a, ITTUBE a) => TTUBE -> a downcastTTUBE h = let fh = get_fptr h fh2 = castPtr fh in cast_fptr_to_obj fh2