{-# LANGUAGE EmptyDataDecls, ExistentialQuantification, FlexibleContexts, FlexibleInstances, ForeignFunctionInterface, MultiParamTypeClasses, ScopedTypeVariables, TypeFamilies, TypeSynonymInstances #-} module HROOT.Core.TCollection.Interface where import Data.Word import Foreign.C import Foreign.Ptr import FFICXX.Runtime.Cast import HROOT.Core.TCollection.RawType import HROOT.Core.TObject.Interface class ITObject a => ITCollection a upcastTCollection :: forall a . (FPtr a, ITCollection a) => a -> TCollection upcastTCollection h = let fh = get_fptr h fh2 :: Ptr RawTCollection = castPtr fh in cast_fptr_to_obj fh2 downcastTCollection :: forall a . (FPtr a, ITCollection a) => TCollection -> a downcastTCollection h = let fh = get_fptr h fh2 = castPtr fh in cast_fptr_to_obj fh2