HROOT-graf-0.10.0.1: src/HROOT/Graf/TSPHE/Interface.hs
{-# LANGUAGE EmptyDataDecls, ExistentialQuantification,
FlexibleContexts, FlexibleInstances, ForeignFunctionInterface,
MultiParamTypeClasses, ScopedTypeVariables, TypeFamilies,
TypeSynonymInstances #-}
module HROOT.Graf.TSPHE.Interface where
import Data.Word
import Data.Int
import Foreign.C
import Foreign.Ptr
import FFICXX.Runtime.Cast
import HROOT.Graf.TSPHE.RawType
import HROOT.Graf.TShape.Interface
class (ITShape a) => ITSPHE a where
upcastTSPHE :: forall a . (FPtr a, ITSPHE a) => a -> TSPHE
upcastTSPHE h
= let fh = get_fptr h
fh2 :: Ptr RawTSPHE = castPtr fh
in cast_fptr_to_obj fh2
downcastTSPHE :: forall a . (FPtr a, ITSPHE a) => TSPHE -> a
downcastTSPHE h
= let fh = get_fptr h
fh2 = castPtr fh
in cast_fptr_to_obj fh2