HROOT-0.7: src/HROOT/Class/TDatime/Interface.hs
{-# LANGUAGE ForeignFunctionInterface, TypeFamilies, MultiParamTypeClasses,
FlexibleInstances, TypeSynonymInstances,
EmptyDataDecls, ExistentialQuantification, ScopedTypeVariables #-}
-- module HROOT.Class.Interface where
module HROOT.Class.TDatime.Interface where
import Data.Word
import Foreign.ForeignPtr
import HROOT.TypeCast
import HROOT.Class.TDatime.RawType
import HROOT.Class.Deletable.Interface
class (IDeletable a) => ITDatime a where
convert :: a -> Int -> IO Word
setTDatime :: a -> Word -> IO ()
instance Existable TDatime where
data Exist TDatime = forall a. (FPtr a, ITDatime a) => ETDatime a
upcastTDatime :: (FPtr a, ITDatime a) => a -> TDatime
upcastTDatime h = let fh = get_fptr h
fh2 :: ForeignPtr RawTDatime = castForeignPtr fh
in cast_fptr_to_obj fh2