HROOT-core-0.10.0.1: src/HROOT/Core/TArrayL/Interface.hs
{-# LANGUAGE EmptyDataDecls, ExistentialQuantification,
FlexibleContexts, FlexibleInstances, ForeignFunctionInterface,
MultiParamTypeClasses, ScopedTypeVariables, TypeFamilies,
TypeSynonymInstances #-}
module HROOT.Core.TArrayL.Interface where
import Data.Word
import Data.Int
import Foreign.C
import Foreign.Ptr
import FFICXX.Runtime.Cast
import HROOT.Core.TArrayL.RawType
import HROOT.Core.TArray.Interface
class (ITArray a) => ITArrayL a where
upcastTArrayL :: forall a . (FPtr a, ITArrayL a) => a -> TArrayL
upcastTArrayL h
= let fh = get_fptr h
fh2 :: Ptr RawTArrayL = castPtr fh
in cast_fptr_to_obj fh2
downcastTArrayL :: forall a . (FPtr a, ITArrayL a) => TArrayL -> a
downcastTArrayL h
= let fh = get_fptr h
fh2 = castPtr fh
in cast_fptr_to_obj fh2