{-# LANGUAGE EmptyDataDecls, ExistentialQuantification, FlexibleContexts, FlexibleInstances, ForeignFunctionInterface, MultiParamTypeClasses, ScopedTypeVariables, TypeFamilies, TypeSynonymInstances #-} module HROOT.Core.TSeqCollection.Interface where import Data.Word import Data.Int import Foreign.C import Foreign.Ptr import FFICXX.Runtime.Cast import HROOT.Core.TSeqCollection.RawType import HROOT.Core.TCollection.Interface class (ITCollection a) => ITSeqCollection a where upcastTSeqCollection :: forall a . (FPtr a, ITSeqCollection a) => a -> TSeqCollection upcastTSeqCollection :: forall a. (FPtr a, ITSeqCollection a) => a -> TSeqCollection upcastTSeqCollection 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 RawTSeqCollection fh2 :: Ptr RawTSeqCollection = Ptr (Raw a) -> Ptr RawTSeqCollection forall a b. Ptr a -> Ptr b castPtr Ptr (Raw a) fh in Ptr (Raw TSeqCollection) -> TSeqCollection forall a. FPtr a => Ptr (Raw a) -> a cast_fptr_to_obj Ptr (Raw TSeqCollection) Ptr RawTSeqCollection fh2 downcastTSeqCollection :: forall a . (FPtr a, ITSeqCollection a) => TSeqCollection -> a downcastTSeqCollection :: forall a. (FPtr a, ITSeqCollection a) => TSeqCollection -> a downcastTSeqCollection TSeqCollection h = let fh :: Ptr (Raw TSeqCollection) fh = TSeqCollection -> Ptr (Raw TSeqCollection) forall a. FPtr a => a -> Ptr (Raw a) get_fptr TSeqCollection h fh2 :: Ptr (Raw a) fh2 = Ptr RawTSeqCollection -> Ptr (Raw a) forall a b. Ptr a -> Ptr b castPtr Ptr (Raw TSeqCollection) Ptr RawTSeqCollection fh in Ptr (Raw a) -> a forall a. FPtr a => Ptr (Raw a) -> a cast_fptr_to_obj Ptr (Raw a) fh2