{-# LANGUAGE EmptyDataDecls, ExistentialQuantification, FlexibleContexts, FlexibleInstances, ForeignFunctionInterface, MultiParamTypeClasses, ScopedTypeVariables, TypeFamilies, TypeSynonymInstances #-} module HROOT.Graf.TGraphPolar.Interface where import Data.Word import Data.Int import Foreign.C import Foreign.Ptr import FFICXX.Runtime.Cast import HROOT.Graf.TGraphPolar.RawType import HROOT.Hist.TGraphErrors.Interface class (ITGraphErrors a) => ITGraphPolar a where upcastTGraphPolar :: forall a . (FPtr a, ITGraphPolar a) => a -> TGraphPolar upcastTGraphPolar :: forall a. (FPtr a, ITGraphPolar a) => a -> TGraphPolar upcastTGraphPolar 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 RawTGraphPolar fh2 :: Ptr RawTGraphPolar = Ptr (Raw a) -> Ptr RawTGraphPolar forall a b. Ptr a -> Ptr b castPtr Ptr (Raw a) fh in Ptr (Raw TGraphPolar) -> TGraphPolar forall a. FPtr a => Ptr (Raw a) -> a cast_fptr_to_obj Ptr (Raw TGraphPolar) Ptr RawTGraphPolar fh2 downcastTGraphPolar :: forall a . (FPtr a, ITGraphPolar a) => TGraphPolar -> a downcastTGraphPolar :: forall a. (FPtr a, ITGraphPolar a) => TGraphPolar -> a downcastTGraphPolar TGraphPolar h = let fh :: Ptr (Raw TGraphPolar) fh = TGraphPolar -> Ptr (Raw TGraphPolar) forall a. FPtr a => a -> Ptr (Raw a) get_fptr TGraphPolar h fh2 :: Ptr (Raw a) fh2 = Ptr RawTGraphPolar -> Ptr (Raw a) forall a b. Ptr a -> Ptr b castPtr Ptr (Raw TGraphPolar) Ptr RawTGraphPolar fh in Ptr (Raw a) -> a forall a. FPtr a => Ptr (Raw a) -> a cast_fptr_to_obj Ptr (Raw a) fh2