{-# LANGUAGE ForeignFunctionInterface, TypeFamilies, MultiParamTypeClasses, FlexibleInstances, TypeSynonymInstances, EmptyDataDecls, ExistentialQuantification, ScopedTypeVariables #-} -- module HROOT.Class.Interface where module HROOT.Core.TAttBBox.Interface where import Data.Word import Foreign.C import Foreign.Ptr import Foreign.ForeignPtr import FFICXX.Runtime.Cast import HROOT.Core.TAttBBox.RawType import HROOT.Core.Deletable.Interface ---- ============ ---- class (IDeletable a) => ITAttBBox a where instance Existable TAttBBox where data Exist TAttBBox = forall a. (FPtr a, ITAttBBox a) => ETAttBBox a upcastTAttBBox :: (FPtr a, ITAttBBox a) => a -> TAttBBox upcastTAttBBox h = let fh = get_fptr h fh2 :: ForeignPtr RawTAttBBox = castForeignPtr fh in cast_fptr_to_obj fh2 downcastTAttBBox :: (FPtr a, ITAttBBox a) => TAttBBox -> a downcastTAttBBox h = let fh = get_fptr h fh2 = castForeignPtr fh in cast_fptr_to_obj fh2