{-# LANGUAGE ForeignFunctionInterface, TypeFamilies, MultiParamTypeClasses, 
             FlexibleInstances, TypeSynonymInstances, 
             EmptyDataDecls, ExistentialQuantification, ScopedTypeVariables #-}

-- module HROOT.Class.Interface where

module HROOT.Hist.TGraphAsymmErrors.Interface where


import Data.Word
import Foreign.C
import Foreign.Ptr
import Foreign.ForeignPtr
import FFICXX.Runtime.Cast

import HROOT.Hist.TGraphAsymmErrors.RawType

import HROOT.Hist.TGraph.Interface
---- ============ ----



class (ITGraph a) => ITGraphAsymmErrors a where

instance Existable TGraphAsymmErrors where
  data Exist TGraphAsymmErrors = forall a. (FPtr a, ITGraphAsymmErrors a) => ETGraphAsymmErrors a

upcastTGraphAsymmErrors :: (FPtr a, ITGraphAsymmErrors a) => a -> TGraphAsymmErrors
upcastTGraphAsymmErrors h = let fh = get_fptr h
                                fh2 :: ForeignPtr RawTGraphAsymmErrors = castForeignPtr fh
                            in cast_fptr_to_obj fh2

downcastTGraphAsymmErrors :: (FPtr a, ITGraphAsymmErrors a) => TGraphAsymmErrors -> a 
downcastTGraphAsymmErrors h = let fh = get_fptr h
                                  fh2 = castForeignPtr fh
                              in cast_fptr_to_obj fh2