{-# LANGUAGE EmptyDataDecls, ExistentialQuantification, FlexibleContexts, FlexibleInstances, ForeignFunctionInterface, MultiParamTypeClasses, ScopedTypeVariables, TypeFamilies, TypeSynonymInstances #-} module HROOT.Core.TDatime.Interface where import Data.Word import Data.Int import Foreign.C import Foreign.Ptr import FFICXX.Runtime.Cast import HROOT.Core.TDatime.RawType import STD.Deletable.Interface class (IDeletable a) => ITDatime a where convert :: () => a -> CBool -> IO CUInt setTDatime :: () => a -> CUInt -> IO () upcastTDatime :: forall a . (FPtr a, ITDatime a) => a -> TDatime upcastTDatime :: forall a. (FPtr a, ITDatime a) => a -> TDatime upcastTDatime 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 RawTDatime fh2 :: Ptr RawTDatime = Ptr (Raw a) -> Ptr RawTDatime forall a b. Ptr a -> Ptr b castPtr Ptr (Raw a) fh in Ptr (Raw TDatime) -> TDatime forall a. FPtr a => Ptr (Raw a) -> a cast_fptr_to_obj Ptr (Raw TDatime) Ptr RawTDatime fh2 downcastTDatime :: forall a . (FPtr a, ITDatime a) => TDatime -> a downcastTDatime :: forall a. (FPtr a, ITDatime a) => TDatime -> a downcastTDatime TDatime h = let fh :: Ptr (Raw TDatime) fh = TDatime -> Ptr (Raw TDatime) forall a. FPtr a => a -> Ptr (Raw a) get_fptr TDatime h fh2 :: Ptr (Raw a) fh2 = Ptr RawTDatime -> Ptr (Raw a) forall a b. Ptr a -> Ptr b castPtr Ptr (Raw TDatime) Ptr RawTDatime fh in Ptr (Raw a) -> a forall a. FPtr a => Ptr (Raw a) -> a cast_fptr_to_obj Ptr (Raw a) fh2