HROOT-hist-0.10.0.1: src/HROOT/Hist/TH2Poly/Interface.hs
{-# LANGUAGE EmptyDataDecls, ExistentialQuantification,
FlexibleContexts, FlexibleInstances, ForeignFunctionInterface,
MultiParamTypeClasses, ScopedTypeVariables, TypeFamilies,
TypeSynonymInstances #-}
module HROOT.Hist.TH2Poly.Interface where
import Data.Word
import Data.Int
import Foreign.C
import Foreign.Ptr
import FFICXX.Runtime.Cast
import HROOT.Hist.TH2Poly.RawType
import HROOT.Hist.TH2.Interface
import HROOT.Core.TObject.Interface
class (ITH2 a) => ITH2Poly a where
addBin :: (ITObject c0, FPtr c0) => a -> c0 -> IO CInt
fillS :: (Castable c0 CString) => a -> c0 -> CDouble -> IO CInt
upcastTH2Poly :: forall a . (FPtr a, ITH2Poly a) => a -> TH2Poly
upcastTH2Poly h
= let fh = get_fptr h
fh2 :: Ptr RawTH2Poly = castPtr fh
in cast_fptr_to_obj fh2
downcastTH2Poly :: forall a . (FPtr a, ITH2Poly a) => TH2Poly -> a
downcastTH2Poly h
= let fh = get_fptr h
fh2 = castPtr fh
in cast_fptr_to_obj fh2