{-# LANGUAGE EmptyDataDecls, ExistentialQuantification, FlexibleContexts, FlexibleInstances, ForeignFunctionInterface, MultiParamTypeClasses, ScopedTypeVariables, TypeFamilies, TypeSynonymInstances #-} module HROOT.Hist.TH2C.Interface where import Data.Word import Data.Int import Foreign.C import Foreign.Ptr import FFICXX.Runtime.Cast import HROOT.Hist.TH2C.RawType import HROOT.Hist.TH2.Interface import HROOT.Core.TArrayC.Interface class (ITH2 a, ITArrayC a) => ITH2C a where upcastTH2C :: forall a . (FPtr a, ITH2C a) => a -> TH2C upcastTH2C h = let fh = get_fptr h fh2 :: Ptr RawTH2C = castPtr fh in cast_fptr_to_obj fh2 downcastTH2C :: forall a . (FPtr a, ITH2C a) => TH2C -> a downcastTH2C h = let fh = get_fptr h fh2 = castPtr fh in cast_fptr_to_obj fh2