{-# LANGUAGE EmptyDataDecls, ExistentialQuantification, FlexibleContexts, FlexibleInstances, ForeignFunctionInterface, MultiParamTypeClasses, ScopedTypeVariables, TypeFamilies, TypeSynonymInstances #-} module HROOT.Hist.TGraphErrors.Interface where import Data.Word import Data.Int import Foreign.C import Foreign.Ptr import FFICXX.Runtime.Cast import HROOT.Hist.TGraphErrors.RawType import HROOT.Hist.TGraph.Interface class (ITGraph a) => ITGraphErrors a where setPointError :: () => a -> CInt -> CDouble -> CDouble -> IO () upcastTGraphErrors :: forall a . (FPtr a, ITGraphErrors a) => a -> TGraphErrors upcastTGraphErrors :: forall a. (FPtr a, ITGraphErrors a) => a -> TGraphErrors upcastTGraphErrors a h = let fh :: Ptr (Raw a) fh = a -> Ptr (Raw a) forall a. FPtr a => a -> Ptr (Raw a) get_fptr a h Ptr RawTGraphErrors fh2 :: Ptr RawTGraphErrors = Ptr (Raw a) -> Ptr RawTGraphErrors forall a b. Ptr a -> Ptr b castPtr Ptr (Raw a) fh in Ptr (Raw TGraphErrors) -> TGraphErrors forall a. FPtr a => Ptr (Raw a) -> a cast_fptr_to_obj Ptr (Raw TGraphErrors) Ptr RawTGraphErrors fh2 downcastTGraphErrors :: forall a . (FPtr a, ITGraphErrors a) => TGraphErrors -> a downcastTGraphErrors :: forall a. (FPtr a, ITGraphErrors a) => TGraphErrors -> a downcastTGraphErrors TGraphErrors h = let fh :: Ptr (Raw TGraphErrors) fh = TGraphErrors -> Ptr (Raw TGraphErrors) forall a. FPtr a => a -> Ptr (Raw a) get_fptr TGraphErrors h fh2 :: Ptr (Raw a) fh2 = Ptr RawTGraphErrors -> Ptr (Raw a) forall a b. Ptr a -> Ptr b castPtr Ptr (Raw TGraphErrors) Ptr RawTGraphErrors fh in Ptr (Raw a) -> a forall a. FPtr a => Ptr (Raw a) -> a cast_fptr_to_obj Ptr (Raw a) fh2