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

class (ITNamed a, ITAttLine a, ITAttFill a, ITAttMarker a) =>
      ITGraph2D a where
        setN :: () => a -> CInt -> IO ()
        
        setPointXYZ ::
                      () => a -> CInt -> CDouble -> CDouble -> CDouble -> IO ()

upcastTGraph2D :: forall a . (FPtr a, ITGraph2D a) => a -> TGraph2D
upcastTGraph2D :: forall a. (FPtr a, ITGraph2D a) => a -> TGraph2D
upcastTGraph2D a
h
  = let fh :: Ptr (Raw a)
fh = a -> Ptr (Raw a)
forall a. FPtr a => a -> Ptr (Raw a)
get_fptr a
h
        Ptr RawTGraph2D
fh2 :: Ptr RawTGraph2D = Ptr (Raw a) -> Ptr RawTGraph2D
forall a b. Ptr a -> Ptr b
castPtr Ptr (Raw a)
fh
      in Ptr (Raw TGraph2D) -> TGraph2D
forall a. FPtr a => Ptr (Raw a) -> a
cast_fptr_to_obj Ptr (Raw TGraph2D)
Ptr RawTGraph2D
fh2

downcastTGraph2D ::
                 forall a . (FPtr a, ITGraph2D a) => TGraph2D -> a
downcastTGraph2D :: forall a. (FPtr a, ITGraph2D a) => TGraph2D -> a
downcastTGraph2D TGraph2D
h
  = let fh :: Ptr (Raw TGraph2D)
fh = TGraph2D -> Ptr (Raw TGraph2D)
forall a. FPtr a => a -> Ptr (Raw a)
get_fptr TGraph2D
h
        fh2 :: Ptr (Raw a)
fh2 = Ptr RawTGraph2D -> Ptr (Raw a)
forall a b. Ptr a -> Ptr b
castPtr Ptr (Raw TGraph2D)
Ptr RawTGraph2D
fh
      in Ptr (Raw a) -> a
forall a. FPtr a => Ptr (Raw a) -> a
cast_fptr_to_obj Ptr (Raw a)
fh2