packages feed

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

{-# LANGUAGE EmptyDataDecls, FlexibleContexts, FlexibleInstances,
  ForeignFunctionInterface, IncoherentInstances,
  MultiParamTypeClasses, OverlappingInstances, TypeFamilies,
  TypeSynonymInstances #-}
module HROOT.Tree.TTree.Implementation where
import FFICXX.Runtime.Cast
import Data.Word
import Foreign.C
import Foreign.Ptr
import System.IO.Unsafe
import HROOT.Tree.TTree.RawType
import HROOT.Tree.TTree.FFI
import HROOT.Tree.TTree.Interface
import HROOT.Tree.TTree.Cast
import HROOT.Core.TClass.RawType
import HROOT.Core.TClass.Cast
import HROOT.Core.TClass.Interface
import HROOT.Tree.TBranch.RawType
import HROOT.Tree.TBranch.Cast
import HROOT.Tree.TBranch.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 ITTree TTree where
        branch = xform3 c_ttree_branch
        branch1 = xform4 c_ttree_branch1
        fillTree = xform0 c_ttree_filltree

instance ITNamed TTree where
        setName = xform1 c_ttree_setname
        setNameTitle = xform2 c_ttree_setnametitle
        setTitle = xform1 c_ttree_settitle

instance ITAttLine TTree where
        getLineColor = xform0 c_ttree_getlinecolor
        getLineStyle = xform0 c_ttree_getlinestyle
        getLineWidth = xform0 c_ttree_getlinewidth
        resetAttLine = xform1 c_ttree_resetattline
        setLineAttributes = xform0 c_ttree_setlineattributes
        setLineColor = xform1 c_ttree_setlinecolor
        setLineStyle = xform1 c_ttree_setlinestyle
        setLineWidth = xform1 c_ttree_setlinewidth

instance ITAttFill TTree where
        setFillColor = xform1 c_ttree_setfillcolor
        setFillStyle = xform1 c_ttree_setfillstyle

instance ITAttMarker TTree where
        getMarkerColor = xform0 c_ttree_getmarkercolor
        getMarkerStyle = xform0 c_ttree_getmarkerstyle
        getMarkerSize = xform0 c_ttree_getmarkersize
        resetAttMarker = xform1 c_ttree_resetattmarker
        setMarkerAttributes = xform0 c_ttree_setmarkerattributes
        setMarkerColor = xform1 c_ttree_setmarkercolor
        setMarkerStyle = xform1 c_ttree_setmarkerstyle
        setMarkerSize = xform1 c_ttree_setmarkersize

instance ITObject TTree where
        draw = xform1 c_ttree_draw
        findObject = xform1 c_ttree_findobject
        getName = xform0 c_ttree_getname
        isA = xform0 c_ttree_isa
        paint = xform1 c_ttree_paint
        printObj = xform1 c_ttree_printobj
        saveAs = xform2 c_ttree_saveas
        write = xform3 c_ttree_write

instance IDeletable TTree where
        delete = xform0 c_ttree_delete

newTTree ::
           (Castable c1 CString, Castable c0 CString) =>
           c0 -> c1 -> CInt -> IO TTree
newTTree = xform2 c_ttree_newttree