HROOT-hist-0.9: src/HROOT/Hist/TH2I/Interface.hs
{-# LANGUAGE EmptyDataDecls, ExistentialQuantification,
FlexibleContexts, FlexibleInstances, ForeignFunctionInterface,
MultiParamTypeClasses, ScopedTypeVariables, TypeFamilies,
TypeSynonymInstances #-}
module HROOT.Hist.TH2I.Interface where
import Data.Word
import Foreign.C
import Foreign.Ptr
import FFICXX.Runtime.Cast
import HROOT.Hist.TH2I.RawType
import HROOT.Hist.TH2.Interface
import HROOT.Core.TArrayI.Interface
class (ITH2 a, ITArrayI a) => ITH2I a
upcastTH2I :: forall a . (FPtr a, ITH2I a) => a -> TH2I
upcastTH2I h
= let fh = get_fptr h
fh2 :: Ptr RawTH2I = castPtr fh
in cast_fptr_to_obj fh2
downcastTH2I :: forall a . (FPtr a, ITH2I a) => TH2I -> a
downcastTH2I h
= let fh = get_fptr h
fh2 = castPtr fh
in cast_fptr_to_obj fh2