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