{-# LANGUAGE EmptyDataDecls, ExistentialQuantification, FlexibleContexts, FlexibleInstances, ForeignFunctionInterface, MultiParamTypeClasses, ScopedTypeVariables, TypeFamilies, TypeSynonymInstances #-} module HROOT.Hist.TH3C.Interface where import Data.Word import Foreign.C import Foreign.Ptr import FFICXX.Runtime.Cast import HROOT.Hist.TH3C.RawType import HROOT.Hist.TH3.Interface import HROOT.Core.TArrayC.Interface class (ITH3 a, ITArrayC a) => ITH3C a upcastTH3C :: forall a . (FPtr a, ITH3C a) => a -> TH3C upcastTH3C h = let fh = get_fptr h fh2 :: Ptr RawTH3C = castPtr fh in cast_fptr_to_obj fh2 downcastTH3C :: forall a . (FPtr a, ITH3C a) => TH3C -> a downcastTH3C h = let fh = get_fptr h fh2 = castPtr fh in cast_fptr_to_obj fh2