packages feed

HROOT-core-0.10.0.1: src/HROOT/Core/TArrayL64/Interface.hs

{-# LANGUAGE EmptyDataDecls, ExistentialQuantification,
  FlexibleContexts, FlexibleInstances, ForeignFunctionInterface,
  MultiParamTypeClasses, ScopedTypeVariables, TypeFamilies,
  TypeSynonymInstances #-}
module HROOT.Core.TArrayL64.Interface where
import Data.Word
import Data.Int
import Foreign.C
import Foreign.Ptr
import FFICXX.Runtime.Cast
import HROOT.Core.TArrayL64.RawType
import HROOT.Core.TArray.Interface

class (ITArray a) => ITArrayL64 a where

upcastTArrayL64 ::
                forall a . (FPtr a, ITArrayL64 a) => a -> TArrayL64
upcastTArrayL64 h
  = let fh = get_fptr h
        fh2 :: Ptr RawTArrayL64 = castPtr fh
      in cast_fptr_to_obj fh2

downcastTArrayL64 ::
                  forall a . (FPtr a, ITArrayL64 a) => TArrayL64 -> a
downcastTArrayL64 h
  = let fh = get_fptr h
        fh2 = castPtr fh
      in cast_fptr_to_obj fh2