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

-- module HROOT.Class.Interface where

module HROOT.Class.TPolyLine.Interface where


import Data.Word
import Foreign.ForeignPtr
import HROOT.TypeCast

import HROOT.Class.TPolyLine.RawType

import HROOT.Class.TObject.Interface
import HROOT.Class.TAttLine.Interface
import HROOT.Class.TAttFill.Interface


class (ITObject a,ITAttLine a,ITAttFill a) => ITPolyLine a where

instance Existable TPolyLine where
  data Exist TPolyLine = forall a. (FPtr a, ITPolyLine a) => ETPolyLine a

upcastTPolyLine :: (FPtr a, ITPolyLine a) => a -> TPolyLine
upcastTPolyLine h = let fh = get_fptr h
                        fh2 :: ForeignPtr RawTPolyLine = castForeignPtr fh
                    in cast_fptr_to_obj fh2