packages feed

HROOT-tree-0.9.0.1: src/HROOT/Tree/TChain/Implementation.hs

{-# LANGUAGE EmptyDataDecls, FlexibleContexts, FlexibleInstances,
  ForeignFunctionInterface, IncoherentInstances,
  MultiParamTypeClasses, OverlappingInstances, TypeFamilies,
  TypeSynonymInstances #-}
module HROOT.Tree.TChain.Implementation where
import FFICXX.Runtime.Cast
import Data.Word
import Foreign.C
import Foreign.Ptr
import System.IO.Unsafe
import HROOT.Tree.TChain.RawType
import HROOT.Tree.TChain.FFI
import HROOT.Tree.TChain.Interface
import HROOT.Tree.TChain.Cast
import HROOT.Tree.TBranch.RawType
import HROOT.Tree.TBranch.Cast
import HROOT.Tree.TBranch.Interface
import HROOT.Core.TClass.RawType
import HROOT.Core.TClass.Cast
import HROOT.Core.TClass.Interface
import HROOT.Tree.TTree.RawType
import HROOT.Tree.TTree.Cast
import HROOT.Tree.TTree.Interface
import HROOT.Core.TNamed.RawType
import HROOT.Core.TNamed.Cast
import HROOT.Core.TNamed.Interface
import HROOT.Core.TAttLine.RawType
import HROOT.Core.TAttLine.Cast
import HROOT.Core.TAttLine.Interface
import HROOT.Core.TAttFill.RawType
import HROOT.Core.TAttFill.Cast
import HROOT.Core.TAttFill.Interface
import HROOT.Core.TAttMarker.RawType
import HROOT.Core.TAttMarker.Cast
import HROOT.Core.TAttMarker.Interface
import HROOT.Core.TObject.RawType
import HROOT.Core.TObject.Cast
import HROOT.Core.TObject.Interface
import HROOT.Core.Deletable.RawType
import HROOT.Core.Deletable.Cast
import HROOT.Core.Deletable.Interface

instance ITChain TChain where
        addChain = xform1 c_tchain_addchain
        addChain1 = xform2 c_tchain_addchain1

instance ITTree TChain where
        branch = xform3 c_tchain_branch
        branch1 = xform4 c_tchain_branch1
        fillTree = xform0 c_tchain_filltree

instance ITNamed TChain where
        setName = xform1 c_tchain_setname
        setNameTitle = xform2 c_tchain_setnametitle
        setTitle = xform1 c_tchain_settitle

instance ITAttLine TChain where
        getLineColor = xform0 c_tchain_getlinecolor
        getLineStyle = xform0 c_tchain_getlinestyle
        getLineWidth = xform0 c_tchain_getlinewidth
        resetAttLine = xform1 c_tchain_resetattline
        setLineAttributes = xform0 c_tchain_setlineattributes
        setLineColor = xform1 c_tchain_setlinecolor
        setLineStyle = xform1 c_tchain_setlinestyle
        setLineWidth = xform1 c_tchain_setlinewidth

instance ITAttFill TChain where
        setFillColor = xform1 c_tchain_setfillcolor
        setFillStyle = xform1 c_tchain_setfillstyle

instance ITAttMarker TChain where
        getMarkerColor = xform0 c_tchain_getmarkercolor
        getMarkerStyle = xform0 c_tchain_getmarkerstyle
        getMarkerSize = xform0 c_tchain_getmarkersize
        resetAttMarker = xform1 c_tchain_resetattmarker
        setMarkerAttributes = xform0 c_tchain_setmarkerattributes
        setMarkerColor = xform1 c_tchain_setmarkercolor
        setMarkerStyle = xform1 c_tchain_setmarkerstyle
        setMarkerSize = xform1 c_tchain_setmarkersize

instance ITObject TChain where
        draw = xform1 c_tchain_draw
        findObject = xform1 c_tchain_findobject
        getName = xform0 c_tchain_getname
        isA = xform0 c_tchain_isa
        paint = xform1 c_tchain_paint
        printObj = xform1 c_tchain_printobj
        saveAs = xform2 c_tchain_saveas
        write = xform3 c_tchain_write

instance IDeletable TChain where
        delete = xform0 c_tchain_delete

newTChain ::
            (Castable c1 CString, Castable c0 CString) => c0 -> c1 -> IO TChain
newTChain = xform1 c_tchain_newtchain