HROOT-hist-0.8: src/HROOT/Hist/TGraphBentErrors/Interface.hs
{-# LANGUAGE ForeignFunctionInterface, TypeFamilies, MultiParamTypeClasses,
FlexibleInstances, TypeSynonymInstances,
EmptyDataDecls, ExistentialQuantification, ScopedTypeVariables #-}
-- module HROOT.Class.Interface where
module HROOT.Hist.TGraphBentErrors.Interface where
import Data.Word
import Foreign.C
import Foreign.Ptr
import Foreign.ForeignPtr
import FFICXX.Runtime.Cast
import HROOT.Hist.TGraphBentErrors.RawType
import HROOT.Hist.TGraph.Interface
---- ============ ----
class (ITGraph a) => ITGraphBentErrors a where
instance Existable TGraphBentErrors where
data Exist TGraphBentErrors = forall a. (FPtr a, ITGraphBentErrors a) => ETGraphBentErrors a
upcastTGraphBentErrors :: (FPtr a, ITGraphBentErrors a) => a -> TGraphBentErrors
upcastTGraphBentErrors h = let fh = get_fptr h
fh2 :: ForeignPtr RawTGraphBentErrors = castForeignPtr fh
in cast_fptr_to_obj fh2
downcastTGraphBentErrors :: (FPtr a, ITGraphBentErrors a) => TGraphBentErrors -> a
downcastTGraphBentErrors h = let fh = get_fptr h
fh2 = castForeignPtr fh
in cast_fptr_to_obj fh2