packages feed

HROOT-graf-0.9: src/HROOT/Graf/TGraphPolar/Interface.hs

{-# LANGUAGE EmptyDataDecls, ExistentialQuantification,
  FlexibleContexts, FlexibleInstances, ForeignFunctionInterface,
  MultiParamTypeClasses, ScopedTypeVariables, TypeFamilies,
  TypeSynonymInstances #-}
module HROOT.Graf.TGraphPolar.Interface where
import Data.Word
import Foreign.C
import Foreign.Ptr
import FFICXX.Runtime.Cast
import HROOT.Graf.TGraphPolar.RawType
import HROOT.Hist.TGraphErrors.Interface

class ITGraphErrors a => ITGraphPolar a

upcastTGraphPolar ::
                  forall a . (FPtr a, ITGraphPolar a) => a -> TGraphPolar
upcastTGraphPolar h
  = let fh = get_fptr h
        fh2 :: Ptr RawTGraphPolar = castPtr fh
      in cast_fptr_to_obj fh2

downcastTGraphPolar ::
                    forall a . (FPtr a, ITGraphPolar a) => TGraphPolar -> a
downcastTGraphPolar h
  = let fh = get_fptr h
        fh2 = castPtr fh
      in cast_fptr_to_obj fh2