HROOT-core 0.9.0.1 → 0.10.0.1
raw patch · 309 files changed
+6292/−3150 lines, 309 filesdep +stdcxxdep ~fficxxdep ~fficxx-runtimesetup-changed
Dependencies added: stdcxx
Dependency ranges changed: fficxx, fficxx-runtime
Files
- CHANGES +60/−0
- Config.hs +0/−85
- HROOT-core.cabal +166/−99
- Setup.hs +27/−0
- Setup.lhs +0/−33
- csrc/HROOT-coreTopLevel.cpp +36/−10
- csrc/HROOT-coreTopLevel.h +8/−8
- csrc/HROOT-coreType.h +81/−203
- csrc/HROOTCoreDeletable.cpp +0/−17
- csrc/HROOTCoreDeletable.h +0/−37
- csrc/HROOTCoreRectangle_t.cpp +23/−0
- csrc/HROOTCoreRectangle_t.h +78/−0
- csrc/HROOTCoreTApplication.cpp +12/−9
- csrc/HROOTCoreTApplication.h +30/−26
- csrc/HROOTCoreTArray.cpp +12/−10
- csrc/HROOTCoreTArray.h +35/−14
- csrc/HROOTCoreTArrayC.cpp +11/−9
- csrc/HROOTCoreTArrayC.h +21/−15
- csrc/HROOTCoreTArrayD.cpp +11/−9
- csrc/HROOTCoreTArrayD.h +28/−15
- csrc/HROOTCoreTArrayF.cpp +11/−9
- csrc/HROOTCoreTArrayF.h +21/−15
- csrc/HROOTCoreTArrayI.cpp +11/−9
- csrc/HROOTCoreTArrayI.h +21/−15
- csrc/HROOTCoreTArrayL.cpp +11/−9
- csrc/HROOTCoreTArrayL.h +21/−15
- csrc/HROOTCoreTArrayL64.cpp +11/−9
- csrc/HROOTCoreTArrayL64.h +21/−15
- csrc/HROOTCoreTArrayS.cpp +11/−9
- csrc/HROOTCoreTArrayS.h +21/−15
- csrc/HROOTCoreTAtt3D.cpp +12/−10
- csrc/HROOTCoreTAtt3D.h +21/−14
- csrc/HROOTCoreTAttAxis.cpp +12/−10
- csrc/HROOTCoreTAttAxis.h +109/−105
- csrc/HROOTCoreTAttBBox.cpp +12/−10
- csrc/HROOTCoreTAttBBox.h +21/−14
- csrc/HROOTCoreTAttBBox2D.cpp +24/−0
- csrc/HROOTCoreTAttBBox2D.h +70/−0
- csrc/HROOTCoreTAttCanvas.cpp +12/−10
- csrc/HROOTCoreTAttCanvas.h +25/−20
- csrc/HROOTCoreTAttFill.cpp +12/−10
- csrc/HROOTCoreTAttFill.h +33/−29
- csrc/HROOTCoreTAttLine.cpp +12/−10
- csrc/HROOTCoreTAttLine.h +61/−57
- csrc/HROOTCoreTAttMarker.cpp +12/−10
- csrc/HROOTCoreTAttMarker.h +57/−53
- csrc/HROOTCoreTAttPad.cpp +12/−10
- csrc/HROOTCoreTAttPad.h +169/−165
- csrc/HROOTCoreTAttText.cpp +12/−10
- csrc/HROOTCoreTAttText.h +77/−73
- csrc/HROOTCoreTClass.cpp +11/−9
- csrc/HROOTCoreTClass.h +25/−17
- csrc/HROOTCoreTCollection.cpp +11/−9
- csrc/HROOTCoreTCollection.h +21/−15
- csrc/HROOTCoreTColor.cpp +27/−0
- csrc/HROOTCoreTColor.h +64/−0
- csrc/HROOTCoreTDatime.cpp +23/−0
- csrc/HROOTCoreTDatime.h +87/−0
- csrc/HROOTCoreTDictionary.cpp +12/−9
- csrc/HROOTCoreTDictionary.h +23/−16
- csrc/HROOTCoreTDirectory.cpp +13/−9
- csrc/HROOTCoreTDirectory.h +53/−48
- csrc/HROOTCoreTGlobal.cpp +11/−9
- csrc/HROOTCoreTGlobal.h +25/−17
- csrc/HROOTCoreTKey.cpp +13/−9
- csrc/HROOTCoreTKey.h +27/−22
- csrc/HROOTCoreTMutex.cpp +24/−0
- csrc/HROOTCoreTMutex.h +51/−0
- csrc/HROOTCoreTNamed.cpp +11/−9
- csrc/HROOTCoreTNamed.h +37/−34
- csrc/HROOTCoreTObjArray.cpp +11/−9
- csrc/HROOTCoreTObjArray.h +25/−17
- csrc/HROOTCoreTObject.cpp +13/−10
- csrc/HROOTCoreTObject.h +70/−56
- csrc/HROOTCoreTQObject.cpp +12/−10
- csrc/HROOTCoreTQObject.h +21/−14
- csrc/HROOTCoreTROOT.cpp +11/−9
- csrc/HROOTCoreTROOT.h +33/−26
- csrc/HROOTCoreTSeqCollection.cpp +11/−9
- csrc/HROOTCoreTSeqCollection.h +23/−16
- csrc/HROOTCoreTStyle.cpp +37/−0
- csrc/HROOTCoreTStyle.h +111/−0
- csrc/HROOTCoreTSystem.cpp +11/−9
- csrc/HROOTCoreTSystem.h +27/−21
- csrc/HROOTCoreTVirtualMutex.cpp +22/−0
- csrc/HROOTCoreTVirtualMutex.h +70/−0
- csrc/HROOTCoreTVirtualPad.cpp +23/−9
- csrc/HROOTCoreTVirtualPad.h +68/−36
- src/HROOT/Core.hs +35/−62
- src/HROOT/Core/Deletable.hs +0/−4
- src/HROOT/Core/Deletable/Cast.hs +0/−9
- src/HROOT/Core/Deletable/FFI.hsc +0/−5
- src/HROOT/Core/Deletable/Implementation.hs +0/−14
- src/HROOT/Core/Deletable/Interface.hs +0/−13
- src/HROOT/Core/Deletable/RawType.hs +0/−6
- src/HROOT/Core/Ordinary.hs +45/−0
- src/HROOT/Core/Rectangle_t.hs +7/−0
- src/HROOT/Core/Rectangle_t/Cast.hs +19/−0
- src/HROOT/Core/Rectangle_t/FFI.hsc +36/−0
- src/HROOT/Core/Rectangle_t/Implementation.hs +55/−0
- src/HROOT/Core/Rectangle_t/Interface.hs +28/−0
- src/HROOT/Core/Rectangle_t/RawType.hs +16/−0
- src/HROOT/Core/TApplication/Cast.hs +4/−3
- src/HROOT/Core/TApplication/FFI.hsc +25/−15
- src/HROOT/Core/TApplication/Implementation.hs +23/−12
- src/HROOT/Core/TApplication/Interface.hs +2/−1
- src/HROOT/Core/TApplication/RawType.hs +2/−2
- src/HROOT/Core/TArray.hs +3/−1
- src/HROOT/Core/TArray/Cast.hs +2/−2
- src/HROOT/Core/TArray/FFI.hsc +21/−3
- src/HROOT/Core/TArray/Implementation.hs +23/−8
- src/HROOT/Core/TArray/Interface.hs +8/−2
- src/HROOT/Core/TArray/RawType.hs +2/−2
- src/HROOT/Core/TArrayC/Cast.hs +3/−2
- src/HROOT/Core/TArrayC/FFI.hsc +19/−3
- src/HROOT/Core/TArrayC/Implementation.hs +21/−9
- src/HROOT/Core/TArrayC/Interface.hs +2/−1
- src/HROOT/Core/TArrayC/RawType.hs +2/−2
- src/HROOT/Core/TArrayD.hs +3/−1
- src/HROOT/Core/TArrayD/Cast.hs +3/−2
- src/HROOT/Core/TArrayD/FFI.hsc +27/−3
- src/HROOT/Core/TArrayD/Implementation.hs +27/−9
- src/HROOT/Core/TArrayD/Interface.hs +2/−1
- src/HROOT/Core/TArrayD/RawType.hs +2/−2
- src/HROOT/Core/TArrayF/Cast.hs +3/−2
- src/HROOT/Core/TArrayF/FFI.hsc +19/−3
- src/HROOT/Core/TArrayF/Implementation.hs +21/−9
- src/HROOT/Core/TArrayF/Interface.hs +2/−1
- src/HROOT/Core/TArrayF/RawType.hs +2/−2
- src/HROOT/Core/TArrayI/Cast.hs +3/−2
- src/HROOT/Core/TArrayI/FFI.hsc +19/−3
- src/HROOT/Core/TArrayI/Implementation.hs +21/−9
- src/HROOT/Core/TArrayI/Interface.hs +2/−1
- src/HROOT/Core/TArrayI/RawType.hs +2/−2
- src/HROOT/Core/TArrayL/Cast.hs +3/−2
- src/HROOT/Core/TArrayL/FFI.hsc +19/−3
- src/HROOT/Core/TArrayL/Implementation.hs +21/−9
- src/HROOT/Core/TArrayL/Interface.hs +2/−1
- src/HROOT/Core/TArrayL/RawType.hs +2/−2
- src/HROOT/Core/TArrayL64/Cast.hs +2/−2
- src/HROOT/Core/TArrayL64/FFI.hsc +19/−3
- src/HROOT/Core/TArrayL64/Implementation.hs +21/−9
- src/HROOT/Core/TArrayL64/Interface.hs +2/−1
- src/HROOT/Core/TArrayL64/RawType.hs +2/−2
- src/HROOT/Core/TArrayS/Cast.hs +3/−2
- src/HROOT/Core/TArrayS/FFI.hsc +19/−3
- src/HROOT/Core/TArrayS/Implementation.hs +21/−9
- src/HROOT/Core/TArrayS/Interface.hs +2/−1
- src/HROOT/Core/TArrayS/RawType.hs +2/−2
- src/HROOT/Core/TAtt3D/Cast.hs +2/−2
- src/HROOT/Core/TAtt3D/FFI.hsc +7/−3
- src/HROOT/Core/TAtt3D/Implementation.hs +17/−8
- src/HROOT/Core/TAtt3D/Interface.hs +3/−2
- src/HROOT/Core/TAtt3D/RawType.hs +2/−2
- src/HROOT/Core/TAttAxis/Cast.hs +2/−2
- src/HROOT/Core/TAttAxis/FFI.hsc +49/−45
- src/HROOT/Core/TAttAxis/Implementation.hs +18/−9
- src/HROOT/Core/TAttAxis/Interface.hs +24/−23
- src/HROOT/Core/TAttAxis/RawType.hs +2/−2
- src/HROOT/Core/TAttBBox/Cast.hs +2/−2
- src/HROOT/Core/TAttBBox/FFI.hsc +7/−3
- src/HROOT/Core/TAttBBox/Implementation.hs +17/−8
- src/HROOT/Core/TAttBBox/Interface.hs +3/−2
- src/HROOT/Core/TAttBBox/RawType.hs +2/−2
- src/HROOT/Core/TAttBBox2D.hs +4/−0
- src/HROOT/Core/TAttBBox2D/Cast.hs +9/−0
- src/HROOT/Core/TAttBBox2D/FFI.hsc +9/−0
- src/HROOT/Core/TAttBBox2D/Implementation.hs +29/−0
- src/HROOT/Core/TAttBBox2D/Interface.hs +24/−0
- src/HROOT/Core/TAttBBox2D/RawType.hs +6/−0
- src/HROOT/Core/TAttCanvas/Cast.hs +3/−2
- src/HROOT/Core/TAttCanvas/FFI.hsc +8/−4
- src/HROOT/Core/TAttCanvas/Implementation.hs +18/−9
- src/HROOT/Core/TAttCanvas/Interface.hs +3/−2
- src/HROOT/Core/TAttCanvas/RawType.hs +2/−2
- src/HROOT/Core/TAttFill/Cast.hs +2/−2
- src/HROOT/Core/TAttFill/FFI.hsc +11/−7
- src/HROOT/Core/TAttFill/Implementation.hs +18/−9
- src/HROOT/Core/TAttFill/Interface.hs +5/−4
- src/HROOT/Core/TAttFill/RawType.hs +2/−2
- src/HROOT/Core/TAttLine.hs +1/−1
- src/HROOT/Core/TAttLine/Cast.hs +2/−2
- src/HROOT/Core/TAttLine/FFI.hsc +26/−22
- src/HROOT/Core/TAttLine/Implementation.hs +23/−13
- src/HROOT/Core/TAttLine/Interface.hs +11/−10
- src/HROOT/Core/TAttLine/RawType.hs +2/−2
- src/HROOT/Core/TAttMarker/Cast.hs +3/−2
- src/HROOT/Core/TAttMarker/FFI.hsc +23/−19
- src/HROOT/Core/TAttMarker/Implementation.hs +18/−9
- src/HROOT/Core/TAttMarker/Interface.hs +11/−10
- src/HROOT/Core/TAttMarker/RawType.hs +2/−2
- src/HROOT/Core/TAttPad.hs +11/−11
- src/HROOT/Core/TAttPad/Cast.hs +3/−2
- src/HROOT/Core/TAttPad/FFI.hsc +121/−108
- src/HROOT/Core/TAttPad/Implementation.hs +80/−71
- src/HROOT/Core/TAttPad/Interface.hs +16/−14
- src/HROOT/Core/TAttPad/RawType.hs +2/−2
- src/HROOT/Core/TAttText/Cast.hs +2/−2
- src/HROOT/Core/TAttText/FFI.hsc +32/−27
- src/HROOT/Core/TAttText/Implementation.hs +18/−9
- src/HROOT/Core/TAttText/Interface.hs +16/−15
- src/HROOT/Core/TAttText/RawType.hs +2/−2
- src/HROOT/Core/TClass/Cast.hs +2/−2
- src/HROOT/Core/TClass/FFI.hsc +37/−21
- src/HROOT/Core/TClass/Implementation.hs +22/−11
- src/HROOT/Core/TClass/Interface.hs +2/−1
- src/HROOT/Core/TClass/Interface.hs-boot +0/−3
- src/HROOT/Core/TClass/RawType.hs +2/−2
- src/HROOT/Core/TCollection/Cast.hs +4/−3
- src/HROOT/Core/TCollection/FFI.hsc +25/−12
- src/HROOT/Core/TCollection/Implementation.hs +20/−9
- src/HROOT/Core/TCollection/Interface.hs +2/−1
- src/HROOT/Core/TCollection/RawType.hs +2/−2
- src/HROOT/Core/TColor.hs +7/−0
- src/HROOT/Core/TColor/Cast.hs +17/−0
- src/HROOT/Core/TColor/FFI.hsc +75/−0
- src/HROOT/Core/TColor/Implementation.hs +70/−0
- src/HROOT/Core/TColor/Interface.hs +26/−0
- src/HROOT/Core/TColor/RawType.hs +16/−0
- src/HROOT/Core/TDatime.hs +8/−0
- src/HROOT/Core/TDatime/Cast.hs +18/−0
- src/HROOT/Core/TDatime/FFI.hsc +48/−0
- src/HROOT/Core/TDatime/Implementation.hs +55/−0
- src/HROOT/Core/TDatime/Interface.hs +29/−0
- src/HROOT/Core/TDatime/RawType.hs +16/−0
- src/HROOT/Core/TDictionary/FFI.hsc +4/−1
- src/HROOT/Core/TDictionary/Implementation.hs +15/−6
- src/HROOT/Core/TDictionary/Interface.hs +2/−1
- src/HROOT/Core/TDirectory.hs +2/−2
- src/HROOT/Core/TDirectory/Cast.hs +3/−2
- src/HROOT/Core/TDirectory/FFI.hsc +54/−38
- src/HROOT/Core/TDirectory/Implementation.hs +27/−15
- src/HROOT/Core/TDirectory/Interface.hs +9/−8
- src/HROOT/Core/TDirectory/Interface.hs-boot +0/−3
- src/HROOT/Core/TDirectory/RawType.hs +2/−2
- src/HROOT/Core/TGlobal/Cast.hs +3/−2
- src/HROOT/Core/TGlobal/FFI.hsc +43/−24
- src/HROOT/Core/TGlobal/Implementation.hs +22/−11
- src/HROOT/Core/TGlobal/Interface.hs +2/−1
- src/HROOT/Core/TGlobal/RawType.hs +2/−2
- src/HROOT/Core/TH.hs +12/−0
- src/HROOT/Core/TKey/Cast.hs +2/−2
- src/HROOT/Core/TKey/FFI.hsc +31/−20
- src/HROOT/Core/TKey/Implementation.hs +21/−10
- src/HROOT/Core/TKey/Interface.hs +2/−3
- src/HROOT/Core/TKey/Interface.hs-boot +0/−3
- src/HROOT/Core/TKey/RawType.hs +2/−2
- src/HROOT/Core/TMutex.hs +6/−0
- src/HROOT/Core/TMutex/Cast.hs +17/−0
- src/HROOT/Core/TMutex/FFI.hsc +35/−0
- src/HROOT/Core/TMutex/Implementation.hs +44/−0
- src/HROOT/Core/TMutex/Interface.hs +26/−0
- src/HROOT/Core/TMutex/RawType.hs +16/−0
- src/HROOT/Core/TNamed/Cast.hs +2/−2
- src/HROOT/Core/TNamed/FFI.hsc +40/−23
- src/HROOT/Core/TNamed/Implementation.hs +20/−9
- src/HROOT/Core/TNamed/Interface.hs +4/−3
- src/HROOT/Core/TNamed/RawType.hs +2/−2
- src/HROOT/Core/TObjArray/Cast.hs +2/−2
- src/HROOT/Core/TObjArray/FFI.hsc +35/−18
- src/HROOT/Core/TObjArray/Implementation.hs +22/−11
- src/HROOT/Core/TObjArray/Interface.hs +2/−1
- src/HROOT/Core/TObjArray/RawType.hs +2/−2
- src/HROOT/Core/TObject.hs +1/−1
- src/HROOT/Core/TObject/Cast.hs +3/−2
- src/HROOT/Core/TObject/FFI.hsc +41/−23
- src/HROOT/Core/TObject/Implementation.hs +22/−11
- src/HROOT/Core/TObject/Interface.hs +15/−9
- src/HROOT/Core/TObject/Interface.hs-boot +0/−3
- src/HROOT/Core/TObject/RawType.hs +2/−2
- src/HROOT/Core/TQObject/Cast.hs +2/−2
- src/HROOT/Core/TQObject/FFI.hsc +7/−3
- src/HROOT/Core/TQObject/Implementation.hs +17/−8
- src/HROOT/Core/TQObject/Interface.hs +3/−2
- src/HROOT/Core/TQObject/RawType.hs +2/−2
- src/HROOT/Core/TROOT.hs +2/−2
- src/HROOT/Core/TROOT/Cast.hs +2/−2
- src/HROOT/Core/TROOT/FFI.hsc +49/−34
- src/HROOT/Core/TROOT/Implementation.hs +27/−16
- src/HROOT/Core/TROOT/Interface.hs +2/−2
- src/HROOT/Core/TROOT/RawType.hs +2/−2
- src/HROOT/Core/TSeqCollection/Cast.hs +5/−3
- src/HROOT/Core/TSeqCollection/FFI.hsc +21/−10
- src/HROOT/Core/TSeqCollection/Implementation.hs +21/−10
- src/HROOT/Core/TSeqCollection/Interface.hs +2/−1
- src/HROOT/Core/TSeqCollection/RawType.hs +2/−2
- src/HROOT/Core/TStyle.hs +10/−0
- src/HROOT/Core/TStyle/Cast.hs +17/−0
- src/HROOT/Core/TStyle/FFI.hsc +227/−0
- src/HROOT/Core/TStyle/Implementation.hs +138/−0
- src/HROOT/Core/TStyle/Interface.hs +32/−0
- src/HROOT/Core/TStyle/RawType.hs +16/−0
- src/HROOT/Core/TSystem/Cast.hs +3/−2
- src/HROOT/Core/TSystem/FFI.hsc +45/−26
- src/HROOT/Core/TSystem/Implementation.hs +21/−10
- src/HROOT/Core/TSystem/Interface.hs +3/−2
- src/HROOT/Core/TSystem/RawType.hs +2/−2
- src/HROOT/Core/TVirtualMutex.hs +4/−0
- src/HROOT/Core/TVirtualMutex/Cast.hs +9/−0
- src/HROOT/Core/TVirtualMutex/FFI.hsc +8/−0
- src/HROOT/Core/TVirtualMutex/Implementation.hs +26/−0
- src/HROOT/Core/TVirtualMutex/Interface.hs +23/−0
- src/HROOT/Core/TVirtualMutex/RawType.hs +6/−0
- src/HROOT/Core/TVirtualPad/Cast.hs +4/−3
- src/HROOT/Core/TVirtualPad/FFI.hsc +138/−19
- src/HROOT/Core/TVirtualPad/Implementation.hs +65/−9
- src/HROOT/Core/TVirtualPad/Interface.hs +20/−6
- src/HROOT/Core/TVirtualPad/RawType.hs +2/−2
- src/HROOT/Core/Template.hs +7/−0
+ CHANGES view
@@ -0,0 +1,60 @@+# Changelog for HROOT++## 0.10.0.1+- Use hackage-version of fficxx (#18)+- Generate docs in CI (#17)+- Update flake.nix with recent fficxx and ormolu format (#16)+- Update fficxx to support GHC 9.4 (#15)+- Add TMutex and test multithreading with GUI (#12)+- HROOT now uses common stdcxx (#11)+- idealized gas simulation (#10)+- Add TMarker and Range. Test 2D graphics using gas example (#9)+- HROOT generation and packing via nix (#8)+- Revive umbrella package generation (#7)+- Static files (Config.hs, Setup.lhs) and custom-setup dependency (#6)+- Modernize HROOT with fficxx 0.5.1 (#5)++## 0.9.0.1++## 0.9+- HROOT-tree+- HROOT only support ROOT > 6++## 0.8+- separate packages into HROOT-core, HROOT-hist, HROOT-io, HROOT-math, HROOT-graf and HROOT is now an umbrella package++## 0.7+- separate all class interfaces and implementation in different modules+- overhaul Existential++## 0.7.1+- support for static methods+- add TROOT++## 0.6.9+- implement almost all class methods of TLine, TAttLine, TAttMarker, TAttText and TAttPad++## 0.6.8+- implement almost all class methods of TH2, TH3, TFormula, TF1 and TGraph++## 0.6.7+- implement almost all TH1 class methods++## 0.6.6+- do not need OverlappingInstances, IncoherentInstances, UndecidableInstances++## 0.6.4+- add many TH2 class methods++## 0.6.3+- Implement Existential Types++## 0.6+- implement Deletable. delete method for every object+- refactor HROOT generated file names (Interface.hs, Implementation.hs, FFI.hs)++## 0.5.1+- support for delete++## 0.5.0+- initial preview release
− Config.hs
@@ -1,85 +0,0 @@-{-# LANGUAGE ScopedTypeVariables #-}--module Config where- -import Distribution.Simple-import Distribution.Simple.Setup-import Distribution.PackageDescription-import Distribution.Simple.LocalBuildInfo--import System.Exit-import System.Process--config :: LocalBuildInfo -> IO (Maybe HookedBuildInfo)-config bInfo = do - (excode, out, err) <- readProcessWithExitCode "root-config" ["--glibs"] ""- liboptset' <- case excode of - ExitSuccess -> do - return . Just . mkLibraryOptionSet . words $ out- _ -> do - putStrLn $ "root-config failure but I am installing HROOT without ROOT. It will not work. This is only for documentation." - return Nothing - (excode2,out2,err2) <- readProcessWithExitCode "root-config" ["--incdir"] ""- incdir' <- case excode2 of - ExitSuccess -> do - return . Just . head . words $ out2- _ -> do - putStrLn $ "root-config failure but I am installing HROOT without ROOT. It will not work. This is only for documentation." - return Nothing- let Just lib = library . localPkgDescr $ bInfo- buildinfo = libBuildInfo lib- let (r :: Maybe HookedBuildInfo) = case liboptset' of - Nothing -> Nothing- Just liboptset -> - case incdir' of - Nothing -> Nothing - Just incdir -> - let hbi = emptyBuildInfo { extraLibs = extraLibs buildinfo - ++ libs liboptset- , extraLibDirs = libdirs liboptset - , includeDirs = incdir : includeDirs buildinfo- }- in Just (Just hbi, []) - return r ---data LibraryOptionSet = LibraryOptionSet { - libs :: [String], - libdirs :: [String], - libopts :: [String]-} deriving Show--data LibraryOption = Lib String - | Dir String- | Opt String - deriving Show--mkLibraryOptionSet :: [String] -> LibraryOptionSet-mkLibraryOptionSet strs = let opts = libraryOptions strs- in foldr f (LibraryOptionSet [] [] []) opts - where f x (LibraryOptionSet l d o) = case x of- Lib st -> LibraryOptionSet (st:l) d o - Dir st -> LibraryOptionSet l (st:d) o - Opt st -> LibraryOptionSet l d (st:o) --libraryOptions :: [String] -> [LibraryOption] -- LibraryOptionSet -libraryOptions = map f - where f x = let r = parseLibraryOptionClassifier x- in case r of - Left msg -> error (show msg)- Right result -> result---parseLibraryOptionClassifier :: String -> Either String LibraryOption -parseLibraryOptionClassifier [] = Left "empty option"-parseLibraryOptionClassifier str@(x:xs) = - case x of- '-' -> if null xs - then Left "parse error"- else let (y:ys) = xs- in case y of- 'L' -> Right (Dir ys)- 'l' -> Right (Lib ys)- _ -> Right (Opt str)- _ -> Right (Opt str) -
HROOT-core.cabal view
@@ -1,100 +1,120 @@-Name: HROOT-core-Version: 0.9.0.1-Synopsis: Haskell binding to ROOT Core modules-Description: HROOT is a haskell Foreign Function Interface (FFI) binding to ROOT. ROOT(http://root.cern.ch) is an object-oriented program and library developed by CERN for physics data analysis.-Homepage: http://ianwookim.org/HROOT-license: LGPL-2.1-license-file: LICENSE-Author: Ian-Woo Kim-Maintainer: Ian-Woo Kim <ianwookim@gmail.com>+Cabal-version: 3.0+Name: HROOT-core+Version: 0.10.0.1+Synopsis: Haskell binding to ROOT Core modules+Description:+ HROOT is a haskell Foreign Function Interface (FFI) binding to ROOT.+ ROOT(http://root.cern.ch) is an object-oriented program and library+ developed by CERN for physics data analysis.+Homepage: https://wavewave.github.io/HROOT +license: LGPL-2.1-or-later+license-file: LICENSE+Author: Ian-Woo Kim+Maintainer: Ian-Woo Kim <ianwookim@gmail.com> Category: Graphics, Statistics, Math, Numerical-Tested-with: GHC >= 7.6-Build-Type: Custom-cabal-version: >=1.10+Tested-with: GHC == 9.0.2 || == 9.2.4 || == 9.4.2 Extra-source-files:- Config.hs- csrc/HROOT-coreTopLevel.h- csrc/HROOTCoreDeletable.h- csrc/HROOTCoreTApplication.h- csrc/HROOTCoreTArray.h- csrc/HROOTCoreTArrayC.h- csrc/HROOTCoreTArrayD.h- csrc/HROOTCoreTArrayF.h- csrc/HROOTCoreTArrayI.h- csrc/HROOTCoreTArrayL.h- csrc/HROOTCoreTArrayL64.h- csrc/HROOTCoreTArrayS.h- csrc/HROOTCoreTAtt3D.h- csrc/HROOTCoreTAttAxis.h- csrc/HROOTCoreTAttBBox.h- csrc/HROOTCoreTAttCanvas.h- csrc/HROOTCoreTAttFill.h- csrc/HROOTCoreTAttLine.h- csrc/HROOTCoreTAttMarker.h- csrc/HROOTCoreTAttPad.h- csrc/HROOTCoreTAttText.h- csrc/HROOTCoreTClass.h- csrc/HROOTCoreTCollection.h- csrc/HROOTCoreTDictionary.h- csrc/HROOTCoreTDirectory.h- csrc/HROOTCoreTGlobal.h- csrc/HROOTCoreTKey.h- csrc/HROOTCoreTNamed.h- csrc/HROOTCoreTObjArray.h- csrc/HROOTCoreTObject.h- csrc/HROOTCoreTQObject.h- csrc/HROOTCoreTROOT.h- csrc/HROOTCoreTSeqCollection.h- csrc/HROOTCoreTSystem.h- csrc/HROOTCoreTVirtualPad.h- csrc/HROOT-coreTopLevel.cpp- csrc/HROOTCoreDeletable.cpp- csrc/HROOTCoreTApplication.cpp- csrc/HROOTCoreTArray.cpp- csrc/HROOTCoreTArrayC.cpp- csrc/HROOTCoreTArrayD.cpp- csrc/HROOTCoreTArrayF.cpp- csrc/HROOTCoreTArrayI.cpp- csrc/HROOTCoreTArrayL.cpp- csrc/HROOTCoreTArrayL64.cpp- csrc/HROOTCoreTArrayS.cpp- csrc/HROOTCoreTAtt3D.cpp- csrc/HROOTCoreTAttAxis.cpp- csrc/HROOTCoreTAttBBox.cpp- csrc/HROOTCoreTAttCanvas.cpp- csrc/HROOTCoreTAttFill.cpp- csrc/HROOTCoreTAttLine.cpp- csrc/HROOTCoreTAttMarker.cpp- csrc/HROOTCoreTAttPad.cpp- csrc/HROOTCoreTAttText.cpp- csrc/HROOTCoreTClass.cpp- csrc/HROOTCoreTCollection.cpp- csrc/HROOTCoreTDictionary.cpp- csrc/HROOTCoreTDirectory.cpp- csrc/HROOTCoreTGlobal.cpp- csrc/HROOTCoreTKey.cpp- csrc/HROOTCoreTNamed.cpp- csrc/HROOTCoreTObjArray.cpp- csrc/HROOTCoreTObject.cpp- csrc/HROOTCoreTQObject.cpp- csrc/HROOTCoreTROOT.cpp- csrc/HROOTCoreTSeqCollection.cpp- csrc/HROOTCoreTSystem.cpp- csrc/HROOTCoreTVirtualPad.cpp---+ CHANGES+ csrc/HROOT-coreTopLevel.h+ csrc/HROOTCoreRectangle_t.h+ csrc/HROOTCoreTApplication.h+ csrc/HROOTCoreTArray.h+ csrc/HROOTCoreTArrayC.h+ csrc/HROOTCoreTArrayD.h+ csrc/HROOTCoreTArrayF.h+ csrc/HROOTCoreTArrayI.h+ csrc/HROOTCoreTArrayL.h+ csrc/HROOTCoreTArrayL64.h+ csrc/HROOTCoreTArrayS.h+ csrc/HROOTCoreTAtt3D.h+ csrc/HROOTCoreTAttAxis.h+ csrc/HROOTCoreTAttBBox.h+ csrc/HROOTCoreTAttBBox2D.h+ csrc/HROOTCoreTAttCanvas.h+ csrc/HROOTCoreTAttFill.h+ csrc/HROOTCoreTAttLine.h+ csrc/HROOTCoreTAttMarker.h+ csrc/HROOTCoreTAttPad.h+ csrc/HROOTCoreTAttText.h+ csrc/HROOTCoreTClass.h+ csrc/HROOTCoreTCollection.h+ csrc/HROOTCoreTColor.h+ csrc/HROOTCoreTDatime.h+ csrc/HROOTCoreTDictionary.h+ csrc/HROOTCoreTDirectory.h+ csrc/HROOTCoreTGlobal.h+ csrc/HROOTCoreTKey.h+ csrc/HROOTCoreTMutex.h+ csrc/HROOTCoreTNamed.h+ csrc/HROOTCoreTObjArray.h+ csrc/HROOTCoreTObject.h+ csrc/HROOTCoreTQObject.h+ csrc/HROOTCoreTROOT.h+ csrc/HROOTCoreTSeqCollection.h+ csrc/HROOTCoreTStyle.h+ csrc/HROOTCoreTSystem.h+ csrc/HROOTCoreTVirtualMutex.h+ csrc/HROOTCoreTVirtualPad.h+ csrc/HROOT-coreTopLevel.cpp+ csrc/HROOTCoreRectangle_t.cpp+ csrc/HROOTCoreTApplication.cpp+ csrc/HROOTCoreTArray.cpp+ csrc/HROOTCoreTArrayC.cpp+ csrc/HROOTCoreTArrayD.cpp+ csrc/HROOTCoreTArrayF.cpp+ csrc/HROOTCoreTArrayI.cpp+ csrc/HROOTCoreTArrayL.cpp+ csrc/HROOTCoreTArrayL64.cpp+ csrc/HROOTCoreTArrayS.cpp+ csrc/HROOTCoreTAtt3D.cpp+ csrc/HROOTCoreTAttAxis.cpp+ csrc/HROOTCoreTAttBBox.cpp+ csrc/HROOTCoreTAttBBox2D.cpp+ csrc/HROOTCoreTAttCanvas.cpp+ csrc/HROOTCoreTAttFill.cpp+ csrc/HROOTCoreTAttLine.cpp+ csrc/HROOTCoreTAttMarker.cpp+ csrc/HROOTCoreTAttPad.cpp+ csrc/HROOTCoreTAttText.cpp+ csrc/HROOTCoreTClass.cpp+ csrc/HROOTCoreTCollection.cpp+ csrc/HROOTCoreTColor.cpp+ csrc/HROOTCoreTDatime.cpp+ csrc/HROOTCoreTDictionary.cpp+ csrc/HROOTCoreTDirectory.cpp+ csrc/HROOTCoreTGlobal.cpp+ csrc/HROOTCoreTKey.cpp+ csrc/HROOTCoreTMutex.cpp+ csrc/HROOTCoreTNamed.cpp+ csrc/HROOTCoreTObjArray.cpp+ csrc/HROOTCoreTObject.cpp+ csrc/HROOTCoreTQObject.cpp+ csrc/HROOTCoreTROOT.cpp+ csrc/HROOTCoreTSeqCollection.cpp+ csrc/HROOTCoreTStyle.cpp+ csrc/HROOTCoreTSystem.cpp+ csrc/HROOTCoreTVirtualMutex.cpp+ csrc/HROOTCoreTVirtualPad.cpp+Build-Type: Custom+custom-setup+ setup-depends: Cabal < 4, base > 4 && < 5, process +Source-repository head+ type: git+ location: https://github.com/wavewave/HROOT+ Library default-language: Haskell2010 hs-source-dirs: src ghc-options: -Wall -funbox-strict-fields -fno-warn-unused-do-bind -fno-warn-orphans -fno-warn-unused-imports- ghc-prof-options: -caf-all -auto-all- cc-options: -std=c++14- Build-Depends: base>4 && < 5, fficxx >= 0.3, fficxx-runtime >= 0.3, template-haskell+ cxx-options: -std=c++17+ Build-Depends: base > 4 && < 5, fficxx >= 0.7, fficxx-runtime >= 0.7, template-haskell, stdcxx Exposed-Modules: HROOT.Core- HROOT.Core.Deletable+ HROOT.Core.Ordinary+ HROOT.Core.Template+ HROOT.Core.TH+ HROOT.Core.Rectangle_t HROOT.Core.TApplication HROOT.Core.TArray HROOT.Core.TArrayC@@ -107,6 +127,7 @@ HROOT.Core.TAtt3D HROOT.Core.TAttAxis HROOT.Core.TAttBBox+ HROOT.Core.TAttBBox2D HROOT.Core.TAttCanvas HROOT.Core.TAttFill HROOT.Core.TAttLine@@ -115,19 +136,24 @@ HROOT.Core.TAttText HROOT.Core.TClass HROOT.Core.TCollection+ HROOT.Core.TColor+ HROOT.Core.TDatime HROOT.Core.TDictionary HROOT.Core.TDirectory HROOT.Core.TGlobal HROOT.Core.TKey+ HROOT.Core.TMutex HROOT.Core.TNamed HROOT.Core.TObjArray HROOT.Core.TObject HROOT.Core.TQObject HROOT.Core.TROOT HROOT.Core.TSeqCollection+ HROOT.Core.TStyle HROOT.Core.TSystem+ HROOT.Core.TVirtualMutex HROOT.Core.TVirtualPad- HROOT.Core.Deletable.RawType+ HROOT.Core.Rectangle_t.RawType HROOT.Core.TApplication.RawType HROOT.Core.TArray.RawType HROOT.Core.TArrayC.RawType@@ -140,6 +166,7 @@ HROOT.Core.TAtt3D.RawType HROOT.Core.TAttAxis.RawType HROOT.Core.TAttBBox.RawType+ HROOT.Core.TAttBBox2D.RawType HROOT.Core.TAttCanvas.RawType HROOT.Core.TAttFill.RawType HROOT.Core.TAttLine.RawType@@ -148,19 +175,24 @@ HROOT.Core.TAttText.RawType HROOT.Core.TClass.RawType HROOT.Core.TCollection.RawType+ HROOT.Core.TColor.RawType+ HROOT.Core.TDatime.RawType HROOT.Core.TDictionary.RawType HROOT.Core.TDirectory.RawType HROOT.Core.TGlobal.RawType HROOT.Core.TKey.RawType+ HROOT.Core.TMutex.RawType HROOT.Core.TNamed.RawType HROOT.Core.TObjArray.RawType HROOT.Core.TObject.RawType HROOT.Core.TQObject.RawType HROOT.Core.TROOT.RawType HROOT.Core.TSeqCollection.RawType+ HROOT.Core.TStyle.RawType HROOT.Core.TSystem.RawType+ HROOT.Core.TVirtualMutex.RawType HROOT.Core.TVirtualPad.RawType- HROOT.Core.Deletable.FFI+ HROOT.Core.Rectangle_t.FFI HROOT.Core.TApplication.FFI HROOT.Core.TArray.FFI HROOT.Core.TArrayC.FFI@@ -173,6 +205,7 @@ HROOT.Core.TAtt3D.FFI HROOT.Core.TAttAxis.FFI HROOT.Core.TAttBBox.FFI+ HROOT.Core.TAttBBox2D.FFI HROOT.Core.TAttCanvas.FFI HROOT.Core.TAttFill.FFI HROOT.Core.TAttLine.FFI@@ -181,19 +214,24 @@ HROOT.Core.TAttText.FFI HROOT.Core.TClass.FFI HROOT.Core.TCollection.FFI+ HROOT.Core.TColor.FFI+ HROOT.Core.TDatime.FFI HROOT.Core.TDictionary.FFI HROOT.Core.TDirectory.FFI HROOT.Core.TGlobal.FFI HROOT.Core.TKey.FFI+ HROOT.Core.TMutex.FFI HROOT.Core.TNamed.FFI HROOT.Core.TObjArray.FFI HROOT.Core.TObject.FFI HROOT.Core.TQObject.FFI HROOT.Core.TROOT.FFI HROOT.Core.TSeqCollection.FFI+ HROOT.Core.TStyle.FFI HROOT.Core.TSystem.FFI+ HROOT.Core.TVirtualMutex.FFI HROOT.Core.TVirtualPad.FFI- HROOT.Core.Deletable.Interface+ HROOT.Core.Rectangle_t.Interface HROOT.Core.TApplication.Interface HROOT.Core.TArray.Interface HROOT.Core.TArrayC.Interface@@ -206,6 +244,7 @@ HROOT.Core.TAtt3D.Interface HROOT.Core.TAttAxis.Interface HROOT.Core.TAttBBox.Interface+ HROOT.Core.TAttBBox2D.Interface HROOT.Core.TAttCanvas.Interface HROOT.Core.TAttFill.Interface HROOT.Core.TAttLine.Interface@@ -214,19 +253,24 @@ HROOT.Core.TAttText.Interface HROOT.Core.TClass.Interface HROOT.Core.TCollection.Interface+ HROOT.Core.TColor.Interface+ HROOT.Core.TDatime.Interface HROOT.Core.TDictionary.Interface HROOT.Core.TDirectory.Interface HROOT.Core.TGlobal.Interface HROOT.Core.TKey.Interface+ HROOT.Core.TMutex.Interface HROOT.Core.TNamed.Interface HROOT.Core.TObjArray.Interface HROOT.Core.TObject.Interface HROOT.Core.TQObject.Interface HROOT.Core.TROOT.Interface HROOT.Core.TSeqCollection.Interface+ HROOT.Core.TStyle.Interface HROOT.Core.TSystem.Interface+ HROOT.Core.TVirtualMutex.Interface HROOT.Core.TVirtualPad.Interface- HROOT.Core.Deletable.Cast+ HROOT.Core.Rectangle_t.Cast HROOT.Core.TApplication.Cast HROOT.Core.TArray.Cast HROOT.Core.TArrayC.Cast@@ -239,6 +283,7 @@ HROOT.Core.TAtt3D.Cast HROOT.Core.TAttAxis.Cast HROOT.Core.TAttBBox.Cast+ HROOT.Core.TAttBBox2D.Cast HROOT.Core.TAttCanvas.Cast HROOT.Core.TAttFill.Cast HROOT.Core.TAttLine.Cast@@ -247,19 +292,24 @@ HROOT.Core.TAttText.Cast HROOT.Core.TClass.Cast HROOT.Core.TCollection.Cast+ HROOT.Core.TColor.Cast+ HROOT.Core.TDatime.Cast HROOT.Core.TDictionary.Cast HROOT.Core.TDirectory.Cast HROOT.Core.TGlobal.Cast HROOT.Core.TKey.Cast+ HROOT.Core.TMutex.Cast HROOT.Core.TNamed.Cast HROOT.Core.TObjArray.Cast HROOT.Core.TObject.Cast HROOT.Core.TQObject.Cast HROOT.Core.TROOT.Cast HROOT.Core.TSeqCollection.Cast+ HROOT.Core.TStyle.Cast HROOT.Core.TSystem.Cast+ HROOT.Core.TVirtualMutex.Cast HROOT.Core.TVirtualPad.Cast- HROOT.Core.Deletable.Implementation+ HROOT.Core.Rectangle_t.Implementation HROOT.Core.TApplication.Implementation HROOT.Core.TArray.Implementation HROOT.Core.TArrayC.Implementation@@ -272,6 +322,7 @@ HROOT.Core.TAtt3D.Implementation HROOT.Core.TAttAxis.Implementation HROOT.Core.TAttBBox.Implementation+ HROOT.Core.TAttBBox2D.Implementation HROOT.Core.TAttCanvas.Implementation HROOT.Core.TAttFill.Implementation HROOT.Core.TAttLine.Implementation@@ -280,27 +331,32 @@ HROOT.Core.TAttText.Implementation HROOT.Core.TClass.Implementation HROOT.Core.TCollection.Implementation+ HROOT.Core.TColor.Implementation+ HROOT.Core.TDatime.Implementation HROOT.Core.TDictionary.Implementation HROOT.Core.TDirectory.Implementation HROOT.Core.TGlobal.Implementation HROOT.Core.TKey.Implementation+ HROOT.Core.TMutex.Implementation HROOT.Core.TNamed.Implementation HROOT.Core.TObjArray.Implementation HROOT.Core.TObject.Implementation HROOT.Core.TQObject.Implementation HROOT.Core.TROOT.Implementation HROOT.Core.TSeqCollection.Implementation+ HROOT.Core.TStyle.Implementation HROOT.Core.TSystem.Implementation+ HROOT.Core.TVirtualMutex.Implementation HROOT.Core.TVirtualPad.Implementation Other-Modules:- extra-lib-dirs: - extra-libraries: stdc++ + extra-libraries: Include-dirs: csrc + pkgconfig-depends: Install-includes: HROOT-coreType.h- HROOTCoreDeletable.h+ HROOTCoreRectangle_t.h HROOTCoreTApplication.h HROOTCoreTArray.h HROOTCoreTArrayC.h@@ -313,6 +369,7 @@ HROOTCoreTAtt3D.h HROOTCoreTAttAxis.h HROOTCoreTAttBBox.h+ HROOTCoreTAttBBox2D.h HROOTCoreTAttCanvas.h HROOTCoreTAttFill.h HROOTCoreTAttLine.h@@ -321,22 +378,27 @@ HROOTCoreTAttText.h HROOTCoreTClass.h HROOTCoreTCollection.h+ HROOTCoreTColor.h+ HROOTCoreTDatime.h HROOTCoreTDictionary.h HROOTCoreTDirectory.h HROOTCoreTGlobal.h HROOTCoreTKey.h+ HROOTCoreTMutex.h HROOTCoreTNamed.h HROOTCoreTObjArray.h HROOTCoreTObject.h HROOTCoreTQObject.h HROOTCoreTROOT.h HROOTCoreTSeqCollection.h+ HROOTCoreTStyle.h HROOTCoreTSystem.h+ HROOTCoreTVirtualMutex.h HROOTCoreTVirtualPad.h - C-sources:+ Cxx-sources: csrc/HROOT-coreTopLevel.cpp- csrc/HROOTCoreDeletable.cpp+ csrc/HROOTCoreRectangle_t.cpp csrc/HROOTCoreTApplication.cpp csrc/HROOTCoreTArray.cpp csrc/HROOTCoreTArrayC.cpp@@ -349,6 +411,7 @@ csrc/HROOTCoreTAtt3D.cpp csrc/HROOTCoreTAttAxis.cpp csrc/HROOTCoreTAttBBox.cpp+ csrc/HROOTCoreTAttBBox2D.cpp csrc/HROOTCoreTAttCanvas.cpp csrc/HROOTCoreTAttFill.cpp csrc/HROOTCoreTAttLine.cpp@@ -357,17 +420,21 @@ csrc/HROOTCoreTAttText.cpp csrc/HROOTCoreTClass.cpp csrc/HROOTCoreTCollection.cpp+ csrc/HROOTCoreTColor.cpp+ csrc/HROOTCoreTDatime.cpp csrc/HROOTCoreTDictionary.cpp csrc/HROOTCoreTDirectory.cpp csrc/HROOTCoreTGlobal.cpp csrc/HROOTCoreTKey.cpp+ csrc/HROOTCoreTMutex.cpp csrc/HROOTCoreTNamed.cpp csrc/HROOTCoreTObjArray.cpp csrc/HROOTCoreTObject.cpp csrc/HROOTCoreTQObject.cpp csrc/HROOTCoreTROOT.cpp csrc/HROOTCoreTSeqCollection.cpp+ csrc/HROOTCoreTStyle.cpp csrc/HROOTCoreTSystem.cpp+ csrc/HROOTCoreTVirtualMutex.cpp csrc/HROOTCoreTVirtualPad.cpp-
+ Setup.hs view
@@ -0,0 +1,27 @@+import Distribution.Simple+import Distribution.Simple.Setup+import Distribution.PackageDescription+import Distribution.Simple.LocalBuildInfo+import Config++myconfigHook = simpleUserHooks { confHook = hookfunction }++hookfunction x y = do+ binfo <- confHook simpleUserHooks x y+ r_pbi <- config binfo+ let pkg_descr = localPkgDescr binfo++ let newbinfo = case r_pbi of+ Just pbi -> binfo { localPkgDescr = updatePackageDescription pbi pkg_descr }+ Nothing -> do+ let r_lib = library pkg_descr+ case r_lib of+ Just lib ->+ let binfo2 = libBuildInfo lib+ newlib = lib { libBuildInfo = binfo2 { cSources = [] }}+ in binfo { localPkgDescr = pkg_descr { library = Just newlib }}+ Nothing -> error "some library setting is wrong."+-- putStrLn (show (localPkgDescr newbinfo))+ return newbinfo++main = defaultMainWithHooks myconfigHook
− Setup.lhs
@@ -1,33 +0,0 @@-#! /usr/bin/env runhaskell- -> import Distribution.Simple-> import Distribution.Simple.Setup-> import Distribution.PackageDescription-> import Distribution.Simple.LocalBuildInfo->-> import Config->-> myconfigHook = simpleUserHooks { confHook = hookfunction } ->-> hookfunction x y = do -> binfo <- confHook simpleUserHooks x y -> r_pbi <- config binfo-> let pkg_descr = localPkgDescr binfo-> -> let newbinfo = case r_pbi of -> Just pbi -> binfo { localPkgDescr = updatePackageDescription pbi pkg_descr }-> Nothing -> do -> let r_lib = library pkg_descr -> case r_lib of-> Just lib -> -> let binfo2 = libBuildInfo lib-> newlib = lib { libBuildInfo = binfo2 { cSources = [] }} -> in binfo { localPkgDescr = pkg_descr { library = Just newlib }} -> Nothing -> error "some library setting is wrong." -> -- putStrLn (show (localPkgDescr newbinfo))-> return newbinfo-> ->-> main = defaultMainWithHooks myconfigHook->-
csrc/HROOT-coreTopLevel.cpp view
@@ -1,32 +1,58 @@-#include <MacroPatternMatch.h>++#include "MacroPatternMatch.h"+ #include "HROOT-coreTopLevel.h" #include "HROOTCoreTGlobal.h"+ #include "HROOTCoreTDirectory.h"+ #include "TROOT.h"+ #include "HROOTCoreTNamed.h"+ #include "TSystem.h" +#include "HROOTCoreTNamed.h"++#include "HROOTCoreTAttLine.h"++#include "HROOTCoreTAttFill.h"++#include "HROOTCoreTAttMarker.h"++#include "HROOTCoreTAttText.h"++#include "TStyle.h"+ #include "HROOTCoreTROOT.h"+ #include "HROOTCoreTSystem.h" -using namespace ROOT;+#include "HROOTCoreTStyle.h" +using namespace ROOT; -#define CHECKPROTECT(x,y) IS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED)+#define CHECKPROTECT(x,y) FXIS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED) #define TYPECASTMETHOD(cname,mname,oname) \- IIF( CHECKPROTECT(cname,mname) ) ( \+ FXIIF( CHECKPROTECT(cname,mname) ) ( \ (to_nonconst<oname,cname ## _t>), \ (to_nonconst<cname,cname ## _t>) ) -TROOT_p TopLevel_GetROOT ( ) { - return to_nonconst<TROOT_t,TROOT>((TROOT*)GetROOT());+TROOT_p TopLevel_GetROOT ( ) {+return from_nonconst_to_nonconst<TROOT_t, TROOT>((TROOT*)GetROOT()); }-TROOT_p TopLevel_gROOT ( ) { - return to_nonconst<TROOT_t,TROOT>((TROOT*)gROOT);++TROOT_p TopLevel_gROOT ( ) {+return from_nonconst_to_nonconst<TROOT_t, TROOT>((TROOT*)gROOT); }-TSystem_p TopLevel_gSystem ( ) { - return to_nonconst<TSystem_t,TSystem>((TSystem*)gSystem);++TSystem_p TopLevel_gSystem ( ) {+return from_nonconst_to_nonconst<TSystem_t, TSystem>((TSystem*)gSystem);+}++TStyle_p TopLevel_gStyle ( ) {+return from_nonconst_to_nonconst<TStyle_t, TStyle>((TStyle*)gStyle); }
csrc/HROOT-coreTopLevel.h view
@@ -1,20 +1,20 @@+ #ifdef __cplusplus-extern "C" { +extern "C" { #endif -#ifndef __HROOT_CORE__TOPLEVEL__-#define __HROOT_CORE__TOPLEVEL__+#pragma once + #include "HROOT-coreType.h"+ #include "HROOTCoreTROOT.h"-#include "HROOTCoreTSystem.h" -TROOT_p TopLevel_GetROOT ( );-TROOT_p TopLevel_gROOT ( );-TSystem_p TopLevel_gSystem ( );+#include "HROOTCoreTSystem.h" -#endif // __HROOT_CORE__TOPLEVEL__+#include "HROOTCoreTStyle.h" +TROOT_p TopLevel_GetROOT ( );TROOT_p TopLevel_gROOT ( );TSystem_p TopLevel_gSystem ( );TStyle_p TopLevel_gStyle ( ); #ifdef __cplusplus } #endif
csrc/HROOT-coreType.h view
@@ -1,210 +1,88 @@+ #ifdef __cplusplus-extern "C" { +extern "C" { #endif -#ifndef __HROOT_CORE__-#define __HROOT_CORE__--// Opaque type definition for Deletable -typedef struct Deletable_tag Deletable_t; -typedef Deletable_t * Deletable_p; -typedef Deletable_t const* const_Deletable_p; ---// Opaque type definition for TApplication -typedef struct TApplication_tag TApplication_t; -typedef TApplication_t * TApplication_p; -typedef TApplication_t const* const_TApplication_p; ---// Opaque type definition for TArray -typedef struct TArray_tag TArray_t; -typedef TArray_t * TArray_p; -typedef TArray_t const* const_TArray_p; ---// Opaque type definition for TArrayC -typedef struct TArrayC_tag TArrayC_t; -typedef TArrayC_t * TArrayC_p; -typedef TArrayC_t const* const_TArrayC_p; ---// Opaque type definition for TArrayD -typedef struct TArrayD_tag TArrayD_t; -typedef TArrayD_t * TArrayD_p; -typedef TArrayD_t const* const_TArrayD_p; ---// Opaque type definition for TArrayF -typedef struct TArrayF_tag TArrayF_t; -typedef TArrayF_t * TArrayF_p; -typedef TArrayF_t const* const_TArrayF_p; ---// Opaque type definition for TArrayI -typedef struct TArrayI_tag TArrayI_t; -typedef TArrayI_t * TArrayI_p; -typedef TArrayI_t const* const_TArrayI_p; ---// Opaque type definition for TArrayL -typedef struct TArrayL_tag TArrayL_t; -typedef TArrayL_t * TArrayL_p; -typedef TArrayL_t const* const_TArrayL_p; ---// Opaque type definition for TArrayL64 -typedef struct TArrayL64_tag TArrayL64_t; -typedef TArrayL64_t * TArrayL64_p; -typedef TArrayL64_t const* const_TArrayL64_p; ---// Opaque type definition for TArrayS -typedef struct TArrayS_tag TArrayS_t; -typedef TArrayS_t * TArrayS_p; -typedef TArrayS_t const* const_TArrayS_p; ---// Opaque type definition for TAtt3D -typedef struct TAtt3D_tag TAtt3D_t; -typedef TAtt3D_t * TAtt3D_p; -typedef TAtt3D_t const* const_TAtt3D_p; ---// Opaque type definition for TAttAxis -typedef struct TAttAxis_tag TAttAxis_t; -typedef TAttAxis_t * TAttAxis_p; -typedef TAttAxis_t const* const_TAttAxis_p; ---// Opaque type definition for TAttBBox -typedef struct TAttBBox_tag TAttBBox_t; -typedef TAttBBox_t * TAttBBox_p; -typedef TAttBBox_t const* const_TAttBBox_p; ---// Opaque type definition for TAttCanvas -typedef struct TAttCanvas_tag TAttCanvas_t; -typedef TAttCanvas_t * TAttCanvas_p; -typedef TAttCanvas_t const* const_TAttCanvas_p; ---// Opaque type definition for TAttFill -typedef struct TAttFill_tag TAttFill_t; -typedef TAttFill_t * TAttFill_p; -typedef TAttFill_t const* const_TAttFill_p; ---// Opaque type definition for TAttLine -typedef struct TAttLine_tag TAttLine_t; -typedef TAttLine_t * TAttLine_p; -typedef TAttLine_t const* const_TAttLine_p; ---// Opaque type definition for TAttMarker -typedef struct TAttMarker_tag TAttMarker_t; -typedef TAttMarker_t * TAttMarker_p; -typedef TAttMarker_t const* const_TAttMarker_p; ---// Opaque type definition for TAttPad -typedef struct TAttPad_tag TAttPad_t; -typedef TAttPad_t * TAttPad_p; -typedef TAttPad_t const* const_TAttPad_p; ---// Opaque type definition for TAttText -typedef struct TAttText_tag TAttText_t; -typedef TAttText_t * TAttText_p; -typedef TAttText_t const* const_TAttText_p; ---// Opaque type definition for TClass -typedef struct TClass_tag TClass_t; -typedef TClass_t * TClass_p; -typedef TClass_t const* const_TClass_p; ---// Opaque type definition for TCollection -typedef struct TCollection_tag TCollection_t; -typedef TCollection_t * TCollection_p; -typedef TCollection_t const* const_TCollection_p; ---// Opaque type definition for TDictionary -typedef struct TDictionary_tag TDictionary_t; -typedef TDictionary_t * TDictionary_p; -typedef TDictionary_t const* const_TDictionary_p; ---// Opaque type definition for TDirectory -typedef struct TDirectory_tag TDirectory_t; -typedef TDirectory_t * TDirectory_p; -typedef TDirectory_t const* const_TDirectory_p; ---// Opaque type definition for TGlobal -typedef struct TGlobal_tag TGlobal_t; -typedef TGlobal_t * TGlobal_p; -typedef TGlobal_t const* const_TGlobal_p; ---// Opaque type definition for TKey -typedef struct TKey_tag TKey_t; -typedef TKey_t * TKey_p; -typedef TKey_t const* const_TKey_p; ---// Opaque type definition for TNamed -typedef struct TNamed_tag TNamed_t; -typedef TNamed_t * TNamed_p; -typedef TNamed_t const* const_TNamed_p; ---// Opaque type definition for TObjArray -typedef struct TObjArray_tag TObjArray_t; -typedef TObjArray_t * TObjArray_p; -typedef TObjArray_t const* const_TObjArray_p; ---// Opaque type definition for TObject -typedef struct TObject_tag TObject_t; -typedef TObject_t * TObject_p; -typedef TObject_t const* const_TObject_p; ---// Opaque type definition for TQObject -typedef struct TQObject_tag TQObject_t; -typedef TQObject_t * TQObject_p; -typedef TQObject_t const* const_TQObject_p; ---// Opaque type definition for TROOT -typedef struct TROOT_tag TROOT_t; -typedef TROOT_t * TROOT_p; -typedef TROOT_t const* const_TROOT_p; ---// Opaque type definition for TSeqCollection -typedef struct TSeqCollection_tag TSeqCollection_t; -typedef TSeqCollection_t * TSeqCollection_p; -typedef TSeqCollection_t const* const_TSeqCollection_p; ---// Opaque type definition for TSystem -typedef struct TSystem_tag TSystem_t; -typedef TSystem_t * TSystem_p; -typedef TSystem_t const* const_TSystem_p; ---// Opaque type definition for TVirtualPad -typedef struct TVirtualPad_tag TVirtualPad_t; -typedef TVirtualPad_t * TVirtualPad_p; -typedef TVirtualPad_t const* const_TVirtualPad_p; ---#endif // __HROOT_CORE__+#pragma once +// Opaque type definition for $classname+typedef struct Rectangle_t_tag Rectangle_t_t;typedef Rectangle_t_t * Rectangle_t_p;typedef Rectangle_t_t const* const_Rectangle_t_p;+// Opaque type definition for $classname+typedef struct TApplication_tag TApplication_t;typedef TApplication_t * TApplication_p;typedef TApplication_t const* const_TApplication_p;+// Opaque type definition for $classname+typedef struct TArray_tag TArray_t;typedef TArray_t * TArray_p;typedef TArray_t const* const_TArray_p;+// Opaque type definition for $classname+typedef struct TArrayC_tag TArrayC_t;typedef TArrayC_t * TArrayC_p;typedef TArrayC_t const* const_TArrayC_p;+// Opaque type definition for $classname+typedef struct TArrayD_tag TArrayD_t;typedef TArrayD_t * TArrayD_p;typedef TArrayD_t const* const_TArrayD_p;+// Opaque type definition for $classname+typedef struct TArrayF_tag TArrayF_t;typedef TArrayF_t * TArrayF_p;typedef TArrayF_t const* const_TArrayF_p;+// Opaque type definition for $classname+typedef struct TArrayI_tag TArrayI_t;typedef TArrayI_t * TArrayI_p;typedef TArrayI_t const* const_TArrayI_p;+// Opaque type definition for $classname+typedef struct TArrayL_tag TArrayL_t;typedef TArrayL_t * TArrayL_p;typedef TArrayL_t const* const_TArrayL_p;+// Opaque type definition for $classname+typedef struct TArrayL64_tag TArrayL64_t;typedef TArrayL64_t * TArrayL64_p;typedef TArrayL64_t const* const_TArrayL64_p;+// Opaque type definition for $classname+typedef struct TArrayS_tag TArrayS_t;typedef TArrayS_t * TArrayS_p;typedef TArrayS_t const* const_TArrayS_p;+// Opaque type definition for $classname+typedef struct TAtt3D_tag TAtt3D_t;typedef TAtt3D_t * TAtt3D_p;typedef TAtt3D_t const* const_TAtt3D_p;+// Opaque type definition for $classname+typedef struct TAttAxis_tag TAttAxis_t;typedef TAttAxis_t * TAttAxis_p;typedef TAttAxis_t const* const_TAttAxis_p;+// Opaque type definition for $classname+typedef struct TAttBBox_tag TAttBBox_t;typedef TAttBBox_t * TAttBBox_p;typedef TAttBBox_t const* const_TAttBBox_p;+// Opaque type definition for $classname+typedef struct TAttBBox2D_tag TAttBBox2D_t;typedef TAttBBox2D_t * TAttBBox2D_p;typedef TAttBBox2D_t const* const_TAttBBox2D_p;+// Opaque type definition for $classname+typedef struct TAttCanvas_tag TAttCanvas_t;typedef TAttCanvas_t * TAttCanvas_p;typedef TAttCanvas_t const* const_TAttCanvas_p;+// Opaque type definition for $classname+typedef struct TAttFill_tag TAttFill_t;typedef TAttFill_t * TAttFill_p;typedef TAttFill_t const* const_TAttFill_p;+// Opaque type definition for $classname+typedef struct TAttLine_tag TAttLine_t;typedef TAttLine_t * TAttLine_p;typedef TAttLine_t const* const_TAttLine_p;+// Opaque type definition for $classname+typedef struct TAttMarker_tag TAttMarker_t;typedef TAttMarker_t * TAttMarker_p;typedef TAttMarker_t const* const_TAttMarker_p;+// Opaque type definition for $classname+typedef struct TAttPad_tag TAttPad_t;typedef TAttPad_t * TAttPad_p;typedef TAttPad_t const* const_TAttPad_p;+// Opaque type definition for $classname+typedef struct TAttText_tag TAttText_t;typedef TAttText_t * TAttText_p;typedef TAttText_t const* const_TAttText_p;+// Opaque type definition for $classname+typedef struct TClass_tag TClass_t;typedef TClass_t * TClass_p;typedef TClass_t const* const_TClass_p;+// Opaque type definition for $classname+typedef struct TCollection_tag TCollection_t;typedef TCollection_t * TCollection_p;typedef TCollection_t const* const_TCollection_p;+// Opaque type definition for $classname+typedef struct TColor_tag TColor_t;typedef TColor_t * TColor_p;typedef TColor_t const* const_TColor_p;+// Opaque type definition for $classname+typedef struct TDatime_tag TDatime_t;typedef TDatime_t * TDatime_p;typedef TDatime_t const* const_TDatime_p;+// Opaque type definition for $classname+typedef struct TDictionary_tag TDictionary_t;typedef TDictionary_t * TDictionary_p;typedef TDictionary_t const* const_TDictionary_p;+// Opaque type definition for $classname+typedef struct TDirectory_tag TDirectory_t;typedef TDirectory_t * TDirectory_p;typedef TDirectory_t const* const_TDirectory_p;+// Opaque type definition for $classname+typedef struct TGlobal_tag TGlobal_t;typedef TGlobal_t * TGlobal_p;typedef TGlobal_t const* const_TGlobal_p;+// Opaque type definition for $classname+typedef struct TKey_tag TKey_t;typedef TKey_t * TKey_p;typedef TKey_t const* const_TKey_p;+// Opaque type definition for $classname+typedef struct TMutex_tag TMutex_t;typedef TMutex_t * TMutex_p;typedef TMutex_t const* const_TMutex_p;+// Opaque type definition for $classname+typedef struct TNamed_tag TNamed_t;typedef TNamed_t * TNamed_p;typedef TNamed_t const* const_TNamed_p;+// Opaque type definition for $classname+typedef struct TObjArray_tag TObjArray_t;typedef TObjArray_t * TObjArray_p;typedef TObjArray_t const* const_TObjArray_p;+// Opaque type definition for $classname+typedef struct TObject_tag TObject_t;typedef TObject_t * TObject_p;typedef TObject_t const* const_TObject_p;+// Opaque type definition for $classname+typedef struct TQObject_tag TQObject_t;typedef TQObject_t * TQObject_p;typedef TQObject_t const* const_TQObject_p;+// Opaque type definition for $classname+typedef struct TROOT_tag TROOT_t;typedef TROOT_t * TROOT_p;typedef TROOT_t const* const_TROOT_p;+// Opaque type definition for $classname+typedef struct TSeqCollection_tag TSeqCollection_t;typedef TSeqCollection_t * TSeqCollection_p;typedef TSeqCollection_t const* const_TSeqCollection_p;+// Opaque type definition for $classname+typedef struct TStyle_tag TStyle_t;typedef TStyle_t * TStyle_p;typedef TStyle_t const* const_TStyle_p;+// Opaque type definition for $classname+typedef struct TSystem_tag TSystem_t;typedef TSystem_t * TSystem_p;typedef TSystem_t const* const_TSystem_p;+// Opaque type definition for $classname+typedef struct TVirtualMutex_tag TVirtualMutex_t;typedef TVirtualMutex_t * TVirtualMutex_p;typedef TVirtualMutex_t const* const_TVirtualMutex_p;+// Opaque type definition for $classname+typedef struct TVirtualPad_tag TVirtualPad_t;typedef TVirtualPad_t * TVirtualPad_p;typedef TVirtualPad_t const* const_TVirtualPad_p; #ifdef __cplusplus } #endif
− csrc/HROOTCoreDeletable.cpp
@@ -1,17 +0,0 @@-#include <MacroPatternMatch.h>--#include "HROOTCoreDeletable.h"----#define CHECKPROTECT(x,y) IS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED)--#define TYPECASTMETHOD(cname,mname,oname) \- IIF( CHECKPROTECT(cname,mname) ) ( \- (to_nonconst<oname,cname ## _t>), \- (to_nonconst<cname,cname ## _t>) )-----
− csrc/HROOTCoreDeletable.h
@@ -1,37 +0,0 @@-#ifdef __cplusplus-extern "C" { -#endif--#ifndef __HROOT_CORE__Deletable__-#define __HROOT_CORE__Deletable__--#include "HROOT-coreType.h"---#undef DELETABLE_DECL_VIRT -#define DELETABLE_DECL_VIRT(Type) \-void Type ## _delete ( Type ## _p p )--#undef DELETABLE_DECL_NONVIRT -#define DELETABLE_DECL_NONVIRT(Type) \---#undef DELETABLE_DEF_VIRT-#define DELETABLE_DEF_VIRT(Type)\-void Type ## _delete ( Type ## _p p )\-{\-delete (to_nonconst<Type,Type ## _t>(p)) ; \-}--#undef DELETABLE_DEF_NONVIRT-#define DELETABLE_DEF_NONVIRT(Type)\-----#endif // __HROOT_CORE__Deletable__--#ifdef __cplusplus-}-#endif-
+ csrc/HROOTCoreRectangle_t.cpp view
@@ -0,0 +1,23 @@++#include "MacroPatternMatch.h"++#include "STDDeletable.h"++#include "GuiTypes.h"++#include "HROOTCoreRectangle_t.h"++++#define CHECKPROTECT(x,y) FXIS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED)++#define TYPECASTMETHOD(cname,mname,oname) \+ FXIIF( CHECKPROTECT(cname,mname) ) ( \+ (from_nonconst_to_nonconst<oname,cname ## _t>), \+ (from_nonconst_to_nonconst<cname,cname ## _t>) )++DELETABLE_DEF_VIRT(Rectangle_t)+RECTANGLE_T_DEF_VIRT(Rectangle_t)+RECTANGLE_T_DEF_NONVIRT(Rectangle_t)+RECTANGLE_T_DEF_ACCESSOR(Rectangle_t)+
+ csrc/HROOTCoreRectangle_t.h view
@@ -0,0 +1,78 @@++#ifdef __cplusplus+extern "C" {+#endif++#pragma once+++#include "HROOT-coreType.h"++#include "STDDeletable.h"++#include "stdcxxType.h"+++#define RECTANGLE_T_DECL_VIRT(Type) \++++#define RECTANGLE_T_DECL_NONVIRT(Type) \++++#define RECTANGLE_T_DECL_ACCESSOR(Type) \+unsigned short Type##_fHeight_get ( Type##_p p );\+void Type##_fHeight_set ( Type##_p p, unsigned short x );\+unsigned short Type##_fWidth_get ( Type##_p p );\+void Type##_fWidth_set ( Type##_p p, unsigned short x );\+short Type##_fX_get ( Type##_p p );\+void Type##_fX_set ( Type##_p p, short x );\+short Type##_fY_get ( Type##_p p );\+void Type##_fY_set ( Type##_p p, short x );+++#define RECTANGLE_T_DEF_VIRT(Type) \++++#define RECTANGLE_T_DEF_NONVIRT(Type) \++++#define RECTANGLE_T_DEF_ACCESSOR(Type) \+unsigned short Type##_fHeight_get ( Type##_p p ) {\+return (from_nonconst_to_nonconst<Type, Type##_t>(p))->fHeight;\+}\+void Type##_fHeight_set ( Type##_p p, unsigned short x ) {\+((from_nonconst_to_nonconst<Type, Type##_t>(p))->fHeight)=x;\+}\+unsigned short Type##_fWidth_get ( Type##_p p ) {\+return (from_nonconst_to_nonconst<Type, Type##_t>(p))->fWidth;\+}\+void Type##_fWidth_set ( Type##_p p, unsigned short x ) {\+((from_nonconst_to_nonconst<Type, Type##_t>(p))->fWidth)=x;\+}\+short Type##_fX_get ( Type##_p p ) {\+return (from_nonconst_to_nonconst<Type, Type##_t>(p))->fX;\+}\+void Type##_fX_set ( Type##_p p, short x ) {\+((from_nonconst_to_nonconst<Type, Type##_t>(p))->fX)=x;\+}\+short Type##_fY_get ( Type##_p p ) {\+return (from_nonconst_to_nonconst<Type, Type##_t>(p))->fY;\+}\+void Type##_fY_set ( Type##_p p, short x ) {\+((from_nonconst_to_nonconst<Type, Type##_t>(p))->fY)=x;\+}+++DELETABLE_DECL_VIRT(Rectangle_t)+RECTANGLE_T_DECL_VIRT(Rectangle_t)+RECTANGLE_T_DECL_NONVIRT(Rectangle_t)+RECTANGLE_T_DECL_ACCESSOR(Rectangle_t)++#ifdef __cplusplus+}+#endif+
csrc/HROOTCoreTApplication.cpp view
@@ -1,24 +1,27 @@-#include <MacroPatternMatch.h>++#include "MacroPatternMatch.h"+ #include "HROOTCoreTObject.h"+ #include "HROOTCoreTQObject.h"+ #include "TApplication.h"-#include "HROOTCoreTApplication.h" +#include "HROOTCoreTApplication.h" +using namespace ROOT; -#define CHECKPROTECT(x,y) IS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED)+#define CHECKPROTECT(x,y) FXIS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED) #define TYPECASTMETHOD(cname,mname,oname) \- IIF( CHECKPROTECT(cname,mname) ) ( \- (to_nonconst<oname,cname ## _t>), \- (to_nonconst<cname,cname ## _t>) )-+ FXIIF( CHECKPROTECT(cname,mname) ) ( \+ (from_nonconst_to_nonconst<oname,cname ## _t>), \+ (from_nonconst_to_nonconst<cname,cname ## _t>) ) TOBJECT_DEF_VIRT(TApplication) TQOBJECT_DEF_VIRT(TApplication) DELETABLE_DEF_VIRT(TApplication)- TAPPLICATION_DEF_VIRT(TApplication)- TAPPLICATION_DEF_NONVIRT(TApplication)+TAPPLICATION_DEF_ACCESSOR(TApplication)
csrc/HROOTCoreTApplication.h view
@@ -1,50 +1,54 @@+ #ifdef __cplusplus-extern "C" { +extern "C" { #endif -#ifndef __HROOT_CORE__TApplication__-#define __HROOT_CORE__TApplication__+#pragma once + #include "HROOT-coreType.h"+ #include "HROOTCoreTObject.h"+ #include "HROOTCoreTQObject.h"-#include "HROOTCoreDeletable.h" -#undef TAPPLICATION_DECL_VIRT +#include "STDDeletable.h"++ #define TAPPLICATION_DECL_VIRT(Type) \-void Type ## _Run ( Type ## _p p, int retrn )+void Type##_Run ( Type##_p p, bool retrn ); -#undef TAPPLICATION_DECL_NONVIRT + #define TAPPLICATION_DECL_NONVIRT(Type) \-Type ## _p Type ## _newTApplication ( const char* appClassName, int* argc, char** argv )+Type##_p Type##_newTApplication ( const char* appClassName, int* argc, char** argv ); -#undef TAPPLICATION_DEF_VIRT-#define TAPPLICATION_DEF_VIRT(Type)\-void Type ## _Run ( Type ## _p p, int retrn )\-{\-TYPECASTMETHOD(Type,Run,TApplication)(p)->Run(retrn);\-} -#undef TAPPLICATION_DEF_NONVIRT-#define TAPPLICATION_DEF_NONVIRT(Type)\-Type ## _p Type ## _newTApplication ( const char* appClassName, int* argc, char** argv )\-{\-Type * newp = new Type (appClassName, argc, argv); \-return to_nonconst<Type ## _t, Type >(newp);\+#define TAPPLICATION_DECL_ACCESSOR(Type) \++++#define TAPPLICATION_DEF_VIRT(Type) \+void Type##_Run ( Type##_p p, bool retrn ) {\+((TYPECASTMETHOD(Type, Run, TApplication))(p))->Run(retrn);\ } -TOBJECT_DECL_VIRT(TApplication);-TQOBJECT_DECL_VIRT(TApplication);-DELETABLE_DECL_VIRT(TApplication); +#define TAPPLICATION_DEF_NONVIRT(Type) \+Type##_p Type##_newTApplication ( const char* appClassName, int* argc, char** argv ) {\+Type* newp=new Type(appClassName, argc, argv);return from_nonconst_to_nonconst<Type##_t, Type>(newp);\+} -TAPPLICATION_DECL_VIRT(TApplication); +#define TAPPLICATION_DEF_ACCESSOR(Type) \ -TAPPLICATION_DECL_NONVIRT(TApplication); -#endif // __HROOT_CORE__TApplication__+TOBJECT_DECL_VIRT(TApplication)+TQOBJECT_DECL_VIRT(TApplication)+DELETABLE_DECL_VIRT(TApplication)+TAPPLICATION_DECL_VIRT(TApplication)+TAPPLICATION_DECL_NONVIRT(TApplication)+TAPPLICATION_DECL_ACCESSOR(TApplication) #ifdef __cplusplus }
csrc/HROOTCoreTArray.cpp view
@@ -1,21 +1,23 @@-#include <MacroPatternMatch.h>-#include "HROOTCoreDeletable.h"++#include "MacroPatternMatch.h"++#include "STDDeletable.h"+ #include "TArray.h"-#include "HROOTCoreTArray.h" +#include "HROOTCoreTArray.h" +using namespace ROOT; -#define CHECKPROTECT(x,y) IS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED)+#define CHECKPROTECT(x,y) FXIS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED) #define TYPECASTMETHOD(cname,mname,oname) \- IIF( CHECKPROTECT(cname,mname) ) ( \- (to_nonconst<oname,cname ## _t>), \- (to_nonconst<cname,cname ## _t>) )-+ FXIIF( CHECKPROTECT(cname,mname) ) ( \+ (from_nonconst_to_nonconst<oname,cname ## _t>), \+ (from_nonconst_to_nonconst<cname,cname ## _t>) ) DELETABLE_DEF_VIRT(TArray)- TARRAY_DEF_VIRT(TArray)- TARRAY_DEF_NONVIRT(TArray)+TARRAY_DEF_ACCESSOR(TArray)
csrc/HROOTCoreTArray.h view
@@ -1,39 +1,60 @@+ #ifdef __cplusplus-extern "C" { +extern "C" { #endif -#ifndef __HROOT_CORE__TArray__-#define __HROOT_CORE__TArray__+#pragma once + #include "HROOT-coreType.h"-#include "HROOTCoreDeletable.h" -#undef TARRAY_DECL_VIRT +#include "STDDeletable.h"++#include "stdcxxType.h"++ #define TARRAY_DECL_VIRT(Type) \+double Type##_GetAt ( Type##_p p, int i );\+void Type##_SetArray ( Type##_p p, int n );\+void Type##_SetAt ( Type##_p p, double v, int i ); -#undef TARRAY_DECL_NONVIRT #define TARRAY_DECL_NONVIRT(Type) \+int Type##_tArray_GetSize ( Type##_p p ); -#undef TARRAY_DEF_VIRT-#define TARRAY_DEF_VIRT(Type)\+#define TARRAY_DECL_ACCESSOR(Type) \ -#undef TARRAY_DEF_NONVIRT-#define TARRAY_DEF_NONVIRT(Type)\ +#define TARRAY_DEF_VIRT(Type) \+double Type##_GetAt ( Type##_p p, int i ) {\+return ((TYPECASTMETHOD(Type, GetAt, TArray))(p))->GetAt(i);\+}\+\+void Type##_SetArray ( Type##_p p, int n ) {\+((TYPECASTMETHOD(Type, SetArray, TArray))(p))->Set(n);\+}\+\+void Type##_SetAt ( Type##_p p, double v, int i ) {\+((TYPECASTMETHOD(Type, SetAt, TArray))(p))->SetAt(v, i);\+} -DELETABLE_DECL_VIRT(TArray); +#define TARRAY_DEF_NONVIRT(Type) \+int Type##_tArray_GetSize ( Type##_p p ) {\+return ((TYPECASTMETHOD(Type, tArray_GetSize, TArray))(p))->GetSize();\+} -TARRAY_DECL_VIRT(TArray); +#define TARRAY_DEF_ACCESSOR(Type) \ -TARRAY_DECL_NONVIRT(TArray); -#endif // __HROOT_CORE__TArray__+DELETABLE_DECL_VIRT(TArray)+TARRAY_DECL_VIRT(TArray)+TARRAY_DECL_NONVIRT(TArray)+TARRAY_DECL_ACCESSOR(TArray) #ifdef __cplusplus }
csrc/HROOTCoreTArrayC.cpp view
@@ -1,22 +1,24 @@-#include <MacroPatternMatch.h>++#include "MacroPatternMatch.h"+ #include "HROOTCoreTArray.h"+ #include "TArrayC.h"-#include "HROOTCoreTArrayC.h" +#include "HROOTCoreTArrayC.h" +using namespace ROOT; -#define CHECKPROTECT(x,y) IS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED)+#define CHECKPROTECT(x,y) FXIS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED) #define TYPECASTMETHOD(cname,mname,oname) \- IIF( CHECKPROTECT(cname,mname) ) ( \- (to_nonconst<oname,cname ## _t>), \- (to_nonconst<cname,cname ## _t>) )-+ FXIIF( CHECKPROTECT(cname,mname) ) ( \+ (from_nonconst_to_nonconst<oname,cname ## _t>), \+ (from_nonconst_to_nonconst<cname,cname ## _t>) ) TARRAY_DEF_VIRT(TArrayC) DELETABLE_DEF_VIRT(TArrayC)- TARRAYC_DEF_VIRT(TArrayC)- TARRAYC_DEF_NONVIRT(TArrayC)+TARRAYC_DEF_ACCESSOR(TArrayC)
csrc/HROOTCoreTArrayC.h view
@@ -1,41 +1,47 @@+ #ifdef __cplusplus-extern "C" { +extern "C" { #endif -#ifndef __HROOT_CORE__TArrayC__-#define __HROOT_CORE__TArrayC__+#pragma once + #include "HROOT-coreType.h"+ #include "HROOTCoreTArray.h"-#include "HROOTCoreDeletable.h" -#undef TARRAYC_DECL_VIRT +#include "STDDeletable.h"++ #define TARRAYC_DECL_VIRT(Type) \ -#undef TARRAYC_DECL_NONVIRT + #define TARRAYC_DECL_NONVIRT(Type) \ -#undef TARRAYC_DEF_VIRT-#define TARRAYC_DEF_VIRT(Type)\ +#define TARRAYC_DECL_ACCESSOR(Type) \ -#undef TARRAYC_DEF_NONVIRT-#define TARRAYC_DEF_NONVIRT(Type)\ -TARRAY_DECL_VIRT(TArrayC);-DELETABLE_DECL_VIRT(TArrayC);+#define TARRAYC_DEF_VIRT(Type) \ -TARRAYC_DECL_VIRT(TArrayC); +#define TARRAYC_DEF_NONVIRT(Type) \ -TARRAYC_DECL_NONVIRT(TArrayC); -#endif // __HROOT_CORE__TArrayC__+#define TARRAYC_DEF_ACCESSOR(Type) \++++TARRAY_DECL_VIRT(TArrayC)+DELETABLE_DECL_VIRT(TArrayC)+TARRAYC_DECL_VIRT(TArrayC)+TARRAYC_DECL_NONVIRT(TArrayC)+TARRAYC_DECL_ACCESSOR(TArrayC) #ifdef __cplusplus }
csrc/HROOTCoreTArrayD.cpp view
@@ -1,22 +1,24 @@-#include <MacroPatternMatch.h>++#include "MacroPatternMatch.h"+ #include "HROOTCoreTArray.h"+ #include "TArrayD.h"-#include "HROOTCoreTArrayD.h" +#include "HROOTCoreTArrayD.h" +using namespace ROOT; -#define CHECKPROTECT(x,y) IS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED)+#define CHECKPROTECT(x,y) FXIS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED) #define TYPECASTMETHOD(cname,mname,oname) \- IIF( CHECKPROTECT(cname,mname) ) ( \- (to_nonconst<oname,cname ## _t>), \- (to_nonconst<cname,cname ## _t>) )-+ FXIIF( CHECKPROTECT(cname,mname) ) ( \+ (from_nonconst_to_nonconst<oname,cname ## _t>), \+ (from_nonconst_to_nonconst<cname,cname ## _t>) ) TARRAY_DEF_VIRT(TArrayD) DELETABLE_DEF_VIRT(TArrayD)- TARRAYD_DEF_VIRT(TArrayD)- TARRAYD_DEF_NONVIRT(TArrayD)+TARRAYD_DEF_ACCESSOR(TArrayD)
csrc/HROOTCoreTArrayD.h view
@@ -1,41 +1,54 @@+ #ifdef __cplusplus-extern "C" { +extern "C" { #endif -#ifndef __HROOT_CORE__TArrayD__-#define __HROOT_CORE__TArrayD__+#pragma once + #include "HROOT-coreType.h"+ #include "HROOTCoreTArray.h"-#include "HROOTCoreDeletable.h" -#undef TARRAYD_DECL_VIRT +#include "STDDeletable.h"++ #define TARRAYD_DECL_VIRT(Type) \ -#undef TARRAYD_DECL_NONVIRT + #define TARRAYD_DECL_NONVIRT(Type) \+double Type##_tArrayD_At ( Type##_p p, int i );\+const double* Type##_tArrayD_GetArray ( Type##_p p ); -#undef TARRAYD_DEF_VIRT-#define TARRAYD_DEF_VIRT(Type)\+#define TARRAYD_DECL_ACCESSOR(Type) \ -#undef TARRAYD_DEF_NONVIRT-#define TARRAYD_DEF_NONVIRT(Type)\ +#define TARRAYD_DEF_VIRT(Type) \ -TARRAY_DECL_VIRT(TArrayD);-DELETABLE_DECL_VIRT(TArrayD); -TARRAYD_DECL_VIRT(TArrayD);+#define TARRAYD_DEF_NONVIRT(Type) \+double Type##_tArrayD_At ( Type##_p p, int i ) {\+return ((TYPECASTMETHOD(Type, tArrayD_At, TArrayD))(p))->At(i);\+}\+\+const double* Type##_tArrayD_GetArray ( Type##_p p ) {\+return ((TYPECASTMETHOD(Type, tArrayD_GetArray, TArrayD))(p))->GetArray();\+} -TARRAYD_DECL_NONVIRT(TArrayD);+#define TARRAYD_DEF_ACCESSOR(Type) \ -#endif // __HROOT_CORE__TArrayD__++TARRAY_DECL_VIRT(TArrayD)+DELETABLE_DECL_VIRT(TArrayD)+TARRAYD_DECL_VIRT(TArrayD)+TARRAYD_DECL_NONVIRT(TArrayD)+TARRAYD_DECL_ACCESSOR(TArrayD) #ifdef __cplusplus }
csrc/HROOTCoreTArrayF.cpp view
@@ -1,22 +1,24 @@-#include <MacroPatternMatch.h>++#include "MacroPatternMatch.h"+ #include "HROOTCoreTArray.h"+ #include "TArrayF.h"-#include "HROOTCoreTArrayF.h" +#include "HROOTCoreTArrayF.h" +using namespace ROOT; -#define CHECKPROTECT(x,y) IS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED)+#define CHECKPROTECT(x,y) FXIS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED) #define TYPECASTMETHOD(cname,mname,oname) \- IIF( CHECKPROTECT(cname,mname) ) ( \- (to_nonconst<oname,cname ## _t>), \- (to_nonconst<cname,cname ## _t>) )-+ FXIIF( CHECKPROTECT(cname,mname) ) ( \+ (from_nonconst_to_nonconst<oname,cname ## _t>), \+ (from_nonconst_to_nonconst<cname,cname ## _t>) ) TARRAY_DEF_VIRT(TArrayF) DELETABLE_DEF_VIRT(TArrayF)- TARRAYF_DEF_VIRT(TArrayF)- TARRAYF_DEF_NONVIRT(TArrayF)+TARRAYF_DEF_ACCESSOR(TArrayF)
csrc/HROOTCoreTArrayF.h view
@@ -1,41 +1,47 @@+ #ifdef __cplusplus-extern "C" { +extern "C" { #endif -#ifndef __HROOT_CORE__TArrayF__-#define __HROOT_CORE__TArrayF__+#pragma once + #include "HROOT-coreType.h"+ #include "HROOTCoreTArray.h"-#include "HROOTCoreDeletable.h" -#undef TARRAYF_DECL_VIRT +#include "STDDeletable.h"++ #define TARRAYF_DECL_VIRT(Type) \ -#undef TARRAYF_DECL_NONVIRT + #define TARRAYF_DECL_NONVIRT(Type) \ -#undef TARRAYF_DEF_VIRT-#define TARRAYF_DEF_VIRT(Type)\ +#define TARRAYF_DECL_ACCESSOR(Type) \ -#undef TARRAYF_DEF_NONVIRT-#define TARRAYF_DEF_NONVIRT(Type)\ -TARRAY_DECL_VIRT(TArrayF);-DELETABLE_DECL_VIRT(TArrayF);+#define TARRAYF_DEF_VIRT(Type) \ -TARRAYF_DECL_VIRT(TArrayF); +#define TARRAYF_DEF_NONVIRT(Type) \ -TARRAYF_DECL_NONVIRT(TArrayF); -#endif // __HROOT_CORE__TArrayF__+#define TARRAYF_DEF_ACCESSOR(Type) \++++TARRAY_DECL_VIRT(TArrayF)+DELETABLE_DECL_VIRT(TArrayF)+TARRAYF_DECL_VIRT(TArrayF)+TARRAYF_DECL_NONVIRT(TArrayF)+TARRAYF_DECL_ACCESSOR(TArrayF) #ifdef __cplusplus }
csrc/HROOTCoreTArrayI.cpp view
@@ -1,22 +1,24 @@-#include <MacroPatternMatch.h>++#include "MacroPatternMatch.h"+ #include "HROOTCoreTArray.h"+ #include "TArrayI.h"-#include "HROOTCoreTArrayI.h" +#include "HROOTCoreTArrayI.h" +using namespace ROOT; -#define CHECKPROTECT(x,y) IS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED)+#define CHECKPROTECT(x,y) FXIS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED) #define TYPECASTMETHOD(cname,mname,oname) \- IIF( CHECKPROTECT(cname,mname) ) ( \- (to_nonconst<oname,cname ## _t>), \- (to_nonconst<cname,cname ## _t>) )-+ FXIIF( CHECKPROTECT(cname,mname) ) ( \+ (from_nonconst_to_nonconst<oname,cname ## _t>), \+ (from_nonconst_to_nonconst<cname,cname ## _t>) ) TARRAY_DEF_VIRT(TArrayI) DELETABLE_DEF_VIRT(TArrayI)- TARRAYI_DEF_VIRT(TArrayI)- TARRAYI_DEF_NONVIRT(TArrayI)+TARRAYI_DEF_ACCESSOR(TArrayI)
csrc/HROOTCoreTArrayI.h view
@@ -1,41 +1,47 @@+ #ifdef __cplusplus-extern "C" { +extern "C" { #endif -#ifndef __HROOT_CORE__TArrayI__-#define __HROOT_CORE__TArrayI__+#pragma once + #include "HROOT-coreType.h"+ #include "HROOTCoreTArray.h"-#include "HROOTCoreDeletable.h" -#undef TARRAYI_DECL_VIRT +#include "STDDeletable.h"++ #define TARRAYI_DECL_VIRT(Type) \ -#undef TARRAYI_DECL_NONVIRT + #define TARRAYI_DECL_NONVIRT(Type) \ -#undef TARRAYI_DEF_VIRT-#define TARRAYI_DEF_VIRT(Type)\ +#define TARRAYI_DECL_ACCESSOR(Type) \ -#undef TARRAYI_DEF_NONVIRT-#define TARRAYI_DEF_NONVIRT(Type)\ -TARRAY_DECL_VIRT(TArrayI);-DELETABLE_DECL_VIRT(TArrayI);+#define TARRAYI_DEF_VIRT(Type) \ -TARRAYI_DECL_VIRT(TArrayI); +#define TARRAYI_DEF_NONVIRT(Type) \ -TARRAYI_DECL_NONVIRT(TArrayI); -#endif // __HROOT_CORE__TArrayI__+#define TARRAYI_DEF_ACCESSOR(Type) \++++TARRAY_DECL_VIRT(TArrayI)+DELETABLE_DECL_VIRT(TArrayI)+TARRAYI_DECL_VIRT(TArrayI)+TARRAYI_DECL_NONVIRT(TArrayI)+TARRAYI_DECL_ACCESSOR(TArrayI) #ifdef __cplusplus }
csrc/HROOTCoreTArrayL.cpp view
@@ -1,22 +1,24 @@-#include <MacroPatternMatch.h>++#include "MacroPatternMatch.h"+ #include "HROOTCoreTArray.h"+ #include "TArrayL.h"-#include "HROOTCoreTArrayL.h" +#include "HROOTCoreTArrayL.h" +using namespace ROOT; -#define CHECKPROTECT(x,y) IS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED)+#define CHECKPROTECT(x,y) FXIS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED) #define TYPECASTMETHOD(cname,mname,oname) \- IIF( CHECKPROTECT(cname,mname) ) ( \- (to_nonconst<oname,cname ## _t>), \- (to_nonconst<cname,cname ## _t>) )-+ FXIIF( CHECKPROTECT(cname,mname) ) ( \+ (from_nonconst_to_nonconst<oname,cname ## _t>), \+ (from_nonconst_to_nonconst<cname,cname ## _t>) ) TARRAY_DEF_VIRT(TArrayL) DELETABLE_DEF_VIRT(TArrayL)- TARRAYL_DEF_VIRT(TArrayL)- TARRAYL_DEF_NONVIRT(TArrayL)+TARRAYL_DEF_ACCESSOR(TArrayL)
csrc/HROOTCoreTArrayL.h view
@@ -1,41 +1,47 @@+ #ifdef __cplusplus-extern "C" { +extern "C" { #endif -#ifndef __HROOT_CORE__TArrayL__-#define __HROOT_CORE__TArrayL__+#pragma once + #include "HROOT-coreType.h"+ #include "HROOTCoreTArray.h"-#include "HROOTCoreDeletable.h" -#undef TARRAYL_DECL_VIRT +#include "STDDeletable.h"++ #define TARRAYL_DECL_VIRT(Type) \ -#undef TARRAYL_DECL_NONVIRT + #define TARRAYL_DECL_NONVIRT(Type) \ -#undef TARRAYL_DEF_VIRT-#define TARRAYL_DEF_VIRT(Type)\ +#define TARRAYL_DECL_ACCESSOR(Type) \ -#undef TARRAYL_DEF_NONVIRT-#define TARRAYL_DEF_NONVIRT(Type)\ -TARRAY_DECL_VIRT(TArrayL);-DELETABLE_DECL_VIRT(TArrayL);+#define TARRAYL_DEF_VIRT(Type) \ -TARRAYL_DECL_VIRT(TArrayL); +#define TARRAYL_DEF_NONVIRT(Type) \ -TARRAYL_DECL_NONVIRT(TArrayL); -#endif // __HROOT_CORE__TArrayL__+#define TARRAYL_DEF_ACCESSOR(Type) \++++TARRAY_DECL_VIRT(TArrayL)+DELETABLE_DECL_VIRT(TArrayL)+TARRAYL_DECL_VIRT(TArrayL)+TARRAYL_DECL_NONVIRT(TArrayL)+TARRAYL_DECL_ACCESSOR(TArrayL) #ifdef __cplusplus }
csrc/HROOTCoreTArrayL64.cpp view
@@ -1,22 +1,24 @@-#include <MacroPatternMatch.h>++#include "MacroPatternMatch.h"+ #include "HROOTCoreTArray.h"+ #include "TArrayL64.h"-#include "HROOTCoreTArrayL64.h" +#include "HROOTCoreTArrayL64.h" +using namespace ROOT; -#define CHECKPROTECT(x,y) IS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED)+#define CHECKPROTECT(x,y) FXIS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED) #define TYPECASTMETHOD(cname,mname,oname) \- IIF( CHECKPROTECT(cname,mname) ) ( \- (to_nonconst<oname,cname ## _t>), \- (to_nonconst<cname,cname ## _t>) )-+ FXIIF( CHECKPROTECT(cname,mname) ) ( \+ (from_nonconst_to_nonconst<oname,cname ## _t>), \+ (from_nonconst_to_nonconst<cname,cname ## _t>) ) TARRAY_DEF_VIRT(TArrayL64) DELETABLE_DEF_VIRT(TArrayL64)- TARRAYL64_DEF_VIRT(TArrayL64)- TARRAYL64_DEF_NONVIRT(TArrayL64)+TARRAYL64_DEF_ACCESSOR(TArrayL64)
csrc/HROOTCoreTArrayL64.h view
@@ -1,41 +1,47 @@+ #ifdef __cplusplus-extern "C" { +extern "C" { #endif -#ifndef __HROOT_CORE__TArrayL64__-#define __HROOT_CORE__TArrayL64__+#pragma once + #include "HROOT-coreType.h"+ #include "HROOTCoreTArray.h"-#include "HROOTCoreDeletable.h" -#undef TARRAYL64_DECL_VIRT +#include "STDDeletable.h"++ #define TARRAYL64_DECL_VIRT(Type) \ -#undef TARRAYL64_DECL_NONVIRT + #define TARRAYL64_DECL_NONVIRT(Type) \ -#undef TARRAYL64_DEF_VIRT-#define TARRAYL64_DEF_VIRT(Type)\ +#define TARRAYL64_DECL_ACCESSOR(Type) \ -#undef TARRAYL64_DEF_NONVIRT-#define TARRAYL64_DEF_NONVIRT(Type)\ -TARRAY_DECL_VIRT(TArrayL64);-DELETABLE_DECL_VIRT(TArrayL64);+#define TARRAYL64_DEF_VIRT(Type) \ -TARRAYL64_DECL_VIRT(TArrayL64); +#define TARRAYL64_DEF_NONVIRT(Type) \ -TARRAYL64_DECL_NONVIRT(TArrayL64); -#endif // __HROOT_CORE__TArrayL64__+#define TARRAYL64_DEF_ACCESSOR(Type) \++++TARRAY_DECL_VIRT(TArrayL64)+DELETABLE_DECL_VIRT(TArrayL64)+TARRAYL64_DECL_VIRT(TArrayL64)+TARRAYL64_DECL_NONVIRT(TArrayL64)+TARRAYL64_DECL_ACCESSOR(TArrayL64) #ifdef __cplusplus }
csrc/HROOTCoreTArrayS.cpp view
@@ -1,22 +1,24 @@-#include <MacroPatternMatch.h>++#include "MacroPatternMatch.h"+ #include "HROOTCoreTArray.h"+ #include "TArrayS.h"-#include "HROOTCoreTArrayS.h" +#include "HROOTCoreTArrayS.h" +using namespace ROOT; -#define CHECKPROTECT(x,y) IS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED)+#define CHECKPROTECT(x,y) FXIS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED) #define TYPECASTMETHOD(cname,mname,oname) \- IIF( CHECKPROTECT(cname,mname) ) ( \- (to_nonconst<oname,cname ## _t>), \- (to_nonconst<cname,cname ## _t>) )-+ FXIIF( CHECKPROTECT(cname,mname) ) ( \+ (from_nonconst_to_nonconst<oname,cname ## _t>), \+ (from_nonconst_to_nonconst<cname,cname ## _t>) ) TARRAY_DEF_VIRT(TArrayS) DELETABLE_DEF_VIRT(TArrayS)- TARRAYS_DEF_VIRT(TArrayS)- TARRAYS_DEF_NONVIRT(TArrayS)+TARRAYS_DEF_ACCESSOR(TArrayS)
csrc/HROOTCoreTArrayS.h view
@@ -1,41 +1,47 @@+ #ifdef __cplusplus-extern "C" { +extern "C" { #endif -#ifndef __HROOT_CORE__TArrayS__-#define __HROOT_CORE__TArrayS__+#pragma once + #include "HROOT-coreType.h"+ #include "HROOTCoreTArray.h"-#include "HROOTCoreDeletable.h" -#undef TARRAYS_DECL_VIRT +#include "STDDeletable.h"++ #define TARRAYS_DECL_VIRT(Type) \ -#undef TARRAYS_DECL_NONVIRT + #define TARRAYS_DECL_NONVIRT(Type) \ -#undef TARRAYS_DEF_VIRT-#define TARRAYS_DEF_VIRT(Type)\ +#define TARRAYS_DECL_ACCESSOR(Type) \ -#undef TARRAYS_DEF_NONVIRT-#define TARRAYS_DEF_NONVIRT(Type)\ -TARRAY_DECL_VIRT(TArrayS);-DELETABLE_DECL_VIRT(TArrayS);+#define TARRAYS_DEF_VIRT(Type) \ -TARRAYS_DECL_VIRT(TArrayS); +#define TARRAYS_DEF_NONVIRT(Type) \ -TARRAYS_DECL_NONVIRT(TArrayS); -#endif // __HROOT_CORE__TArrayS__+#define TARRAYS_DEF_ACCESSOR(Type) \++++TARRAY_DECL_VIRT(TArrayS)+DELETABLE_DECL_VIRT(TArrayS)+TARRAYS_DECL_VIRT(TArrayS)+TARRAYS_DECL_NONVIRT(TArrayS)+TARRAYS_DECL_ACCESSOR(TArrayS) #ifdef __cplusplus }
csrc/HROOTCoreTAtt3D.cpp view
@@ -1,21 +1,23 @@-#include <MacroPatternMatch.h>-#include "HROOTCoreDeletable.h"++#include "MacroPatternMatch.h"++#include "STDDeletable.h"+ #include "TAtt3D.h"-#include "HROOTCoreTAtt3D.h" +#include "HROOTCoreTAtt3D.h" +using namespace ROOT; -#define CHECKPROTECT(x,y) IS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED)+#define CHECKPROTECT(x,y) FXIS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED) #define TYPECASTMETHOD(cname,mname,oname) \- IIF( CHECKPROTECT(cname,mname) ) ( \- (to_nonconst<oname,cname ## _t>), \- (to_nonconst<cname,cname ## _t>) )-+ FXIIF( CHECKPROTECT(cname,mname) ) ( \+ (from_nonconst_to_nonconst<oname,cname ## _t>), \+ (from_nonconst_to_nonconst<cname,cname ## _t>) ) DELETABLE_DEF_VIRT(TAtt3D)- TATT3D_DEF_VIRT(TAtt3D)- TATT3D_DEF_NONVIRT(TAtt3D)+TATT3D_DEF_ACCESSOR(TAtt3D)
csrc/HROOTCoreTAtt3D.h view
@@ -1,39 +1,46 @@+ #ifdef __cplusplus-extern "C" { +extern "C" { #endif -#ifndef __HROOT_CORE__TAtt3D__-#define __HROOT_CORE__TAtt3D__+#pragma once + #include "HROOT-coreType.h"-#include "HROOTCoreDeletable.h" -#undef TATT3D_DECL_VIRT +#include "STDDeletable.h"++#include "stdcxxType.h"++ #define TATT3D_DECL_VIRT(Type) \ -#undef TATT3D_DECL_NONVIRT + #define TATT3D_DECL_NONVIRT(Type) \ -#undef TATT3D_DEF_VIRT-#define TATT3D_DEF_VIRT(Type)\ +#define TATT3D_DECL_ACCESSOR(Type) \ -#undef TATT3D_DEF_NONVIRT-#define TATT3D_DEF_NONVIRT(Type)\ -DELETABLE_DECL_VIRT(TAtt3D);+#define TATT3D_DEF_VIRT(Type) \ -TATT3D_DECL_VIRT(TAtt3D); +#define TATT3D_DEF_NONVIRT(Type) \ -TATT3D_DECL_NONVIRT(TAtt3D); -#endif // __HROOT_CORE__TAtt3D__+#define TATT3D_DEF_ACCESSOR(Type) \++++DELETABLE_DECL_VIRT(TAtt3D)+TATT3D_DECL_VIRT(TAtt3D)+TATT3D_DECL_NONVIRT(TAtt3D)+TATT3D_DECL_ACCESSOR(TAtt3D) #ifdef __cplusplus }
csrc/HROOTCoreTAttAxis.cpp view
@@ -1,21 +1,23 @@-#include <MacroPatternMatch.h>-#include "HROOTCoreDeletable.h"++#include "MacroPatternMatch.h"++#include "STDDeletable.h"+ #include "TAttAxis.h"-#include "HROOTCoreTAttAxis.h" +#include "HROOTCoreTAttAxis.h" +using namespace ROOT; -#define CHECKPROTECT(x,y) IS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED)+#define CHECKPROTECT(x,y) FXIS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED) #define TYPECASTMETHOD(cname,mname,oname) \- IIF( CHECKPROTECT(cname,mname) ) ( \- (to_nonconst<oname,cname ## _t>), \- (to_nonconst<cname,cname ## _t>) )-+ FXIIF( CHECKPROTECT(cname,mname) ) ( \+ (from_nonconst_to_nonconst<oname,cname ## _t>), \+ (from_nonconst_to_nonconst<cname,cname ## _t>) ) DELETABLE_DEF_VIRT(TAttAxis)- TATTAXIS_DEF_VIRT(TAttAxis)- TATTAXIS_DEF_NONVIRT(TAttAxis)+TATTAXIS_DEF_ACCESSOR(TAttAxis)
csrc/HROOTCoreTAttAxis.h view
@@ -1,146 +1,150 @@+ #ifdef __cplusplus-extern "C" { +extern "C" { #endif -#ifndef __HROOT_CORE__TAttAxis__-#define __HROOT_CORE__TAttAxis__+#pragma once + #include "HROOT-coreType.h"-#include "HROOTCoreDeletable.h" -#undef TATTAXIS_DECL_VIRT +#include "STDDeletable.h"++#include "stdcxxType.h"++ #define TATTAXIS_DECL_VIRT(Type) \-int Type ## _GetNdivisions ( Type ## _p p ); \-int Type ## _GetAxisColor ( Type ## _p p ); \-int Type ## _GetLabelColor ( Type ## _p p ); \-int Type ## _GetLabelFont ( Type ## _p p ); \-double Type ## _GetLabelOffset ( Type ## _p p ); \-double Type ## _GetLabelSize ( Type ## _p p ); \-double Type ## _GetTitleOffset ( Type ## _p p ); \-double Type ## _GetTitleSize ( Type ## _p p ); \-double Type ## _GetTickLength ( Type ## _p p ); \-int Type ## _GetTitleFont ( Type ## _p p ); \-void Type ## _SetNdivisions ( Type ## _p p, int n, int optim ); \-void Type ## _SetAxisColor ( Type ## _p p, int color ); \-void Type ## _SetLabelColor ( Type ## _p p, int color ); \-void Type ## _SetLabelFont ( Type ## _p p, int font ); \-void Type ## _SetLabelOffset ( Type ## _p p, double offset ); \-void Type ## _SetLabelSize ( Type ## _p p, double size ); \-void Type ## _SetTickLength ( Type ## _p p, double length ); \-void Type ## _SetTitleOffset ( Type ## _p p, double offset ); \-void Type ## _SetTitleSize ( Type ## _p p, double size ); \-void Type ## _SetTitleColor ( Type ## _p p, int color ); \-void Type ## _SetTitleFont ( Type ## _p p, int font )+int Type##_GetNdivisions ( Type##_p p );\+short Type##_GetAxisColor ( Type##_p p );\+short Type##_GetLabelColor ( Type##_p p );\+short Type##_GetLabelFont ( Type##_p p );\+float Type##_GetLabelOffset ( Type##_p p );\+float Type##_GetLabelSize ( Type##_p p );\+float Type##_GetTitleOffset ( Type##_p p );\+float Type##_GetTitleSize ( Type##_p p );\+float Type##_GetTickLength ( Type##_p p );\+short Type##_GetTitleFont ( Type##_p p );\+void Type##_SetNdivisions ( Type##_p p, int n, bool optim );\+void Type##_SetAxisColor ( Type##_p p, short color );\+void Type##_SetLabelColor ( Type##_p p, short color );\+void Type##_SetLabelFont ( Type##_p p, short font );\+void Type##_SetLabelOffset ( Type##_p p, float offset );\+void Type##_SetLabelSize ( Type##_p p, float size );\+void Type##_SetTickLength ( Type##_p p, float length );\+void Type##_SetTitleOffset ( Type##_p p, float offset );\+void Type##_SetTitleSize ( Type##_p p, float size );\+void Type##_SetTitleColor ( Type##_p p, short color );\+void Type##_SetTitleFont ( Type##_p p, short font ); -#undef TATTAXIS_DECL_NONVIRT + #define TATTAXIS_DECL_NONVIRT(Type) \-Type ## _p Type ## _newTAttAxis ( )+Type##_p Type##_newTAttAxis ( ); -#undef TATTAXIS_DEF_VIRT-#define TATTAXIS_DEF_VIRT(Type)\-int Type ## _GetNdivisions ( Type ## _p p )\-{\-return TYPECASTMETHOD(Type,GetNdivisions,TAttAxis)(p)->GetNdivisions();\++#define TATTAXIS_DECL_ACCESSOR(Type) \++++#define TATTAXIS_DEF_VIRT(Type) \+int Type##_GetNdivisions ( Type##_p p ) {\+return ((TYPECASTMETHOD(Type, GetNdivisions, TAttAxis))(p))->GetNdivisions();\ }\-int Type ## _GetAxisColor ( Type ## _p p )\-{\-return TYPECASTMETHOD(Type,GetAxisColor,TAttAxis)(p)->GetAxisColor();\+\+short Type##_GetAxisColor ( Type##_p p ) {\+return ((TYPECASTMETHOD(Type, GetAxisColor, TAttAxis))(p))->GetAxisColor();\ }\-int Type ## _GetLabelColor ( Type ## _p p )\-{\-return TYPECASTMETHOD(Type,GetLabelColor,TAttAxis)(p)->GetLabelColor();\+\+short Type##_GetLabelColor ( Type##_p p ) {\+return ((TYPECASTMETHOD(Type, GetLabelColor, TAttAxis))(p))->GetLabelColor();\ }\-int Type ## _GetLabelFont ( Type ## _p p )\-{\-return TYPECASTMETHOD(Type,GetLabelFont,TAttAxis)(p)->GetLabelFont();\+\+short Type##_GetLabelFont ( Type##_p p ) {\+return ((TYPECASTMETHOD(Type, GetLabelFont, TAttAxis))(p))->GetLabelFont();\ }\-double Type ## _GetLabelOffset ( Type ## _p p )\-{\-return TYPECASTMETHOD(Type,GetLabelOffset,TAttAxis)(p)->GetLabelOffset();\+\+float Type##_GetLabelOffset ( Type##_p p ) {\+return ((TYPECASTMETHOD(Type, GetLabelOffset, TAttAxis))(p))->GetLabelOffset();\ }\-double Type ## _GetLabelSize ( Type ## _p p )\-{\-return TYPECASTMETHOD(Type,GetLabelSize,TAttAxis)(p)->GetLabelSize();\+\+float Type##_GetLabelSize ( Type##_p p ) {\+return ((TYPECASTMETHOD(Type, GetLabelSize, TAttAxis))(p))->GetLabelSize();\ }\-double Type ## _GetTitleOffset ( Type ## _p p )\-{\-return TYPECASTMETHOD(Type,GetTitleOffset,TAttAxis)(p)->GetTitleOffset();\+\+float Type##_GetTitleOffset ( Type##_p p ) {\+return ((TYPECASTMETHOD(Type, GetTitleOffset, TAttAxis))(p))->GetTitleOffset();\ }\-double Type ## _GetTitleSize ( Type ## _p p )\-{\-return TYPECASTMETHOD(Type,GetTitleSize,TAttAxis)(p)->GetTitleSize();\+\+float Type##_GetTitleSize ( Type##_p p ) {\+return ((TYPECASTMETHOD(Type, GetTitleSize, TAttAxis))(p))->GetTitleSize();\ }\-double Type ## _GetTickLength ( Type ## _p p )\-{\-return TYPECASTMETHOD(Type,GetTickLength,TAttAxis)(p)->GetTickLength();\+\+float Type##_GetTickLength ( Type##_p p ) {\+return ((TYPECASTMETHOD(Type, GetTickLength, TAttAxis))(p))->GetTickLength();\ }\-int Type ## _GetTitleFont ( Type ## _p p )\-{\-return TYPECASTMETHOD(Type,GetTitleFont,TAttAxis)(p)->GetTitleFont();\+\+short Type##_GetTitleFont ( Type##_p p ) {\+return ((TYPECASTMETHOD(Type, GetTitleFont, TAttAxis))(p))->GetTitleFont();\ }\-void Type ## _SetNdivisions ( Type ## _p p, int n, int optim )\-{\-TYPECASTMETHOD(Type,SetNdivisions,TAttAxis)(p)->SetNdivisions(n, optim);\+\+void Type##_SetNdivisions ( Type##_p p, int n, bool optim ) {\+((TYPECASTMETHOD(Type, SetNdivisions, TAttAxis))(p))->SetNdivisions(n, optim);\ }\-void Type ## _SetAxisColor ( Type ## _p p, int color )\-{\-TYPECASTMETHOD(Type,SetAxisColor,TAttAxis)(p)->SetAxisColor(color);\+\+void Type##_SetAxisColor ( Type##_p p, short color ) {\+((TYPECASTMETHOD(Type, SetAxisColor, TAttAxis))(p))->SetAxisColor(color);\ }\-void Type ## _SetLabelColor ( Type ## _p p, int color )\-{\-TYPECASTMETHOD(Type,SetLabelColor,TAttAxis)(p)->SetLabelColor(color);\+\+void Type##_SetLabelColor ( Type##_p p, short color ) {\+((TYPECASTMETHOD(Type, SetLabelColor, TAttAxis))(p))->SetLabelColor(color);\ }\-void Type ## _SetLabelFont ( Type ## _p p, int font )\-{\-TYPECASTMETHOD(Type,SetLabelFont,TAttAxis)(p)->SetLabelFont(font);\+\+void Type##_SetLabelFont ( Type##_p p, short font ) {\+((TYPECASTMETHOD(Type, SetLabelFont, TAttAxis))(p))->SetLabelFont(font);\ }\-void Type ## _SetLabelOffset ( Type ## _p p, double offset )\-{\-TYPECASTMETHOD(Type,SetLabelOffset,TAttAxis)(p)->SetLabelOffset(offset);\+\+void Type##_SetLabelOffset ( Type##_p p, float offset ) {\+((TYPECASTMETHOD(Type, SetLabelOffset, TAttAxis))(p))->SetLabelOffset(offset);\ }\-void Type ## _SetLabelSize ( Type ## _p p, double size )\-{\-TYPECASTMETHOD(Type,SetLabelSize,TAttAxis)(p)->SetLabelSize(size);\+\+void Type##_SetLabelSize ( Type##_p p, float size ) {\+((TYPECASTMETHOD(Type, SetLabelSize, TAttAxis))(p))->SetLabelSize(size);\ }\-void Type ## _SetTickLength ( Type ## _p p, double length )\-{\-TYPECASTMETHOD(Type,SetTickLength,TAttAxis)(p)->SetTickLength(length);\+\+void Type##_SetTickLength ( Type##_p p, float length ) {\+((TYPECASTMETHOD(Type, SetTickLength, TAttAxis))(p))->SetTickLength(length);\ }\-void Type ## _SetTitleOffset ( Type ## _p p, double offset )\-{\-TYPECASTMETHOD(Type,SetTitleOffset,TAttAxis)(p)->SetTitleOffset(offset);\+\+void Type##_SetTitleOffset ( Type##_p p, float offset ) {\+((TYPECASTMETHOD(Type, SetTitleOffset, TAttAxis))(p))->SetTitleOffset(offset);\ }\-void Type ## _SetTitleSize ( Type ## _p p, double size )\-{\-TYPECASTMETHOD(Type,SetTitleSize,TAttAxis)(p)->SetTitleSize(size);\+\+void Type##_SetTitleSize ( Type##_p p, float size ) {\+((TYPECASTMETHOD(Type, SetTitleSize, TAttAxis))(p))->SetTitleSize(size);\ }\-void Type ## _SetTitleColor ( Type ## _p p, int color )\-{\-TYPECASTMETHOD(Type,SetTitleColor,TAttAxis)(p)->SetTitleColor(color);\+\+void Type##_SetTitleColor ( Type##_p p, short color ) {\+((TYPECASTMETHOD(Type, SetTitleColor, TAttAxis))(p))->SetTitleColor(color);\ }\-void Type ## _SetTitleFont ( Type ## _p p, int font )\-{\-TYPECASTMETHOD(Type,SetTitleFont,TAttAxis)(p)->SetTitleFont(font);\+\+void Type##_SetTitleFont ( Type##_p p, short font ) {\+((TYPECASTMETHOD(Type, SetTitleFont, TAttAxis))(p))->SetTitleFont(font);\ } -#undef TATTAXIS_DEF_NONVIRT-#define TATTAXIS_DEF_NONVIRT(Type)\-Type ## _p Type ## _newTAttAxis ( )\-{\-Type * newp = new Type (); \-return to_nonconst<Type ## _t, Type >(newp);\++#define TATTAXIS_DEF_NONVIRT(Type) \+Type##_p Type##_newTAttAxis ( ) {\+Type* newp=new Type();return from_nonconst_to_nonconst<Type##_t, Type>(newp);\ } -DELETABLE_DECL_VIRT(TAttAxis); +#define TATTAXIS_DEF_ACCESSOR(Type) \ -TATTAXIS_DECL_VIRT(TAttAxis); -TATTAXIS_DECL_NONVIRT(TAttAxis);---#endif // __HROOT_CORE__TAttAxis__+DELETABLE_DECL_VIRT(TAttAxis)+TATTAXIS_DECL_VIRT(TAttAxis)+TATTAXIS_DECL_NONVIRT(TAttAxis)+TATTAXIS_DECL_ACCESSOR(TAttAxis) #ifdef __cplusplus }
csrc/HROOTCoreTAttBBox.cpp view
@@ -1,21 +1,23 @@-#include <MacroPatternMatch.h>-#include "HROOTCoreDeletable.h"++#include "MacroPatternMatch.h"++#include "STDDeletable.h"+ #include "TAttBBox.h"-#include "HROOTCoreTAttBBox.h" +#include "HROOTCoreTAttBBox.h" +using namespace ROOT; -#define CHECKPROTECT(x,y) IS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED)+#define CHECKPROTECT(x,y) FXIS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED) #define TYPECASTMETHOD(cname,mname,oname) \- IIF( CHECKPROTECT(cname,mname) ) ( \- (to_nonconst<oname,cname ## _t>), \- (to_nonconst<cname,cname ## _t>) )-+ FXIIF( CHECKPROTECT(cname,mname) ) ( \+ (from_nonconst_to_nonconst<oname,cname ## _t>), \+ (from_nonconst_to_nonconst<cname,cname ## _t>) ) DELETABLE_DEF_VIRT(TAttBBox)- TATTBBOX_DEF_VIRT(TAttBBox)- TATTBBOX_DEF_NONVIRT(TAttBBox)+TATTBBOX_DEF_ACCESSOR(TAttBBox)
csrc/HROOTCoreTAttBBox.h view
@@ -1,39 +1,46 @@+ #ifdef __cplusplus-extern "C" { +extern "C" { #endif -#ifndef __HROOT_CORE__TAttBBox__-#define __HROOT_CORE__TAttBBox__+#pragma once + #include "HROOT-coreType.h"-#include "HROOTCoreDeletable.h" -#undef TATTBBOX_DECL_VIRT +#include "STDDeletable.h"++#include "stdcxxType.h"++ #define TATTBBOX_DECL_VIRT(Type) \ -#undef TATTBBOX_DECL_NONVIRT + #define TATTBBOX_DECL_NONVIRT(Type) \ -#undef TATTBBOX_DEF_VIRT-#define TATTBBOX_DEF_VIRT(Type)\ +#define TATTBBOX_DECL_ACCESSOR(Type) \ -#undef TATTBBOX_DEF_NONVIRT-#define TATTBBOX_DEF_NONVIRT(Type)\ -DELETABLE_DECL_VIRT(TAttBBox);+#define TATTBBOX_DEF_VIRT(Type) \ -TATTBBOX_DECL_VIRT(TAttBBox); +#define TATTBBOX_DEF_NONVIRT(Type) \ -TATTBBOX_DECL_NONVIRT(TAttBBox); -#endif // __HROOT_CORE__TAttBBox__+#define TATTBBOX_DEF_ACCESSOR(Type) \++++DELETABLE_DECL_VIRT(TAttBBox)+TATTBBOX_DECL_VIRT(TAttBBox)+TATTBBOX_DECL_NONVIRT(TAttBBox)+TATTBBOX_DECL_ACCESSOR(TAttBBox) #ifdef __cplusplus }
+ csrc/HROOTCoreTAttBBox2D.cpp view
@@ -0,0 +1,24 @@++#include "MacroPatternMatch.h"++#include "HROOTCoreRectangle_t.h"++#include "STDDeletable.h"++#include "TAttBBox2D.h"++#include "HROOTCoreTAttBBox2D.h"++using namespace ROOT;++#define CHECKPROTECT(x,y) FXIS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED)++#define TYPECASTMETHOD(cname,mname,oname) \+ FXIIF( CHECKPROTECT(cname,mname) ) ( \+ (from_nonconst_to_nonconst<oname,cname ## _t>), \+ (from_nonconst_to_nonconst<cname,cname ## _t>) )++DELETABLE_DEF_VIRT(TAttBBox2D)+TATTBBOX2D_DEF_NONVIRT(TAttBBox2D)+TATTBBOX2D_DEF_ACCESSOR(TAttBBox2D)+
+ csrc/HROOTCoreTAttBBox2D.h view
@@ -0,0 +1,70 @@++#ifdef __cplusplus+extern "C" {+#endif++#pragma once+++#include "HROOT-coreType.h"++#include "STDDeletable.h"++#include "stdcxxType.h"+++#define TATTBBOX2D_DECL_VIRT(Type) \+Rectangle_t_p Type##_GetBBox ( Type##_p p );\+void Type##_SetBBoxX1 ( Type##_p p, int x );\+void Type##_SetBBoxX2 ( Type##_p p, int x );\+void Type##_SetBBoxY1 ( Type##_p p, int y );\+void Type##_SetBBoxY2 ( Type##_p p, int y );+++#define TATTBBOX2D_DECL_NONVIRT(Type) \++++#define TATTBBOX2D_DECL_ACCESSOR(Type) \++++#define TATTBBOX2D_DEF_VIRT(Type) \+Rectangle_t_p Type##_GetBBox ( Type##_p p ) {\+return from_nonconst_to_nonconst<Rectangle_t_t, Rectangle_t>(new Rectangle_t(((TYPECASTMETHOD(Type, GetBBox, TAttBBox2D))(p))->GetBBox()));\+}\+\+void Type##_SetBBoxX1 ( Type##_p p, int x ) {\+((TYPECASTMETHOD(Type, SetBBoxX1, TAttBBox2D))(p))->SetBBoxX1(x);\+}\+\+void Type##_SetBBoxX2 ( Type##_p p, int x ) {\+((TYPECASTMETHOD(Type, SetBBoxX2, TAttBBox2D))(p))->SetBBoxX2(x);\+}\+\+void Type##_SetBBoxY1 ( Type##_p p, int y ) {\+((TYPECASTMETHOD(Type, SetBBoxY1, TAttBBox2D))(p))->SetBBoxY1(y);\+}\+\+void Type##_SetBBoxY2 ( Type##_p p, int y ) {\+((TYPECASTMETHOD(Type, SetBBoxY2, TAttBBox2D))(p))->SetBBoxY2(y);\+}+++#define TATTBBOX2D_DEF_NONVIRT(Type) \++++#define TATTBBOX2D_DEF_ACCESSOR(Type) \++++DELETABLE_DECL_VIRT(TAttBBox2D)+TATTBBOX2D_DECL_VIRT(TAttBBox2D)+TATTBBOX2D_DECL_NONVIRT(TAttBBox2D)+TATTBBOX2D_DECL_ACCESSOR(TAttBBox2D)++#ifdef __cplusplus+}+#endif+
csrc/HROOTCoreTAttCanvas.cpp view
@@ -1,21 +1,23 @@-#include <MacroPatternMatch.h>-#include "HROOTCoreDeletable.h"++#include "MacroPatternMatch.h"++#include "STDDeletable.h"+ #include "TAttCanvas.h"-#include "HROOTCoreTAttCanvas.h" +#include "HROOTCoreTAttCanvas.h" +using namespace ROOT; -#define CHECKPROTECT(x,y) IS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED)+#define CHECKPROTECT(x,y) FXIS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED) #define TYPECASTMETHOD(cname,mname,oname) \- IIF( CHECKPROTECT(cname,mname) ) ( \- (to_nonconst<oname,cname ## _t>), \- (to_nonconst<cname,cname ## _t>) )-+ FXIIF( CHECKPROTECT(cname,mname) ) ( \+ (from_nonconst_to_nonconst<oname,cname ## _t>), \+ (from_nonconst_to_nonconst<cname,cname ## _t>) ) DELETABLE_DEF_VIRT(TAttCanvas)- TATTCANVAS_DEF_VIRT(TAttCanvas)- TATTCANVAS_DEF_NONVIRT(TAttCanvas)+TATTCANVAS_DEF_ACCESSOR(TAttCanvas)
csrc/HROOTCoreTAttCanvas.h view
@@ -1,43 +1,48 @@+ #ifdef __cplusplus-extern "C" { +extern "C" { #endif -#ifndef __HROOT_CORE__TAttCanvas__-#define __HROOT_CORE__TAttCanvas__+#pragma once + #include "HROOT-coreType.h"-#include "HROOTCoreDeletable.h" -#undef TATTCANVAS_DECL_VIRT +#include "STDDeletable.h"++#include "stdcxxType.h"++ #define TATTCANVAS_DECL_VIRT(Type) \ -#undef TATTCANVAS_DECL_NONVIRT + #define TATTCANVAS_DECL_NONVIRT(Type) \-Type ## _p Type ## _newTAttCanvas ( )+Type##_p Type##_newTAttCanvas ( ); -#undef TATTCANVAS_DEF_VIRT-#define TATTCANVAS_DEF_VIRT(Type)\ +#define TATTCANVAS_DECL_ACCESSOR(Type) \ -#undef TATTCANVAS_DEF_NONVIRT-#define TATTCANVAS_DEF_NONVIRT(Type)\-Type ## _p Type ## _newTAttCanvas ( )\-{\-Type * newp = new Type (); \-return to_nonconst<Type ## _t, Type >(newp);\-} -DELETABLE_DECL_VIRT(TAttCanvas); +#define TATTCANVAS_DEF_VIRT(Type) \ -TATTCANVAS_DECL_VIRT(TAttCanvas); -TATTCANVAS_DECL_NONVIRT(TAttCanvas);+#define TATTCANVAS_DEF_NONVIRT(Type) \+Type##_p Type##_newTAttCanvas ( ) {\+Type* newp=new Type();return from_nonconst_to_nonconst<Type##_t, Type>(newp);\+} -#endif // __HROOT_CORE__TAttCanvas__+#define TATTCANVAS_DEF_ACCESSOR(Type) \++++DELETABLE_DECL_VIRT(TAttCanvas)+TATTCANVAS_DECL_VIRT(TAttCanvas)+TATTCANVAS_DECL_NONVIRT(TAttCanvas)+TATTCANVAS_DECL_ACCESSOR(TAttCanvas) #ifdef __cplusplus }
csrc/HROOTCoreTAttFill.cpp view
@@ -1,21 +1,23 @@-#include <MacroPatternMatch.h>-#include "HROOTCoreDeletable.h"++#include "MacroPatternMatch.h"++#include "STDDeletable.h"+ #include "TAttFill.h"-#include "HROOTCoreTAttFill.h" +#include "HROOTCoreTAttFill.h" +using namespace ROOT; -#define CHECKPROTECT(x,y) IS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED)+#define CHECKPROTECT(x,y) FXIS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED) #define TYPECASTMETHOD(cname,mname,oname) \- IIF( CHECKPROTECT(cname,mname) ) ( \- (to_nonconst<oname,cname ## _t>), \- (to_nonconst<cname,cname ## _t>) )-+ FXIIF( CHECKPROTECT(cname,mname) ) ( \+ (from_nonconst_to_nonconst<oname,cname ## _t>), \+ (from_nonconst_to_nonconst<cname,cname ## _t>) ) DELETABLE_DEF_VIRT(TAttFill)- TATTFILL_DEF_VIRT(TAttFill)- TATTFILL_DEF_NONVIRT(TAttFill)+TATTFILL_DEF_ACCESSOR(TAttFill)
csrc/HROOTCoreTAttFill.h view
@@ -1,51 +1,55 @@+ #ifdef __cplusplus-extern "C" { +extern "C" { #endif -#ifndef __HROOT_CORE__TAttFill__-#define __HROOT_CORE__TAttFill__+#pragma once + #include "HROOT-coreType.h"-#include "HROOTCoreDeletable.h" -#undef TATTFILL_DECL_VIRT +#include "STDDeletable.h"++#include "stdcxxType.h"++ #define TATTFILL_DECL_VIRT(Type) \-void Type ## _SetFillColor ( Type ## _p p, int color ); \-void Type ## _SetFillStyle ( Type ## _p p, int style )+void Type##_SetFillColor ( Type##_p p, int color );\+void Type##_SetFillStyle ( Type##_p p, int style ); -#undef TATTFILL_DECL_NONVIRT + #define TATTFILL_DECL_NONVIRT(Type) \-Type ## _p Type ## _newTAttFill ( int fcolor, int fstyle )+Type##_p Type##_newTAttFill ( short fcolor, short fstyle ); -#undef TATTFILL_DEF_VIRT-#define TATTFILL_DEF_VIRT(Type)\-void Type ## _SetFillColor ( Type ## _p p, int color )\-{\-TYPECASTMETHOD(Type,SetFillColor,TAttFill)(p)->SetFillColor(color);\++#define TATTFILL_DECL_ACCESSOR(Type) \++++#define TATTFILL_DEF_VIRT(Type) \+void Type##_SetFillColor ( Type##_p p, int color ) {\+((TYPECASTMETHOD(Type, SetFillColor, TAttFill))(p))->SetFillColor(color);\ }\-void Type ## _SetFillStyle ( Type ## _p p, int style )\-{\-TYPECASTMETHOD(Type,SetFillStyle,TAttFill)(p)->SetFillStyle(style);\+\+void Type##_SetFillStyle ( Type##_p p, int style ) {\+((TYPECASTMETHOD(Type, SetFillStyle, TAttFill))(p))->SetFillStyle(style);\ } -#undef TATTFILL_DEF_NONVIRT-#define TATTFILL_DEF_NONVIRT(Type)\-Type ## _p Type ## _newTAttFill ( int fcolor, int fstyle )\-{\-Type * newp = new Type (fcolor, fstyle); \-return to_nonconst<Type ## _t, Type >(newp);\++#define TATTFILL_DEF_NONVIRT(Type) \+Type##_p Type##_newTAttFill ( short fcolor, short fstyle ) {\+Type* newp=new Type(fcolor, fstyle);return from_nonconst_to_nonconst<Type##_t, Type>(newp);\ } -DELETABLE_DECL_VIRT(TAttFill); +#define TATTFILL_DEF_ACCESSOR(Type) \ -TATTFILL_DECL_VIRT(TAttFill); -TATTFILL_DECL_NONVIRT(TAttFill);---#endif // __HROOT_CORE__TAttFill__+DELETABLE_DECL_VIRT(TAttFill)+TATTFILL_DECL_VIRT(TAttFill)+TATTFILL_DECL_NONVIRT(TAttFill)+TATTFILL_DECL_ACCESSOR(TAttFill) #ifdef __cplusplus }
csrc/HROOTCoreTAttLine.cpp view
@@ -1,21 +1,23 @@-#include <MacroPatternMatch.h>-#include "HROOTCoreDeletable.h"++#include "MacroPatternMatch.h"++#include "STDDeletable.h"+ #include "TAttLine.h"-#include "HROOTCoreTAttLine.h" +#include "HROOTCoreTAttLine.h" +using namespace ROOT; -#define CHECKPROTECT(x,y) IS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED)+#define CHECKPROTECT(x,y) FXIS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED) #define TYPECASTMETHOD(cname,mname,oname) \- IIF( CHECKPROTECT(cname,mname) ) ( \- (to_nonconst<oname,cname ## _t>), \- (to_nonconst<cname,cname ## _t>) )-+ FXIIF( CHECKPROTECT(cname,mname) ) ( \+ (from_nonconst_to_nonconst<oname,cname ## _t>), \+ (from_nonconst_to_nonconst<cname,cname ## _t>) ) DELETABLE_DEF_VIRT(TAttLine)- TATTLINE_DEF_VIRT(TAttLine)- TATTLINE_DEF_NONVIRT(TAttLine)+TATTLINE_DEF_ACCESSOR(TAttLine)
csrc/HROOTCoreTAttLine.h view
@@ -1,86 +1,90 @@+ #ifdef __cplusplus-extern "C" { +extern "C" { #endif -#ifndef __HROOT_CORE__TAttLine__-#define __HROOT_CORE__TAttLine__+#pragma once + #include "HROOT-coreType.h"-#include "HROOTCoreDeletable.h" -#undef TATTLINE_DECL_VIRT +#include "STDDeletable.h"++#include "stdcxxType.h"++ #define TATTLINE_DECL_VIRT(Type) \-int Type ## _GetLineColor ( Type ## _p p ); \-int Type ## _GetLineStyle ( Type ## _p p ); \-int Type ## _GetLineWidth ( Type ## _p p ); \-void Type ## _ResetAttLine ( Type ## _p p, const char* option ); \-void Type ## _SetLineAttributes ( Type ## _p p ); \-void Type ## _SetLineColor ( Type ## _p p, int lcolor ); \-void Type ## _SetLineStyle ( Type ## _p p, int lstyle ); \-void Type ## _SetLineWidth ( Type ## _p p, int lwidth )+short Type##_GetLineColor ( Type##_p p );\+short Type##_GetLineStyle ( Type##_p p );\+short Type##_GetLineWidth ( Type##_p p );\+void Type##_ResetAttLine ( Type##_p p, const char* option );\+void Type##_SetLineAttributes ( Type##_p p );\+void Type##_SetLineColor ( Type##_p p, short lcolor );\+void Type##_SetLineStyle ( Type##_p p, short lstyle );\+void Type##_SetLineWidth ( Type##_p p, short lwidth ); -#undef TATTLINE_DECL_NONVIRT + #define TATTLINE_DECL_NONVIRT(Type) \-Type ## _p Type ## _newTAttLine ( int lcolor, int lstyle, int lwidth ); \-int Type ## _tAttLineDistancetoLine ( Type ## _p p, int px, int py, double xp1, double yp1, double xp2, double yp2 )+Type##_p Type##_newTAttLine ( short lcolor, short lstyle, short lwidth );\+int Type##_tAttLine_DistancetoLine ( Type##_p p, int px, int py, double xp1, double yp1, double xp2, double yp2 ); -#undef TATTLINE_DEF_VIRT-#define TATTLINE_DEF_VIRT(Type)\-int Type ## _GetLineColor ( Type ## _p p )\-{\-return TYPECASTMETHOD(Type,GetLineColor,TAttLine)(p)->GetLineColor();\++#define TATTLINE_DECL_ACCESSOR(Type) \++++#define TATTLINE_DEF_VIRT(Type) \+short Type##_GetLineColor ( Type##_p p ) {\+return ((TYPECASTMETHOD(Type, GetLineColor, TAttLine))(p))->GetLineColor();\ }\-int Type ## _GetLineStyle ( Type ## _p p )\-{\-return TYPECASTMETHOD(Type,GetLineStyle,TAttLine)(p)->GetLineStyle();\+\+short Type##_GetLineStyle ( Type##_p p ) {\+return ((TYPECASTMETHOD(Type, GetLineStyle, TAttLine))(p))->GetLineStyle();\ }\-int Type ## _GetLineWidth ( Type ## _p p )\-{\-return TYPECASTMETHOD(Type,GetLineWidth,TAttLine)(p)->GetLineWidth();\+\+short Type##_GetLineWidth ( Type##_p p ) {\+return ((TYPECASTMETHOD(Type, GetLineWidth, TAttLine))(p))->GetLineWidth();\ }\-void Type ## _ResetAttLine ( Type ## _p p, const char* option )\-{\-TYPECASTMETHOD(Type,ResetAttLine,TAttLine)(p)->ResetAttLine(option);\+\+void Type##_ResetAttLine ( Type##_p p, const char* option ) {\+((TYPECASTMETHOD(Type, ResetAttLine, TAttLine))(p))->ResetAttLine(option);\ }\-void Type ## _SetLineAttributes ( Type ## _p p )\-{\-TYPECASTMETHOD(Type,SetLineAttributes,TAttLine)(p)->SetLineAttributes();\+\+void Type##_SetLineAttributes ( Type##_p p ) {\+((TYPECASTMETHOD(Type, SetLineAttributes, TAttLine))(p))->SetLineAttributes();\ }\-void Type ## _SetLineColor ( Type ## _p p, int lcolor )\-{\-TYPECASTMETHOD(Type,SetLineColor,TAttLine)(p)->SetLineColor(lcolor);\+\+void Type##_SetLineColor ( Type##_p p, short lcolor ) {\+((TYPECASTMETHOD(Type, SetLineColor, TAttLine))(p))->SetLineColor(lcolor);\ }\-void Type ## _SetLineStyle ( Type ## _p p, int lstyle )\-{\-TYPECASTMETHOD(Type,SetLineStyle,TAttLine)(p)->SetLineStyle(lstyle);\+\+void Type##_SetLineStyle ( Type##_p p, short lstyle ) {\+((TYPECASTMETHOD(Type, SetLineStyle, TAttLine))(p))->SetLineStyle(lstyle);\ }\-void Type ## _SetLineWidth ( Type ## _p p, int lwidth )\-{\-TYPECASTMETHOD(Type,SetLineWidth,TAttLine)(p)->SetLineWidth(lwidth);\+\+void Type##_SetLineWidth ( Type##_p p, short lwidth ) {\+((TYPECASTMETHOD(Type, SetLineWidth, TAttLine))(p))->SetLineWidth(lwidth);\ } -#undef TATTLINE_DEF_NONVIRT-#define TATTLINE_DEF_NONVIRT(Type)\-Type ## _p Type ## _newTAttLine ( int lcolor, int lstyle, int lwidth )\-{\-Type * newp = new Type (lcolor, lstyle, lwidth); \-return to_nonconst<Type ## _t, Type >(newp);\++#define TATTLINE_DEF_NONVIRT(Type) \+Type##_p Type##_newTAttLine ( short lcolor, short lstyle, short lwidth ) {\+Type* newp=new Type(lcolor, lstyle, lwidth);return from_nonconst_to_nonconst<Type##_t, Type>(newp);\ }\-int Type ## _tAttLineDistancetoLine ( Type ## _p p, int px, int py, double xp1, double yp1, double xp2, double yp2 )\-{\-return TYPECASTMETHOD(Type,tAttLineDistancetoLine,TAttLine)(p)->DistancetoLine(px, py, xp1, yp1, xp2, yp2);\+\+int Type##_tAttLine_DistancetoLine ( Type##_p p, int px, int py, double xp1, double yp1, double xp2, double yp2 ) {\+return ((TYPECASTMETHOD(Type, tAttLine_DistancetoLine, TAttLine))(p))->DistancetoLine(px, py, xp1, yp1, xp2, yp2);\ } -DELETABLE_DECL_VIRT(TAttLine); +#define TATTLINE_DEF_ACCESSOR(Type) \ -TATTLINE_DECL_VIRT(TAttLine); -TATTLINE_DECL_NONVIRT(TAttLine);---#endif // __HROOT_CORE__TAttLine__+DELETABLE_DECL_VIRT(TAttLine)+TATTLINE_DECL_VIRT(TAttLine)+TATTLINE_DECL_NONVIRT(TAttLine)+TATTLINE_DECL_ACCESSOR(TAttLine) #ifdef __cplusplus }
csrc/HROOTCoreTAttMarker.cpp view
@@ -1,21 +1,23 @@-#include <MacroPatternMatch.h>-#include "HROOTCoreDeletable.h"++#include "MacroPatternMatch.h"++#include "STDDeletable.h"+ #include "TAttMarker.h"-#include "HROOTCoreTAttMarker.h" +#include "HROOTCoreTAttMarker.h" +using namespace ROOT; -#define CHECKPROTECT(x,y) IS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED)+#define CHECKPROTECT(x,y) FXIS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED) #define TYPECASTMETHOD(cname,mname,oname) \- IIF( CHECKPROTECT(cname,mname) ) ( \- (to_nonconst<oname,cname ## _t>), \- (to_nonconst<cname,cname ## _t>) )-+ FXIIF( CHECKPROTECT(cname,mname) ) ( \+ (from_nonconst_to_nonconst<oname,cname ## _t>), \+ (from_nonconst_to_nonconst<cname,cname ## _t>) ) DELETABLE_DEF_VIRT(TAttMarker)- TATTMARKER_DEF_VIRT(TAttMarker)- TATTMARKER_DEF_NONVIRT(TAttMarker)+TATTMARKER_DEF_ACCESSOR(TAttMarker)
csrc/HROOTCoreTAttMarker.h view
@@ -1,81 +1,85 @@+ #ifdef __cplusplus-extern "C" { +extern "C" { #endif -#ifndef __HROOT_CORE__TAttMarker__-#define __HROOT_CORE__TAttMarker__+#pragma once + #include "HROOT-coreType.h"-#include "HROOTCoreDeletable.h" -#undef TATTMARKER_DECL_VIRT +#include "STDDeletable.h"++#include "stdcxxType.h"++ #define TATTMARKER_DECL_VIRT(Type) \-int Type ## _GetMarkerColor ( Type ## _p p ); \-int Type ## _GetMarkerStyle ( Type ## _p p ); \-double Type ## _GetMarkerSize ( Type ## _p p ); \-void Type ## _ResetAttMarker ( Type ## _p p, const char* option ); \-void Type ## _SetMarkerAttributes ( Type ## _p p ); \-void Type ## _SetMarkerColor ( Type ## _p p, int tcolor ); \-void Type ## _SetMarkerStyle ( Type ## _p p, int mstyle ); \-void Type ## _SetMarkerSize ( Type ## _p p, int msize )+short Type##_GetMarkerColor ( Type##_p p );\+short Type##_GetMarkerStyle ( Type##_p p );\+float Type##_GetMarkerSize ( Type##_p p );\+void Type##_ResetAttMarker ( Type##_p p, const char* option );\+void Type##_SetMarkerAttributes ( Type##_p p );\+void Type##_SetMarkerColor ( Type##_p p, short tcolor );\+void Type##_SetMarkerStyle ( Type##_p p, short mstyle );\+void Type##_SetMarkerSize ( Type##_p p, short msize ); -#undef TATTMARKER_DECL_NONVIRT + #define TATTMARKER_DECL_NONVIRT(Type) \-Type ## _p Type ## _newTAttMarker ( int color, int style, int msize )+Type##_p Type##_newTAttMarker ( short color, short style, short msize ); -#undef TATTMARKER_DEF_VIRT-#define TATTMARKER_DEF_VIRT(Type)\-int Type ## _GetMarkerColor ( Type ## _p p )\-{\-return TYPECASTMETHOD(Type,GetMarkerColor,TAttMarker)(p)->GetMarkerColor();\++#define TATTMARKER_DECL_ACCESSOR(Type) \++++#define TATTMARKER_DEF_VIRT(Type) \+short Type##_GetMarkerColor ( Type##_p p ) {\+return ((TYPECASTMETHOD(Type, GetMarkerColor, TAttMarker))(p))->GetMarkerColor();\ }\-int Type ## _GetMarkerStyle ( Type ## _p p )\-{\-return TYPECASTMETHOD(Type,GetMarkerStyle,TAttMarker)(p)->GetMarkerStyle();\+\+short Type##_GetMarkerStyle ( Type##_p p ) {\+return ((TYPECASTMETHOD(Type, GetMarkerStyle, TAttMarker))(p))->GetMarkerStyle();\ }\-double Type ## _GetMarkerSize ( Type ## _p p )\-{\-return TYPECASTMETHOD(Type,GetMarkerSize,TAttMarker)(p)->GetMarkerSize();\+\+float Type##_GetMarkerSize ( Type##_p p ) {\+return ((TYPECASTMETHOD(Type, GetMarkerSize, TAttMarker))(p))->GetMarkerSize();\ }\-void Type ## _ResetAttMarker ( Type ## _p p, const char* option )\-{\-TYPECASTMETHOD(Type,ResetAttMarker,TAttMarker)(p)->ResetAttMarker(option);\+\+void Type##_ResetAttMarker ( Type##_p p, const char* option ) {\+((TYPECASTMETHOD(Type, ResetAttMarker, TAttMarker))(p))->ResetAttMarker(option);\ }\-void Type ## _SetMarkerAttributes ( Type ## _p p )\-{\-TYPECASTMETHOD(Type,SetMarkerAttributes,TAttMarker)(p)->SetMarkerAttributes();\+\+void Type##_SetMarkerAttributes ( Type##_p p ) {\+((TYPECASTMETHOD(Type, SetMarkerAttributes, TAttMarker))(p))->SetMarkerAttributes();\ }\-void Type ## _SetMarkerColor ( Type ## _p p, int tcolor )\-{\-TYPECASTMETHOD(Type,SetMarkerColor,TAttMarker)(p)->SetMarkerColor(tcolor);\+\+void Type##_SetMarkerColor ( Type##_p p, short tcolor ) {\+((TYPECASTMETHOD(Type, SetMarkerColor, TAttMarker))(p))->SetMarkerColor(tcolor);\ }\-void Type ## _SetMarkerStyle ( Type ## _p p, int mstyle )\-{\-TYPECASTMETHOD(Type,SetMarkerStyle,TAttMarker)(p)->SetMarkerStyle(mstyle);\+\+void Type##_SetMarkerStyle ( Type##_p p, short mstyle ) {\+((TYPECASTMETHOD(Type, SetMarkerStyle, TAttMarker))(p))->SetMarkerStyle(mstyle);\ }\-void Type ## _SetMarkerSize ( Type ## _p p, int msize )\-{\-TYPECASTMETHOD(Type,SetMarkerSize,TAttMarker)(p)->SetMarkerSize(msize);\+\+void Type##_SetMarkerSize ( Type##_p p, short msize ) {\+((TYPECASTMETHOD(Type, SetMarkerSize, TAttMarker))(p))->SetMarkerSize(msize);\ } -#undef TATTMARKER_DEF_NONVIRT-#define TATTMARKER_DEF_NONVIRT(Type)\-Type ## _p Type ## _newTAttMarker ( int color, int style, int msize )\-{\-Type * newp = new Type (color, style, msize); \-return to_nonconst<Type ## _t, Type >(newp);\++#define TATTMARKER_DEF_NONVIRT(Type) \+Type##_p Type##_newTAttMarker ( short color, short style, short msize ) {\+Type* newp=new Type(color, style, msize);return from_nonconst_to_nonconst<Type##_t, Type>(newp);\ } -DELETABLE_DECL_VIRT(TAttMarker); +#define TATTMARKER_DEF_ACCESSOR(Type) \ -TATTMARKER_DECL_VIRT(TAttMarker); -TATTMARKER_DECL_NONVIRT(TAttMarker);---#endif // __HROOT_CORE__TAttMarker__+DELETABLE_DECL_VIRT(TAttMarker)+TATTMARKER_DECL_VIRT(TAttMarker)+TATTMARKER_DECL_NONVIRT(TAttMarker)+TATTMARKER_DECL_ACCESSOR(TAttMarker) #ifdef __cplusplus }
csrc/HROOTCoreTAttPad.cpp view
@@ -1,21 +1,23 @@-#include <MacroPatternMatch.h>-#include "HROOTCoreDeletable.h"++#include "MacroPatternMatch.h"++#include "STDDeletable.h"+ #include "TAttPad.h"-#include "HROOTCoreTAttPad.h" +#include "HROOTCoreTAttPad.h" +using namespace ROOT; -#define CHECKPROTECT(x,y) IS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED)+#define CHECKPROTECT(x,y) FXIS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED) #define TYPECASTMETHOD(cname,mname,oname) \- IIF( CHECKPROTECT(cname,mname) ) ( \- (to_nonconst<oname,cname ## _t>), \- (to_nonconst<cname,cname ## _t>) )-+ FXIIF( CHECKPROTECT(cname,mname) ) ( \+ (from_nonconst_to_nonconst<oname,cname ## _t>), \+ (from_nonconst_to_nonconst<cname,cname ## _t>) ) DELETABLE_DEF_VIRT(TAttPad)- TATTPAD_DEF_VIRT(TAttPad)- TATTPAD_DEF_NONVIRT(TAttPad)+TATTPAD_DEF_ACCESSOR(TAttPad)
csrc/HROOTCoreTAttPad.h view
@@ -1,221 +1,225 @@+ #ifdef __cplusplus-extern "C" { +extern "C" { #endif -#ifndef __HROOT_CORE__TAttPad__-#define __HROOT_CORE__TAttPad__+#pragma once + #include "HROOT-coreType.h"-#include "HROOTCoreDeletable.h" -#undef TATTPAD_DECL_VIRT +#include "STDDeletable.h"++#include "stdcxxType.h"++ #define TATTPAD_DECL_VIRT(Type) \-void Type ## _ResetAttPad ( Type ## _p p, const char* option ); \-void Type ## _SetBottomMargin ( Type ## _p p, double bottommargin ); \-void Type ## _SetLeftMargin ( Type ## _p p, double leftmargin ); \-void Type ## _SetRightMargin ( Type ## _p p, double rightmargin ); \-void Type ## _SetTopMargin ( Type ## _p p, double topmargin ); \-void Type ## _SetMargin ( Type ## _p p, double left, double right, double bottom, double top ); \-void Type ## _SetAfile ( Type ## _p p, double afile ); \-void Type ## _SetXfile ( Type ## _p p, double xfile ); \-void Type ## _SetYfile ( Type ## _p p, double yfile ); \-void Type ## _SetAstat ( Type ## _p p, double astat ); \-void Type ## _SetXstat ( Type ## _p p, double xstat ); \-void Type ## _SetYstat ( Type ## _p p, double ystat )+void Type##_ResetAttPad ( Type##_p p, const char* option );\+void Type##_SetBottomMargin ( Type##_p p, float bottommargin );\+void Type##_SetLeftMargin ( Type##_p p, float leftmargin );\+void Type##_SetRightMargin ( Type##_p p, float rightmargin );\+void Type##_SetTopMargin ( Type##_p p, float topmargin );\+void Type##_SetMargin ( Type##_p p, float left, float right, float bottom, float top );\+void Type##_SetAfile ( Type##_p p, float afile );\+void Type##_SetXfile ( Type##_p p, float xfile );\+void Type##_SetYfile ( Type##_p p, float yfile );\+void Type##_SetAstat ( Type##_p p, float astat );\+void Type##_SetXstat ( Type##_p p, float xstat );\+void Type##_SetYstat ( Type##_p p, float ystat ); -#undef TATTPAD_DECL_NONVIRT + #define TATTPAD_DECL_NONVIRT(Type) \-Type ## _p Type ## _newTAttPad ( ); \-double Type ## _tAttPadGetBottomMargin ( Type ## _p p ); \-double Type ## _tAttPadGetLeftMargin ( Type ## _p p ); \-double Type ## _tAttPadGetRightMargin ( Type ## _p p ); \-double Type ## _tAttPadGetTopMargin ( Type ## _p p ); \-double Type ## _tAttPadGetAfile ( Type ## _p p ); \-double Type ## _tAttPadGetXfile ( Type ## _p p ); \-double Type ## _tAttPadGetYfile ( Type ## _p p ); \-double Type ## _tAttPadGetAstat ( Type ## _p p ); \-double Type ## _tAttPadGetXstat ( Type ## _p p ); \-double Type ## _tAttPadGetYstat ( Type ## _p p ); \-int Type ## _tAttPadGetFrameFillColor ( Type ## _p p ); \-int Type ## _tAttPadGetFrameLineColor ( Type ## _p p ); \-int Type ## _tAttPadGetFrameFillStyle ( Type ## _p p ); \-int Type ## _tAttPadGetFrameLineStyle ( Type ## _p p ); \-int Type ## _tAttPadGetFrameLineWidth ( Type ## _p p ); \-int Type ## _tAttPadGetFrameBorderSize ( Type ## _p p ); \-int Type ## _tAttPadGetFrameBorderMode ( Type ## _p p ); \-void Type ## _tAttPadSetFrameFillColor ( Type ## _p p, int color ); \-void Type ## _tAttPadSetFrameLineColor ( Type ## _p p, int color ); \-void Type ## _tAttPadSetFrameFillStyle ( Type ## _p p, int styl ); \-void Type ## _tAttPadSetFrameLineStyle ( Type ## _p p, int styl ); \-void Type ## _tAttPadSetFrameLineWidth ( Type ## _p p, int width ); \-void Type ## _tAttPadSetFrameBorderSize ( Type ## _p p, int size ); \-void Type ## _tAttPadSetFrameBorderMode ( Type ## _p p, int mode )+Type##_p Type##_newTAttPad ( );\+float Type##_tAttPad_GetBottomMargin ( Type##_p p );\+float Type##_tAttPad_GetLeftMargin ( Type##_p p );\+float Type##_tAttPad_GetRightMargin ( Type##_p p );\+float Type##_tAttPad_GetTopMargin ( Type##_p p );\+float Type##_tAttPad_GetAfile ( Type##_p p );\+float Type##_tAttPad_GetXfile ( Type##_p p );\+float Type##_tAttPad_GetYfile ( Type##_p p );\+float Type##_tAttPad_GetAstat ( Type##_p p );\+float Type##_tAttPad_GetXstat ( Type##_p p );\+float Type##_tAttPad_GetYstat ( Type##_p p );\+short Type##_tAttPad_GetFrameFillColor ( Type##_p p );\+short Type##_tAttPad_GetFrameLineColor ( Type##_p p );\+short Type##_tAttPad_GetFrameFillStyle ( Type##_p p );\+short Type##_tAttPad_GetFrameLineStyle ( Type##_p p );\+short Type##_tAttPad_GetFrameLineWidth ( Type##_p p );\+short Type##_tAttPad_GetFrameBorderSize ( Type##_p p );\+short Type##_tAttPad_GetFrameBorderMode ( Type##_p p );\+void Type##_tAttPad_SetFrameFillColor ( Type##_p p, short color );\+void Type##_tAttPad_SetFrameLineColor ( Type##_p p, short color );\+void Type##_tAttPad_SetFrameFillStyle ( Type##_p p, short styl );\+void Type##_tAttPad_SetFrameLineStyle ( Type##_p p, short styl );\+void Type##_tAttPad_SetFrameLineWidth ( Type##_p p, short width );\+void Type##_tAttPad_SetFrameBorderSize ( Type##_p p, short size );\+void Type##_tAttPad_SetFrameBorderMode ( Type##_p p, int mode ); -#undef TATTPAD_DEF_VIRT-#define TATTPAD_DEF_VIRT(Type)\-void Type ## _ResetAttPad ( Type ## _p p, const char* option )\-{\-TYPECASTMETHOD(Type,ResetAttPad,TAttPad)(p)->ResetAttPad(option);\++#define TATTPAD_DECL_ACCESSOR(Type) \++++#define TATTPAD_DEF_VIRT(Type) \+void Type##_ResetAttPad ( Type##_p p, const char* option ) {\+((TYPECASTMETHOD(Type, ResetAttPad, TAttPad))(p))->ResetAttPad(option);\ }\-void Type ## _SetBottomMargin ( Type ## _p p, double bottommargin )\-{\-TYPECASTMETHOD(Type,SetBottomMargin,TAttPad)(p)->SetBottomMargin(bottommargin);\+\+void Type##_SetBottomMargin ( Type##_p p, float bottommargin ) {\+((TYPECASTMETHOD(Type, SetBottomMargin, TAttPad))(p))->SetBottomMargin(bottommargin);\ }\-void Type ## _SetLeftMargin ( Type ## _p p, double leftmargin )\-{\-TYPECASTMETHOD(Type,SetLeftMargin,TAttPad)(p)->SetLeftMargin(leftmargin);\+\+void Type##_SetLeftMargin ( Type##_p p, float leftmargin ) {\+((TYPECASTMETHOD(Type, SetLeftMargin, TAttPad))(p))->SetLeftMargin(leftmargin);\ }\-void Type ## _SetRightMargin ( Type ## _p p, double rightmargin )\-{\-TYPECASTMETHOD(Type,SetRightMargin,TAttPad)(p)->SetRightMargin(rightmargin);\+\+void Type##_SetRightMargin ( Type##_p p, float rightmargin ) {\+((TYPECASTMETHOD(Type, SetRightMargin, TAttPad))(p))->SetRightMargin(rightmargin);\ }\-void Type ## _SetTopMargin ( Type ## _p p, double topmargin )\-{\-TYPECASTMETHOD(Type,SetTopMargin,TAttPad)(p)->SetTopMargin(topmargin);\+\+void Type##_SetTopMargin ( Type##_p p, float topmargin ) {\+((TYPECASTMETHOD(Type, SetTopMargin, TAttPad))(p))->SetTopMargin(topmargin);\ }\-void Type ## _SetMargin ( Type ## _p p, double left, double right, double bottom, double top )\-{\-TYPECASTMETHOD(Type,SetMargin,TAttPad)(p)->SetMargin(left, right, bottom, top);\+\+void Type##_SetMargin ( Type##_p p, float left, float right, float bottom, float top ) {\+((TYPECASTMETHOD(Type, SetMargin, TAttPad))(p))->SetMargin(left, right, bottom, top);\ }\-void Type ## _SetAfile ( Type ## _p p, double afile )\-{\-TYPECASTMETHOD(Type,SetAfile,TAttPad)(p)->SetAfile(afile);\+\+void Type##_SetAfile ( Type##_p p, float afile ) {\+((TYPECASTMETHOD(Type, SetAfile, TAttPad))(p))->SetAfile(afile);\ }\-void Type ## _SetXfile ( Type ## _p p, double xfile )\-{\-TYPECASTMETHOD(Type,SetXfile,TAttPad)(p)->SetXfile(xfile);\+\+void Type##_SetXfile ( Type##_p p, float xfile ) {\+((TYPECASTMETHOD(Type, SetXfile, TAttPad))(p))->SetXfile(xfile);\ }\-void Type ## _SetYfile ( Type ## _p p, double yfile )\-{\-TYPECASTMETHOD(Type,SetYfile,TAttPad)(p)->SetYfile(yfile);\+\+void Type##_SetYfile ( Type##_p p, float yfile ) {\+((TYPECASTMETHOD(Type, SetYfile, TAttPad))(p))->SetYfile(yfile);\ }\-void Type ## _SetAstat ( Type ## _p p, double astat )\-{\-TYPECASTMETHOD(Type,SetAstat,TAttPad)(p)->SetAstat(astat);\+\+void Type##_SetAstat ( Type##_p p, float astat ) {\+((TYPECASTMETHOD(Type, SetAstat, TAttPad))(p))->SetAstat(astat);\ }\-void Type ## _SetXstat ( Type ## _p p, double xstat )\-{\-TYPECASTMETHOD(Type,SetXstat,TAttPad)(p)->SetXstat(xstat);\+\+void Type##_SetXstat ( Type##_p p, float xstat ) {\+((TYPECASTMETHOD(Type, SetXstat, TAttPad))(p))->SetXstat(xstat);\ }\-void Type ## _SetYstat ( Type ## _p p, double ystat )\-{\-TYPECASTMETHOD(Type,SetYstat,TAttPad)(p)->SetYstat(ystat);\+\+void Type##_SetYstat ( Type##_p p, float ystat ) {\+((TYPECASTMETHOD(Type, SetYstat, TAttPad))(p))->SetYstat(ystat);\ } -#undef TATTPAD_DEF_NONVIRT-#define TATTPAD_DEF_NONVIRT(Type)\-Type ## _p Type ## _newTAttPad ( )\-{\-Type * newp = new Type (); \-return to_nonconst<Type ## _t, Type >(newp);\++#define TATTPAD_DEF_NONVIRT(Type) \+Type##_p Type##_newTAttPad ( ) {\+Type* newp=new Type();return from_nonconst_to_nonconst<Type##_t, Type>(newp);\ }\-double Type ## _tAttPadGetBottomMargin ( Type ## _p p )\-{\-return TYPECASTMETHOD(Type,tAttPadGetBottomMargin,TAttPad)(p)->GetBottomMargin();\+\+float Type##_tAttPad_GetBottomMargin ( Type##_p p ) {\+return ((TYPECASTMETHOD(Type, tAttPad_GetBottomMargin, TAttPad))(p))->GetBottomMargin();\ }\-double Type ## _tAttPadGetLeftMargin ( Type ## _p p )\-{\-return TYPECASTMETHOD(Type,tAttPadGetLeftMargin,TAttPad)(p)->GetLeftMargin();\+\+float Type##_tAttPad_GetLeftMargin ( Type##_p p ) {\+return ((TYPECASTMETHOD(Type, tAttPad_GetLeftMargin, TAttPad))(p))->GetLeftMargin();\ }\-double Type ## _tAttPadGetRightMargin ( Type ## _p p )\-{\-return TYPECASTMETHOD(Type,tAttPadGetRightMargin,TAttPad)(p)->GetRightMargin();\+\+float Type##_tAttPad_GetRightMargin ( Type##_p p ) {\+return ((TYPECASTMETHOD(Type, tAttPad_GetRightMargin, TAttPad))(p))->GetRightMargin();\ }\-double Type ## _tAttPadGetTopMargin ( Type ## _p p )\-{\-return TYPECASTMETHOD(Type,tAttPadGetTopMargin,TAttPad)(p)->GetTopMargin();\+\+float Type##_tAttPad_GetTopMargin ( Type##_p p ) {\+return ((TYPECASTMETHOD(Type, tAttPad_GetTopMargin, TAttPad))(p))->GetTopMargin();\ }\-double Type ## _tAttPadGetAfile ( Type ## _p p )\-{\-return TYPECASTMETHOD(Type,tAttPadGetAfile,TAttPad)(p)->GetAfile();\+\+float Type##_tAttPad_GetAfile ( Type##_p p ) {\+return ((TYPECASTMETHOD(Type, tAttPad_GetAfile, TAttPad))(p))->GetAfile();\ }\-double Type ## _tAttPadGetXfile ( Type ## _p p )\-{\-return TYPECASTMETHOD(Type,tAttPadGetXfile,TAttPad)(p)->GetXfile();\+\+float Type##_tAttPad_GetXfile ( Type##_p p ) {\+return ((TYPECASTMETHOD(Type, tAttPad_GetXfile, TAttPad))(p))->GetXfile();\ }\-double Type ## _tAttPadGetYfile ( Type ## _p p )\-{\-return TYPECASTMETHOD(Type,tAttPadGetYfile,TAttPad)(p)->GetYfile();\+\+float Type##_tAttPad_GetYfile ( Type##_p p ) {\+return ((TYPECASTMETHOD(Type, tAttPad_GetYfile, TAttPad))(p))->GetYfile();\ }\-double Type ## _tAttPadGetAstat ( Type ## _p p )\-{\-return TYPECASTMETHOD(Type,tAttPadGetAstat,TAttPad)(p)->GetAstat();\+\+float Type##_tAttPad_GetAstat ( Type##_p p ) {\+return ((TYPECASTMETHOD(Type, tAttPad_GetAstat, TAttPad))(p))->GetAstat();\ }\-double Type ## _tAttPadGetXstat ( Type ## _p p )\-{\-return TYPECASTMETHOD(Type,tAttPadGetXstat,TAttPad)(p)->GetXstat();\+\+float Type##_tAttPad_GetXstat ( Type##_p p ) {\+return ((TYPECASTMETHOD(Type, tAttPad_GetXstat, TAttPad))(p))->GetXstat();\ }\-double Type ## _tAttPadGetYstat ( Type ## _p p )\-{\-return TYPECASTMETHOD(Type,tAttPadGetYstat,TAttPad)(p)->GetYstat();\+\+float Type##_tAttPad_GetYstat ( Type##_p p ) {\+return ((TYPECASTMETHOD(Type, tAttPad_GetYstat, TAttPad))(p))->GetYstat();\ }\-int Type ## _tAttPadGetFrameFillColor ( Type ## _p p )\-{\-return TYPECASTMETHOD(Type,tAttPadGetFrameFillColor,TAttPad)(p)->GetFrameFillColor();\+\+short Type##_tAttPad_GetFrameFillColor ( Type##_p p ) {\+return ((TYPECASTMETHOD(Type, tAttPad_GetFrameFillColor, TAttPad))(p))->GetFrameFillColor();\ }\-int Type ## _tAttPadGetFrameLineColor ( Type ## _p p )\-{\-return TYPECASTMETHOD(Type,tAttPadGetFrameLineColor,TAttPad)(p)->GetFrameLineColor();\+\+short Type##_tAttPad_GetFrameLineColor ( Type##_p p ) {\+return ((TYPECASTMETHOD(Type, tAttPad_GetFrameLineColor, TAttPad))(p))->GetFrameLineColor();\ }\-int Type ## _tAttPadGetFrameFillStyle ( Type ## _p p )\-{\-return TYPECASTMETHOD(Type,tAttPadGetFrameFillStyle,TAttPad)(p)->GetFrameFillStyle();\+\+short Type##_tAttPad_GetFrameFillStyle ( Type##_p p ) {\+return ((TYPECASTMETHOD(Type, tAttPad_GetFrameFillStyle, TAttPad))(p))->GetFrameFillStyle();\ }\-int Type ## _tAttPadGetFrameLineStyle ( Type ## _p p )\-{\-return TYPECASTMETHOD(Type,tAttPadGetFrameLineStyle,TAttPad)(p)->GetFrameLineStyle();\+\+short Type##_tAttPad_GetFrameLineStyle ( Type##_p p ) {\+return ((TYPECASTMETHOD(Type, tAttPad_GetFrameLineStyle, TAttPad))(p))->GetFrameLineStyle();\ }\-int Type ## _tAttPadGetFrameLineWidth ( Type ## _p p )\-{\-return TYPECASTMETHOD(Type,tAttPadGetFrameLineWidth,TAttPad)(p)->GetFrameLineWidth();\+\+short Type##_tAttPad_GetFrameLineWidth ( Type##_p p ) {\+return ((TYPECASTMETHOD(Type, tAttPad_GetFrameLineWidth, TAttPad))(p))->GetFrameLineWidth();\ }\-int Type ## _tAttPadGetFrameBorderSize ( Type ## _p p )\-{\-return TYPECASTMETHOD(Type,tAttPadGetFrameBorderSize,TAttPad)(p)->GetFrameBorderSize();\+\+short Type##_tAttPad_GetFrameBorderSize ( Type##_p p ) {\+return ((TYPECASTMETHOD(Type, tAttPad_GetFrameBorderSize, TAttPad))(p))->GetFrameBorderSize();\ }\-int Type ## _tAttPadGetFrameBorderMode ( Type ## _p p )\-{\-return TYPECASTMETHOD(Type,tAttPadGetFrameBorderMode,TAttPad)(p)->GetFrameBorderMode();\+\+short Type##_tAttPad_GetFrameBorderMode ( Type##_p p ) {\+return ((TYPECASTMETHOD(Type, tAttPad_GetFrameBorderMode, TAttPad))(p))->GetFrameBorderMode();\ }\-void Type ## _tAttPadSetFrameFillColor ( Type ## _p p, int color )\-{\-TYPECASTMETHOD(Type,tAttPadSetFrameFillColor,TAttPad)(p)->SetFrameFillColor(color);\+\+void Type##_tAttPad_SetFrameFillColor ( Type##_p p, short color ) {\+((TYPECASTMETHOD(Type, tAttPad_SetFrameFillColor, TAttPad))(p))->SetFrameFillColor(color);\ }\-void Type ## _tAttPadSetFrameLineColor ( Type ## _p p, int color )\-{\-TYPECASTMETHOD(Type,tAttPadSetFrameLineColor,TAttPad)(p)->SetFrameLineColor(color);\+\+void Type##_tAttPad_SetFrameLineColor ( Type##_p p, short color ) {\+((TYPECASTMETHOD(Type, tAttPad_SetFrameLineColor, TAttPad))(p))->SetFrameLineColor(color);\ }\-void Type ## _tAttPadSetFrameFillStyle ( Type ## _p p, int styl )\-{\-TYPECASTMETHOD(Type,tAttPadSetFrameFillStyle,TAttPad)(p)->SetFrameFillStyle(styl);\+\+void Type##_tAttPad_SetFrameFillStyle ( Type##_p p, short styl ) {\+((TYPECASTMETHOD(Type, tAttPad_SetFrameFillStyle, TAttPad))(p))->SetFrameFillStyle(styl);\ }\-void Type ## _tAttPadSetFrameLineStyle ( Type ## _p p, int styl )\-{\-TYPECASTMETHOD(Type,tAttPadSetFrameLineStyle,TAttPad)(p)->SetFrameLineStyle(styl);\+\+void Type##_tAttPad_SetFrameLineStyle ( Type##_p p, short styl ) {\+((TYPECASTMETHOD(Type, tAttPad_SetFrameLineStyle, TAttPad))(p))->SetFrameLineStyle(styl);\ }\-void Type ## _tAttPadSetFrameLineWidth ( Type ## _p p, int width )\-{\-TYPECASTMETHOD(Type,tAttPadSetFrameLineWidth,TAttPad)(p)->SetFrameLineWidth(width);\+\+void Type##_tAttPad_SetFrameLineWidth ( Type##_p p, short width ) {\+((TYPECASTMETHOD(Type, tAttPad_SetFrameLineWidth, TAttPad))(p))->SetFrameLineWidth(width);\ }\-void Type ## _tAttPadSetFrameBorderSize ( Type ## _p p, int size )\-{\-TYPECASTMETHOD(Type,tAttPadSetFrameBorderSize,TAttPad)(p)->SetFrameBorderSize(size);\+\+void Type##_tAttPad_SetFrameBorderSize ( Type##_p p, short size ) {\+((TYPECASTMETHOD(Type, tAttPad_SetFrameBorderSize, TAttPad))(p))->SetFrameBorderSize(size);\ }\-void Type ## _tAttPadSetFrameBorderMode ( Type ## _p p, int mode )\-{\-TYPECASTMETHOD(Type,tAttPadSetFrameBorderMode,TAttPad)(p)->SetFrameBorderMode(mode);\+\+void Type##_tAttPad_SetFrameBorderMode ( Type##_p p, int mode ) {\+((TYPECASTMETHOD(Type, tAttPad_SetFrameBorderMode, TAttPad))(p))->SetFrameBorderMode(mode);\ } -DELETABLE_DECL_VIRT(TAttPad); +#define TATTPAD_DEF_ACCESSOR(Type) \ -TATTPAD_DECL_VIRT(TAttPad); -TATTPAD_DECL_NONVIRT(TAttPad);---#endif // __HROOT_CORE__TAttPad__+DELETABLE_DECL_VIRT(TAttPad)+TATTPAD_DECL_VIRT(TAttPad)+TATTPAD_DECL_NONVIRT(TAttPad)+TATTPAD_DECL_ACCESSOR(TAttPad) #ifdef __cplusplus }
csrc/HROOTCoreTAttText.cpp view
@@ -1,21 +1,23 @@-#include <MacroPatternMatch.h>-#include "HROOTCoreDeletable.h"++#include "MacroPatternMatch.h"++#include "STDDeletable.h"+ #include "TAttText.h"-#include "HROOTCoreTAttText.h" +#include "HROOTCoreTAttText.h" +using namespace ROOT; -#define CHECKPROTECT(x,y) IS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED)+#define CHECKPROTECT(x,y) FXIS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED) #define TYPECASTMETHOD(cname,mname,oname) \- IIF( CHECKPROTECT(cname,mname) ) ( \- (to_nonconst<oname,cname ## _t>), \- (to_nonconst<cname,cname ## _t>) )-+ FXIIF( CHECKPROTECT(cname,mname) ) ( \+ (from_nonconst_to_nonconst<oname,cname ## _t>), \+ (from_nonconst_to_nonconst<cname,cname ## _t>) ) DELETABLE_DEF_VIRT(TAttText)- TATTTEXT_DEF_VIRT(TAttText)- TATTTEXT_DEF_NONVIRT(TAttText)+TATTTEXT_DEF_ACCESSOR(TAttText)
csrc/HROOTCoreTAttText.h view
@@ -1,106 +1,110 @@+ #ifdef __cplusplus-extern "C" { +extern "C" { #endif -#ifndef __HROOT_CORE__TAttText__-#define __HROOT_CORE__TAttText__+#pragma once + #include "HROOT-coreType.h"-#include "HROOTCoreDeletable.h" -#undef TATTTEXT_DECL_VIRT +#include "STDDeletable.h"++#include "stdcxxType.h"++ #define TATTTEXT_DECL_VIRT(Type) \-int Type ## _GetTextAlign ( Type ## _p p ); \-double Type ## _GetTextAngle ( Type ## _p p ); \-int Type ## _GetTextColor ( Type ## _p p ); \-int Type ## _GetTextFont ( Type ## _p p ); \-double Type ## _GetTextSize ( Type ## _p p ); \-void Type ## _ResetAttText ( Type ## _p p, const char* toption ); \-void Type ## _SetTextAttributes ( Type ## _p p ); \-void Type ## _SetTextAlign ( Type ## _p p, int align ); \-void Type ## _SetTextAngle ( Type ## _p p, double tangle ); \-void Type ## _SetTextColor ( Type ## _p p, int tcolor ); \-void Type ## _SetTextFont ( Type ## _p p, int tfont ); \-void Type ## _SetTextSize ( Type ## _p p, double tsize ); \-void Type ## _SetTextSizePixels ( Type ## _p p, int npixels )+short Type##_GetTextAlign ( Type##_p p );\+float Type##_GetTextAngle ( Type##_p p );\+short Type##_GetTextColor ( Type##_p p );\+short Type##_GetTextFont ( Type##_p p );\+float Type##_GetTextSize ( Type##_p p );\+void Type##_ResetAttText ( Type##_p p, const char* toption );\+void Type##_SetTextAttributes ( Type##_p p );\+void Type##_SetTextAlign ( Type##_p p, short align );\+void Type##_SetTextAngle ( Type##_p p, float tangle );\+void Type##_SetTextColor ( Type##_p p, int tcolor );\+void Type##_SetTextFont ( Type##_p p, short tfont );\+void Type##_SetTextSize ( Type##_p p, float tsize );\+void Type##_SetTextSizePixels ( Type##_p p, int npixels ); -#undef TATTTEXT_DECL_NONVIRT + #define TATTTEXT_DECL_NONVIRT(Type) \-Type ## _p Type ## _newTAttText ( int align, double angle, int color, int font, double tsize )+Type##_p Type##_newTAttText ( int align, float angle, short color, short font, float tsize ); -#undef TATTTEXT_DEF_VIRT-#define TATTTEXT_DEF_VIRT(Type)\-int Type ## _GetTextAlign ( Type ## _p p )\-{\-return TYPECASTMETHOD(Type,GetTextAlign,TAttText)(p)->GetTextAlign();\++#define TATTTEXT_DECL_ACCESSOR(Type) \++++#define TATTTEXT_DEF_VIRT(Type) \+short Type##_GetTextAlign ( Type##_p p ) {\+return ((TYPECASTMETHOD(Type, GetTextAlign, TAttText))(p))->GetTextAlign();\ }\-double Type ## _GetTextAngle ( Type ## _p p )\-{\-return TYPECASTMETHOD(Type,GetTextAngle,TAttText)(p)->GetTextAngle();\+\+float Type##_GetTextAngle ( Type##_p p ) {\+return ((TYPECASTMETHOD(Type, GetTextAngle, TAttText))(p))->GetTextAngle();\ }\-int Type ## _GetTextColor ( Type ## _p p )\-{\-return TYPECASTMETHOD(Type,GetTextColor,TAttText)(p)->GetTextColor();\+\+short Type##_GetTextColor ( Type##_p p ) {\+return ((TYPECASTMETHOD(Type, GetTextColor, TAttText))(p))->GetTextColor();\ }\-int Type ## _GetTextFont ( Type ## _p p )\-{\-return TYPECASTMETHOD(Type,GetTextFont,TAttText)(p)->GetTextFont();\+\+short Type##_GetTextFont ( Type##_p p ) {\+return ((TYPECASTMETHOD(Type, GetTextFont, TAttText))(p))->GetTextFont();\ }\-double Type ## _GetTextSize ( Type ## _p p )\-{\-return TYPECASTMETHOD(Type,GetTextSize,TAttText)(p)->GetTextSize();\+\+float Type##_GetTextSize ( Type##_p p ) {\+return ((TYPECASTMETHOD(Type, GetTextSize, TAttText))(p))->GetTextSize();\ }\-void Type ## _ResetAttText ( Type ## _p p, const char* toption )\-{\-TYPECASTMETHOD(Type,ResetAttText,TAttText)(p)->ResetAttText(toption);\+\+void Type##_ResetAttText ( Type##_p p, const char* toption ) {\+((TYPECASTMETHOD(Type, ResetAttText, TAttText))(p))->ResetAttText(toption);\ }\-void Type ## _SetTextAttributes ( Type ## _p p )\-{\-TYPECASTMETHOD(Type,SetTextAttributes,TAttText)(p)->SetTextAttributes();\+\+void Type##_SetTextAttributes ( Type##_p p ) {\+((TYPECASTMETHOD(Type, SetTextAttributes, TAttText))(p))->SetTextAttributes();\ }\-void Type ## _SetTextAlign ( Type ## _p p, int align )\-{\-TYPECASTMETHOD(Type,SetTextAlign,TAttText)(p)->SetTextAlign(align);\+\+void Type##_SetTextAlign ( Type##_p p, short align ) {\+((TYPECASTMETHOD(Type, SetTextAlign, TAttText))(p))->SetTextAlign(align);\ }\-void Type ## _SetTextAngle ( Type ## _p p, double tangle )\-{\-TYPECASTMETHOD(Type,SetTextAngle,TAttText)(p)->SetTextAngle(tangle);\+\+void Type##_SetTextAngle ( Type##_p p, float tangle ) {\+((TYPECASTMETHOD(Type, SetTextAngle, TAttText))(p))->SetTextAngle(tangle);\ }\-void Type ## _SetTextColor ( Type ## _p p, int tcolor )\-{\-TYPECASTMETHOD(Type,SetTextColor,TAttText)(p)->SetTextColor(tcolor);\+\+void Type##_SetTextColor ( Type##_p p, int tcolor ) {\+((TYPECASTMETHOD(Type, SetTextColor, TAttText))(p))->SetTextColor(tcolor);\ }\-void Type ## _SetTextFont ( Type ## _p p, int tfont )\-{\-TYPECASTMETHOD(Type,SetTextFont,TAttText)(p)->SetTextFont(tfont);\+\+void Type##_SetTextFont ( Type##_p p, short tfont ) {\+((TYPECASTMETHOD(Type, SetTextFont, TAttText))(p))->SetTextFont(tfont);\ }\-void Type ## _SetTextSize ( Type ## _p p, double tsize )\-{\-TYPECASTMETHOD(Type,SetTextSize,TAttText)(p)->SetTextSize(tsize);\+\+void Type##_SetTextSize ( Type##_p p, float tsize ) {\+((TYPECASTMETHOD(Type, SetTextSize, TAttText))(p))->SetTextSize(tsize);\ }\-void Type ## _SetTextSizePixels ( Type ## _p p, int npixels )\-{\-TYPECASTMETHOD(Type,SetTextSizePixels,TAttText)(p)->SetTextSizePixels(npixels);\+\+void Type##_SetTextSizePixels ( Type##_p p, int npixels ) {\+((TYPECASTMETHOD(Type, SetTextSizePixels, TAttText))(p))->SetTextSizePixels(npixels);\ } -#undef TATTTEXT_DEF_NONVIRT-#define TATTTEXT_DEF_NONVIRT(Type)\-Type ## _p Type ## _newTAttText ( int align, double angle, int color, int font, double tsize )\-{\-Type * newp = new Type (align, angle, color, font, tsize); \-return to_nonconst<Type ## _t, Type >(newp);\++#define TATTTEXT_DEF_NONVIRT(Type) \+Type##_p Type##_newTAttText ( int align, float angle, short color, short font, float tsize ) {\+Type* newp=new Type(align, angle, color, font, tsize);return from_nonconst_to_nonconst<Type##_t, Type>(newp);\ } -DELETABLE_DECL_VIRT(TAttText); +#define TATTTEXT_DEF_ACCESSOR(Type) \ -TATTTEXT_DECL_VIRT(TAttText); -TATTTEXT_DECL_NONVIRT(TAttText);---#endif // __HROOT_CORE__TAttText__+DELETABLE_DECL_VIRT(TAttText)+TATTTEXT_DECL_VIRT(TAttText)+TATTTEXT_DECL_NONVIRT(TAttText)+TATTTEXT_DECL_ACCESSOR(TAttText) #ifdef __cplusplus }
csrc/HROOTCoreTClass.cpp view
@@ -1,24 +1,26 @@-#include <MacroPatternMatch.h>++#include "MacroPatternMatch.h"+ #include "HROOTCoreTDictionary.h"+ #include "TClass.h"-#include "HROOTCoreTClass.h" +#include "HROOTCoreTClass.h" +using namespace ROOT; -#define CHECKPROTECT(x,y) IS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED)+#define CHECKPROTECT(x,y) FXIS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED) #define TYPECASTMETHOD(cname,mname,oname) \- IIF( CHECKPROTECT(cname,mname) ) ( \- (to_nonconst<oname,cname ## _t>), \- (to_nonconst<cname,cname ## _t>) )-+ FXIIF( CHECKPROTECT(cname,mname) ) ( \+ (from_nonconst_to_nonconst<oname,cname ## _t>), \+ (from_nonconst_to_nonconst<cname,cname ## _t>) ) TDICTIONARY_DEF_VIRT(TClass) TNAMED_DEF_VIRT(TClass) TOBJECT_DEF_VIRT(TClass) DELETABLE_DEF_VIRT(TClass)- TCLASS_DEF_VIRT(TClass)- TCLASS_DEF_NONVIRT(TClass)+TCLASS_DEF_ACCESSOR(TClass)
csrc/HROOTCoreTClass.h view
@@ -1,45 +1,53 @@+ #ifdef __cplusplus-extern "C" { +extern "C" { #endif -#ifndef __HROOT_CORE__TClass__-#define __HROOT_CORE__TClass__+#pragma once + #include "HROOT-coreType.h"+ #include "HROOTCoreTDictionary.h"+ #include "HROOTCoreTNamed.h"+ #include "HROOTCoreTObject.h"-#include "HROOTCoreDeletable.h" -#undef TCLASS_DECL_VIRT +#include "STDDeletable.h"++ #define TCLASS_DECL_VIRT(Type) \ -#undef TCLASS_DECL_NONVIRT + #define TCLASS_DECL_NONVIRT(Type) \ -#undef TCLASS_DEF_VIRT-#define TCLASS_DEF_VIRT(Type)\ +#define TCLASS_DECL_ACCESSOR(Type) \ -#undef TCLASS_DEF_NONVIRT-#define TCLASS_DEF_NONVIRT(Type)\ -TDICTIONARY_DECL_VIRT(TClass);-TNAMED_DECL_VIRT(TClass);-TOBJECT_DECL_VIRT(TClass);-DELETABLE_DECL_VIRT(TClass);+#define TCLASS_DEF_VIRT(Type) \ -TCLASS_DECL_VIRT(TClass); +#define TCLASS_DEF_NONVIRT(Type) \ -TCLASS_DECL_NONVIRT(TClass); -#endif // __HROOT_CORE__TClass__+#define TCLASS_DEF_ACCESSOR(Type) \++++TDICTIONARY_DECL_VIRT(TClass)+TNAMED_DECL_VIRT(TClass)+TOBJECT_DECL_VIRT(TClass)+DELETABLE_DECL_VIRT(TClass)+TCLASS_DECL_VIRT(TClass)+TCLASS_DECL_NONVIRT(TClass)+TCLASS_DECL_ACCESSOR(TClass) #ifdef __cplusplus }
csrc/HROOTCoreTCollection.cpp view
@@ -1,22 +1,24 @@-#include <MacroPatternMatch.h>++#include "MacroPatternMatch.h"+ #include "HROOTCoreTObject.h"+ #include "TCollection.h"-#include "HROOTCoreTCollection.h" +#include "HROOTCoreTCollection.h" +using namespace ROOT; -#define CHECKPROTECT(x,y) IS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED)+#define CHECKPROTECT(x,y) FXIS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED) #define TYPECASTMETHOD(cname,mname,oname) \- IIF( CHECKPROTECT(cname,mname) ) ( \- (to_nonconst<oname,cname ## _t>), \- (to_nonconst<cname,cname ## _t>) )-+ FXIIF( CHECKPROTECT(cname,mname) ) ( \+ (from_nonconst_to_nonconst<oname,cname ## _t>), \+ (from_nonconst_to_nonconst<cname,cname ## _t>) ) TOBJECT_DEF_VIRT(TCollection) DELETABLE_DEF_VIRT(TCollection)- TCOLLECTION_DEF_VIRT(TCollection)- TCOLLECTION_DEF_NONVIRT(TCollection)+TCOLLECTION_DEF_ACCESSOR(TCollection)
csrc/HROOTCoreTCollection.h view
@@ -1,41 +1,47 @@+ #ifdef __cplusplus-extern "C" { +extern "C" { #endif -#ifndef __HROOT_CORE__TCollection__-#define __HROOT_CORE__TCollection__+#pragma once + #include "HROOT-coreType.h"+ #include "HROOTCoreTObject.h"-#include "HROOTCoreDeletable.h" -#undef TCOLLECTION_DECL_VIRT +#include "STDDeletable.h"++ #define TCOLLECTION_DECL_VIRT(Type) \ -#undef TCOLLECTION_DECL_NONVIRT + #define TCOLLECTION_DECL_NONVIRT(Type) \ -#undef TCOLLECTION_DEF_VIRT-#define TCOLLECTION_DEF_VIRT(Type)\ +#define TCOLLECTION_DECL_ACCESSOR(Type) \ -#undef TCOLLECTION_DEF_NONVIRT-#define TCOLLECTION_DEF_NONVIRT(Type)\ -TOBJECT_DECL_VIRT(TCollection);-DELETABLE_DECL_VIRT(TCollection);+#define TCOLLECTION_DEF_VIRT(Type) \ -TCOLLECTION_DECL_VIRT(TCollection); +#define TCOLLECTION_DEF_NONVIRT(Type) \ -TCOLLECTION_DECL_NONVIRT(TCollection); -#endif // __HROOT_CORE__TCollection__+#define TCOLLECTION_DEF_ACCESSOR(Type) \++++TOBJECT_DECL_VIRT(TCollection)+DELETABLE_DECL_VIRT(TCollection)+TCOLLECTION_DECL_VIRT(TCollection)+TCOLLECTION_DECL_NONVIRT(TCollection)+TCOLLECTION_DECL_ACCESSOR(TCollection) #ifdef __cplusplus }
+ csrc/HROOTCoreTColor.cpp view
@@ -0,0 +1,27 @@++#include "MacroPatternMatch.h"++#include "HROOTCoreTArrayI.h"++#include "HROOTCoreTNamed.h"++#include "TColor.h"++#include "HROOTCoreTColor.h"++using namespace ROOT;++#define CHECKPROTECT(x,y) FXIS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED)++#define TYPECASTMETHOD(cname,mname,oname) \+ FXIIF( CHECKPROTECT(cname,mname) ) ( \+ (from_nonconst_to_nonconst<oname,cname ## _t>), \+ (from_nonconst_to_nonconst<cname,cname ## _t>) )++TNAMED_DEF_VIRT(TColor)+TOBJECT_DEF_VIRT(TColor)+DELETABLE_DEF_VIRT(TColor)+TCOLOR_DEF_VIRT(TColor)+TCOLOR_DEF_NONVIRT(TColor)+TCOLOR_DEF_ACCESSOR(TColor)+
+ csrc/HROOTCoreTColor.h view
@@ -0,0 +1,64 @@++#ifdef __cplusplus+extern "C" {+#endif++#pragma once+++#include "HROOT-coreType.h"++#include "HROOTCoreTNamed.h"++#include "HROOTCoreTObject.h"++#include "STDDeletable.h"+++#define TCOLOR_DECL_VIRT(Type) \++++#define TCOLOR_DECL_NONVIRT(Type) \+Type##_p Type##_newTColor_ ( );\+Type##_p Type##_newTColor ( float r, float g, float b, float a );\+TArrayI_p Type##_tColor_GetPalette ( );+++#define TCOLOR_DECL_ACCESSOR(Type) \++++#define TCOLOR_DEF_VIRT(Type) \++++#define TCOLOR_DEF_NONVIRT(Type) \+Type##_p Type##_newTColor_ ( ) {\+Type* newp=new Type();return from_nonconst_to_nonconst<Type##_t, Type>(newp);\+}\+\+Type##_p Type##_newTColor ( float r, float g, float b, float a ) {\+Type* newp=new Type(r, g, b, a);return from_nonconst_to_nonconst<Type##_t, Type>(newp);\+}\+\+TArrayI_p Type##_tColor_GetPalette ( ) {\+return from_const_to_nonconst<TArrayI_t, TArrayI>(&(TColor::GetPalette()));\+}+++#define TCOLOR_DEF_ACCESSOR(Type) \++++TNAMED_DECL_VIRT(TColor)+TOBJECT_DECL_VIRT(TColor)+DELETABLE_DECL_VIRT(TColor)+TCOLOR_DECL_VIRT(TColor)+TCOLOR_DECL_NONVIRT(TColor)+TCOLOR_DECL_ACCESSOR(TColor)++#ifdef __cplusplus+}+#endif+
+ csrc/HROOTCoreTDatime.cpp view
@@ -0,0 +1,23 @@++#include "MacroPatternMatch.h"++#include "STDDeletable.h"++#include "TDatime.h"++#include "HROOTCoreTDatime.h"++using namespace ROOT;++#define CHECKPROTECT(x,y) FXIS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED)++#define TYPECASTMETHOD(cname,mname,oname) \+ FXIIF( CHECKPROTECT(cname,mname) ) ( \+ (from_nonconst_to_nonconst<oname,cname ## _t>), \+ (from_nonconst_to_nonconst<cname,cname ## _t>) )++DELETABLE_DEF_VIRT(TDatime)+TDATIME_DEF_VIRT(TDatime)+TDATIME_DEF_NONVIRT(TDatime)+TDATIME_DEF_ACCESSOR(TDatime)+
+ csrc/HROOTCoreTDatime.h view
@@ -0,0 +1,87 @@++#ifdef __cplusplus+extern "C" {+#endif++#pragma once+++#include "HROOT-coreType.h"++#include "STDDeletable.h"++#include "stdcxxType.h"+++#define TDATIME_DECL_VIRT(Type) \+unsigned int Type##_Convert ( Type##_p p, bool toGMT );\+void Type##_setTDatime ( Type##_p p, unsigned int tloc );+++#define TDATIME_DECL_NONVIRT(Type) \+Type##_p Type##_newTDatime ( int year, int month, int day, int hour, int min, int sec );\+int Type##_tDatime_GetDay ( Type##_p p );\+int Type##_tDatime_GetHour ( Type##_p p );\+int Type##_tDatime_GetMinute ( Type##_p p );\+int Type##_tDatime_GetSecond ( Type##_p p );\+int Type##_tDatime_GetYear ( Type##_p p );\+int Type##_tDatime_GetMonth ( Type##_p p );+++#define TDATIME_DECL_ACCESSOR(Type) \++++#define TDATIME_DEF_VIRT(Type) \+unsigned int Type##_Convert ( Type##_p p, bool toGMT ) {\+return ((TYPECASTMETHOD(Type, Convert, TDatime))(p))->Convert(toGMT);\+}\+\+void Type##_setTDatime ( Type##_p p, unsigned int tloc ) {\+((TYPECASTMETHOD(Type, setTDatime, TDatime))(p))->Set(tloc);\+}+++#define TDATIME_DEF_NONVIRT(Type) \+Type##_p Type##_newTDatime ( int year, int month, int day, int hour, int min, int sec ) {\+Type* newp=new Type(year, month, day, hour, min, sec);return from_nonconst_to_nonconst<Type##_t, Type>(newp);\+}\+\+int Type##_tDatime_GetDay ( Type##_p p ) {\+return ((TYPECASTMETHOD(Type, tDatime_GetDay, TDatime))(p))->GetDay();\+}\+\+int Type##_tDatime_GetHour ( Type##_p p ) {\+return ((TYPECASTMETHOD(Type, tDatime_GetHour, TDatime))(p))->GetHour();\+}\+\+int Type##_tDatime_GetMinute ( Type##_p p ) {\+return ((TYPECASTMETHOD(Type, tDatime_GetMinute, TDatime))(p))->GetMinute();\+}\+\+int Type##_tDatime_GetSecond ( Type##_p p ) {\+return ((TYPECASTMETHOD(Type, tDatime_GetSecond, TDatime))(p))->GetSecond();\+}\+\+int Type##_tDatime_GetYear ( Type##_p p ) {\+return ((TYPECASTMETHOD(Type, tDatime_GetYear, TDatime))(p))->GetYear();\+}\+\+int Type##_tDatime_GetMonth ( Type##_p p ) {\+return ((TYPECASTMETHOD(Type, tDatime_GetMonth, TDatime))(p))->GetMonth();\+}+++#define TDATIME_DEF_ACCESSOR(Type) \++++DELETABLE_DECL_VIRT(TDatime)+TDATIME_DECL_VIRT(TDatime)+TDATIME_DECL_NONVIRT(TDatime)+TDATIME_DECL_ACCESSOR(TDatime)++#ifdef __cplusplus+}+#endif+
csrc/HROOTCoreTDictionary.cpp view
@@ -1,21 +1,24 @@-#include <MacroPatternMatch.h>++#include "MacroPatternMatch.h"+ #include "HROOTCoreTNamed.h"+ #include "TDictionary.h"-#include "HROOTCoreTDictionary.h" +#include "HROOTCoreTDictionary.h" +using namespace ROOT; -#define CHECKPROTECT(x,y) IS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED)+#define CHECKPROTECT(x,y) FXIS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED) #define TYPECASTMETHOD(cname,mname,oname) \- IIF( CHECKPROTECT(cname,mname) ) ( \- (to_nonconst<oname,cname ## _t>), \- (to_nonconst<cname,cname ## _t>) )-+ FXIIF( CHECKPROTECT(cname,mname) ) ( \+ (from_nonconst_to_nonconst<oname,cname ## _t>), \+ (from_nonconst_to_nonconst<cname,cname ## _t>) ) TNAMED_DEF_VIRT(TDictionary) TOBJECT_DEF_VIRT(TDictionary) DELETABLE_DEF_VIRT(TDictionary)--+TDICTIONARY_DEF_NONVIRT(TDictionary)+TDICTIONARY_DEF_ACCESSOR(TDictionary)
csrc/HROOTCoreTDictionary.h view
@@ -1,43 +1,50 @@+ #ifdef __cplusplus-extern "C" { +extern "C" { #endif -#ifndef __HROOT_CORE__TDictionary__-#define __HROOT_CORE__TDictionary__+#pragma once + #include "HROOT-coreType.h"+ #include "HROOTCoreTNamed.h"+ #include "HROOTCoreTObject.h"-#include "HROOTCoreDeletable.h" -#undef TDICTIONARY_DECL_VIRT +#include "STDDeletable.h"++ #define TDICTIONARY_DECL_VIRT(Type) \ -#undef TDICTIONARY_DECL_NONVIRT + #define TDICTIONARY_DECL_NONVIRT(Type) \ -#undef TDICTIONARY_DEF_VIRT-#define TDICTIONARY_DEF_VIRT(Type)\ +#define TDICTIONARY_DECL_ACCESSOR(Type) \ -#undef TDICTIONARY_DEF_NONVIRT-#define TDICTIONARY_DEF_NONVIRT(Type)\ -TNAMED_DECL_VIRT(TDictionary);-TOBJECT_DECL_VIRT(TDictionary);-DELETABLE_DECL_VIRT(TDictionary);+#define TDICTIONARY_DEF_VIRT(Type) \ -TDICTIONARY_DECL_VIRT(TDictionary); +#define TDICTIONARY_DEF_NONVIRT(Type) \ -TDICTIONARY_DECL_NONVIRT(TDictionary); -#endif // __HROOT_CORE__TDictionary__+#define TDICTIONARY_DEF_ACCESSOR(Type) \++++TNAMED_DECL_VIRT(TDictionary)+TOBJECT_DECL_VIRT(TDictionary)+DELETABLE_DECL_VIRT(TDictionary)+TDICTIONARY_DECL_VIRT(TDictionary)+TDICTIONARY_DECL_NONVIRT(TDictionary)+TDICTIONARY_DECL_ACCESSOR(TDictionary) #ifdef __cplusplus }
csrc/HROOTCoreTDirectory.cpp view
@@ -1,25 +1,29 @@-#include <MacroPatternMatch.h>++#include "MacroPatternMatch.h"+ #include "HROOTCoreTObject.h"+ #include "HROOTCoreTKey.h"+ #include "HROOTCoreTNamed.h"+ #include "TDirectory.h"-#include "HROOTCoreTDirectory.h" +#include "HROOTCoreTDirectory.h" +using namespace ROOT; -#define CHECKPROTECT(x,y) IS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED)+#define CHECKPROTECT(x,y) FXIS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED) #define TYPECASTMETHOD(cname,mname,oname) \- IIF( CHECKPROTECT(cname,mname) ) ( \- (to_nonconst<oname,cname ## _t>), \- (to_nonconst<cname,cname ## _t>) )-+ FXIIF( CHECKPROTECT(cname,mname) ) ( \+ (from_nonconst_to_nonconst<oname,cname ## _t>), \+ (from_nonconst_to_nonconst<cname,cname ## _t>) ) TNAMED_DEF_VIRT(TDirectory) TOBJECT_DEF_VIRT(TDirectory) DELETABLE_DEF_VIRT(TDirectory)- TDIRECTORY_DEF_VIRT(TDirectory)- TDIRECTORY_DEF_NONVIRT(TDirectory)+TDIRECTORY_DEF_ACCESSOR(TDirectory)
csrc/HROOTCoreTDirectory.h view
@@ -1,79 +1,84 @@+ #ifdef __cplusplus-extern "C" { +extern "C" { #endif -#ifndef __HROOT_CORE__TDirectory__-#define __HROOT_CORE__TDirectory__+#pragma once + #include "HROOT-coreType.h"+ #include "HROOTCoreTNamed.h"+ #include "HROOTCoreTObject.h"-#include "HROOTCoreDeletable.h" -#undef TDIRECTORY_DECL_VIRT +#include "STDDeletable.h"++ #define TDIRECTORY_DECL_VIRT(Type) \-void Type ## _Append ( Type ## _p p, TObject_p obj, int replace ); \-void Type ## _addD ( Type ## _p p, TObject_p obj, int replace ); \-int Type ## _AppendKey ( Type ## _p p, TKey_p key ); \-void Type ## _Close ( Type ## _p p, const char* option ); \-TObject_p Type ## _Get ( Type ## _p p, const char* namecycle ); \-int Type ## _cd_TDirectory ( Type ## _p p, const char* path )+void Type##_Append ( Type##_p p, TObject_p obj, bool replace );\+void Type##_addD ( Type##_p p, TObject_p obj, bool replace );\+int Type##_AppendKey ( Type##_p p, TKey_p key );\+void Type##_Close ( Type##_p p, const char* option );\+TObject_p Type##_Get ( Type##_p p, const char* namecycle );\+bool Type##_cd_TDirectory ( Type##_p p, const char* path ); -#undef TDIRECTORY_DECL_NONVIRT + #define TDIRECTORY_DECL_NONVIRT(Type) \-void Type ## _tDirectoryAddDirectory ( int add ); \-int Type ## _tDirectoryAddDirectoryStatus ( )+void Type##_tDirectory_AddDirectory ( bool add );\+bool Type##_tDirectory_AddDirectoryStatus ( ); -#undef TDIRECTORY_DEF_VIRT-#define TDIRECTORY_DEF_VIRT(Type)\-void Type ## _Append ( Type ## _p p, TObject_p obj, int replace )\-{\-TYPECASTMETHOD(Type,Append,TDirectory)(p)->Append(to_nonconst<TObject,TObject_t>(obj), replace);\++#define TDIRECTORY_DECL_ACCESSOR(Type) \++++#define TDIRECTORY_DEF_VIRT(Type) \+void Type##_Append ( Type##_p p, TObject_p obj, bool replace ) {\+((TYPECASTMETHOD(Type, Append, TDirectory))(p))->Append(from_nonconst_to_nonconst<TObject, TObject_t>(obj), replace);\ }\-void Type ## _addD ( Type ## _p p, TObject_p obj, int replace )\-{\-TYPECASTMETHOD(Type,addD,TDirectory)(p)->Add(to_nonconst<TObject,TObject_t>(obj), replace);\+\+void Type##_addD ( Type##_p p, TObject_p obj, bool replace ) {\+((TYPECASTMETHOD(Type, addD, TDirectory))(p))->Add(from_nonconst_to_nonconst<TObject, TObject_t>(obj), replace);\ }\-int Type ## _AppendKey ( Type ## _p p, TKey_p key )\-{\-return TYPECASTMETHOD(Type,AppendKey,TDirectory)(p)->AppendKey(to_nonconst<TKey,TKey_t>(key));\+\+int Type##_AppendKey ( Type##_p p, TKey_p key ) {\+return ((TYPECASTMETHOD(Type, AppendKey, TDirectory))(p))->AppendKey(from_nonconst_to_nonconst<TKey, TKey_t>(key));\ }\-void Type ## _Close ( Type ## _p p, const char* option )\-{\-TYPECASTMETHOD(Type,Close,TDirectory)(p)->Close(option);\+\+void Type##_Close ( Type##_p p, const char* option ) {\+((TYPECASTMETHOD(Type, Close, TDirectory))(p))->Close(option);\ }\-TObject_p Type ## _Get ( Type ## _p p, const char* namecycle )\-{\-return to_nonconst<TObject_t,TObject>((TObject*)TYPECASTMETHOD(Type,Get,TDirectory)(p)->Get(namecycle));\+\+TObject_p Type##_Get ( Type##_p p, const char* namecycle ) {\+return from_nonconst_to_nonconst<TObject_t, TObject>((TObject*)((TYPECASTMETHOD(Type, Get, TDirectory))(p))->Get(namecycle));\ }\-int Type ## _cd_TDirectory ( Type ## _p p, const char* path )\-{\-return TYPECASTMETHOD(Type,cd_TDirectory,TDirectory)(p)->cd(path);\+\+bool Type##_cd_TDirectory ( Type##_p p, const char* path ) {\+return ((TYPECASTMETHOD(Type, cd_TDirectory, TDirectory))(p))->cd(path);\ } -#undef TDIRECTORY_DEF_NONVIRT-#define TDIRECTORY_DEF_NONVIRT(Type)\-void Type ## _tDirectoryAddDirectory ( int add )\-{\++#define TDIRECTORY_DEF_NONVIRT(Type) \+void Type##_tDirectory_AddDirectory ( bool add ) {\ TDirectory::AddDirectory(add);\ }\-int Type ## _tDirectoryAddDirectoryStatus ( )\-{\+\+bool Type##_tDirectory_AddDirectoryStatus ( ) {\ return TDirectory::AddDirectoryStatus();\ } -TNAMED_DECL_VIRT(TDirectory);-TOBJECT_DECL_VIRT(TDirectory);-DELETABLE_DECL_VIRT(TDirectory); +#define TDIRECTORY_DEF_ACCESSOR(Type) \ -TDIRECTORY_DECL_VIRT(TDirectory); -TDIRECTORY_DECL_NONVIRT(TDirectory);---#endif // __HROOT_CORE__TDirectory__+TNAMED_DECL_VIRT(TDirectory)+TOBJECT_DECL_VIRT(TDirectory)+DELETABLE_DECL_VIRT(TDirectory)+TDIRECTORY_DECL_VIRT(TDirectory)+TDIRECTORY_DECL_NONVIRT(TDirectory)+TDIRECTORY_DECL_ACCESSOR(TDirectory) #ifdef __cplusplus }
csrc/HROOTCoreTGlobal.cpp view
@@ -1,24 +1,26 @@-#include <MacroPatternMatch.h>++#include "MacroPatternMatch.h"+ #include "HROOTCoreTDictionary.h"+ #include "TGlobal.h"-#include "HROOTCoreTGlobal.h" +#include "HROOTCoreTGlobal.h" +using namespace ROOT; -#define CHECKPROTECT(x,y) IS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED)+#define CHECKPROTECT(x,y) FXIS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED) #define TYPECASTMETHOD(cname,mname,oname) \- IIF( CHECKPROTECT(cname,mname) ) ( \- (to_nonconst<oname,cname ## _t>), \- (to_nonconst<cname,cname ## _t>) )-+ FXIIF( CHECKPROTECT(cname,mname) ) ( \+ (from_nonconst_to_nonconst<oname,cname ## _t>), \+ (from_nonconst_to_nonconst<cname,cname ## _t>) ) TDICTIONARY_DEF_VIRT(TGlobal) TNAMED_DEF_VIRT(TGlobal) TOBJECT_DEF_VIRT(TGlobal) DELETABLE_DEF_VIRT(TGlobal)- TGLOBAL_DEF_VIRT(TGlobal)- TGLOBAL_DEF_NONVIRT(TGlobal)+TGLOBAL_DEF_ACCESSOR(TGlobal)
csrc/HROOTCoreTGlobal.h view
@@ -1,45 +1,53 @@+ #ifdef __cplusplus-extern "C" { +extern "C" { #endif -#ifndef __HROOT_CORE__TGlobal__-#define __HROOT_CORE__TGlobal__+#pragma once + #include "HROOT-coreType.h"+ #include "HROOTCoreTDictionary.h"+ #include "HROOTCoreTNamed.h"+ #include "HROOTCoreTObject.h"-#include "HROOTCoreDeletable.h" -#undef TGLOBAL_DECL_VIRT +#include "STDDeletable.h"++ #define TGLOBAL_DECL_VIRT(Type) \ -#undef TGLOBAL_DECL_NONVIRT + #define TGLOBAL_DECL_NONVIRT(Type) \ -#undef TGLOBAL_DEF_VIRT-#define TGLOBAL_DEF_VIRT(Type)\ +#define TGLOBAL_DECL_ACCESSOR(Type) \ -#undef TGLOBAL_DEF_NONVIRT-#define TGLOBAL_DEF_NONVIRT(Type)\ -TDICTIONARY_DECL_VIRT(TGlobal);-TNAMED_DECL_VIRT(TGlobal);-TOBJECT_DECL_VIRT(TGlobal);-DELETABLE_DECL_VIRT(TGlobal);+#define TGLOBAL_DEF_VIRT(Type) \ -TGLOBAL_DECL_VIRT(TGlobal); +#define TGLOBAL_DEF_NONVIRT(Type) \ -TGLOBAL_DECL_NONVIRT(TGlobal); -#endif // __HROOT_CORE__TGlobal__+#define TGLOBAL_DEF_ACCESSOR(Type) \++++TDICTIONARY_DECL_VIRT(TGlobal)+TNAMED_DECL_VIRT(TGlobal)+TOBJECT_DECL_VIRT(TGlobal)+DELETABLE_DECL_VIRT(TGlobal)+TGLOBAL_DECL_VIRT(TGlobal)+TGLOBAL_DECL_NONVIRT(TGlobal)+TGLOBAL_DECL_ACCESSOR(TGlobal) #ifdef __cplusplus }
csrc/HROOTCoreTKey.cpp view
@@ -1,25 +1,29 @@-#include <MacroPatternMatch.h>++#include "MacroPatternMatch.h"+ #include "HROOTCoreTClass.h"+ #include "HROOTCoreTDirectory.h"+ #include "HROOTCoreTNamed.h"+ #include "TKey.h"-#include "HROOTCoreTKey.h" +#include "HROOTCoreTKey.h" +using namespace ROOT; -#define CHECKPROTECT(x,y) IS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED)+#define CHECKPROTECT(x,y) FXIS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED) #define TYPECASTMETHOD(cname,mname,oname) \- IIF( CHECKPROTECT(cname,mname) ) ( \- (to_nonconst<oname,cname ## _t>), \- (to_nonconst<cname,cname ## _t>) )-+ FXIIF( CHECKPROTECT(cname,mname) ) ( \+ (from_nonconst_to_nonconst<oname,cname ## _t>), \+ (from_nonconst_to_nonconst<cname,cname ## _t>) ) TNAMED_DEF_VIRT(TKey) TOBJECT_DEF_VIRT(TKey) DELETABLE_DEF_VIRT(TKey)- TKEY_DEF_VIRT(TKey)- TKEY_DEF_NONVIRT(TKey)+TKEY_DEF_ACCESSOR(TKey)
csrc/HROOTCoreTKey.h view
@@ -1,47 +1,52 @@+ #ifdef __cplusplus-extern "C" { +extern "C" { #endif -#ifndef __HROOT_CORE__TKey__-#define __HROOT_CORE__TKey__+#pragma once + #include "HROOT-coreType.h"+ #include "HROOTCoreTNamed.h"+ #include "HROOTCoreTObject.h"-#include "HROOTCoreDeletable.h" -#undef TKEY_DECL_VIRT +#include "STDDeletable.h"++ #define TKEY_DECL_VIRT(Type) \ -#undef TKEY_DECL_NONVIRT + #define TKEY_DECL_NONVIRT(Type) \-Type ## _p Type ## _newTKey ( const char* name, const char* title, TClass_p cl, int nbytes, TDirectory_p motherDir )+Type##_p Type##_newTKey ( const char* name, const char* title, TClass_p cl, int nbytes, TDirectory_p motherDir ); -#undef TKEY_DEF_VIRT-#define TKEY_DEF_VIRT(Type)\ +#define TKEY_DECL_ACCESSOR(Type) \ -#undef TKEY_DEF_NONVIRT-#define TKEY_DEF_NONVIRT(Type)\-Type ## _p Type ## _newTKey ( const char* name, const char* title, TClass_p cl, int nbytes, TDirectory_p motherDir )\-{\-Type * newp = new Type (name, title, to_nonconst<TClass,TClass_t>(cl), nbytes, to_nonconst<TDirectory,TDirectory_t>(motherDir)); \-return to_nonconst<Type ## _t, Type >(newp);\-} -TNAMED_DECL_VIRT(TKey);-TOBJECT_DECL_VIRT(TKey);-DELETABLE_DECL_VIRT(TKey); +#define TKEY_DEF_VIRT(Type) \ -TKEY_DECL_VIRT(TKey); -TKEY_DECL_NONVIRT(TKey);+#define TKEY_DEF_NONVIRT(Type) \+Type##_p Type##_newTKey ( const char* name, const char* title, TClass_p cl, int nbytes, TDirectory_p motherDir ) {\+Type* newp=new Type(name, title, from_nonconst_to_nonconst<TClass, TClass_t>(cl), nbytes, from_nonconst_to_nonconst<TDirectory, TDirectory_t>(motherDir));return from_nonconst_to_nonconst<Type##_t, Type>(newp);\+} -#endif // __HROOT_CORE__TKey__+#define TKEY_DEF_ACCESSOR(Type) \++++TNAMED_DECL_VIRT(TKey)+TOBJECT_DECL_VIRT(TKey)+DELETABLE_DECL_VIRT(TKey)+TKEY_DECL_VIRT(TKey)+TKEY_DECL_NONVIRT(TKey)+TKEY_DECL_ACCESSOR(TKey) #ifdef __cplusplus }
+ csrc/HROOTCoreTMutex.cpp view
@@ -0,0 +1,24 @@++#include "MacroPatternMatch.h"++#include "HROOTCoreTVirtualMutex.h"++#include "TMutex.h"++#include "HROOTCoreTMutex.h"++using namespace ROOT;++#define CHECKPROTECT(x,y) FXIS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED)++#define TYPECASTMETHOD(cname,mname,oname) \+ FXIIF( CHECKPROTECT(cname,mname) ) ( \+ (from_nonconst_to_nonconst<oname,cname ## _t>), \+ (from_nonconst_to_nonconst<cname,cname ## _t>) )++TVIRTUALMUTEX_DEF_VIRT(TMutex)+DELETABLE_DEF_VIRT(TMutex)+TMUTEX_DEF_VIRT(TMutex)+TMUTEX_DEF_NONVIRT(TMutex)+TMUTEX_DEF_ACCESSOR(TMutex)+
+ csrc/HROOTCoreTMutex.h view
@@ -0,0 +1,51 @@++#ifdef __cplusplus+extern "C" {+#endif++#pragma once+++#include "HROOT-coreType.h"++#include "HROOTCoreTVirtualMutex.h"++#include "STDDeletable.h"+++#define TMUTEX_DECL_VIRT(Type) \++++#define TMUTEX_DECL_NONVIRT(Type) \+Type##_p Type##_newTMutex ( bool recursive );+++#define TMUTEX_DECL_ACCESSOR(Type) \++++#define TMUTEX_DEF_VIRT(Type) \++++#define TMUTEX_DEF_NONVIRT(Type) \+Type##_p Type##_newTMutex ( bool recursive ) {\+Type* newp=new Type(recursive);return from_nonconst_to_nonconst<Type##_t, Type>(newp);\+}+++#define TMUTEX_DEF_ACCESSOR(Type) \++++TVIRTUALMUTEX_DECL_VIRT(TMutex)+DELETABLE_DECL_VIRT(TMutex)+TMUTEX_DECL_VIRT(TMutex)+TMUTEX_DECL_NONVIRT(TMutex)+TMUTEX_DECL_ACCESSOR(TMutex)++#ifdef __cplusplus+}+#endif+
csrc/HROOTCoreTNamed.cpp view
@@ -1,22 +1,24 @@-#include <MacroPatternMatch.h>++#include "MacroPatternMatch.h"+ #include "HROOTCoreTObject.h"+ #include "TNamed.h"-#include "HROOTCoreTNamed.h" +#include "HROOTCoreTNamed.h" +using namespace ROOT; -#define CHECKPROTECT(x,y) IS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED)+#define CHECKPROTECT(x,y) FXIS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED) #define TYPECASTMETHOD(cname,mname,oname) \- IIF( CHECKPROTECT(cname,mname) ) ( \- (to_nonconst<oname,cname ## _t>), \- (to_nonconst<cname,cname ## _t>) )-+ FXIIF( CHECKPROTECT(cname,mname) ) ( \+ (from_nonconst_to_nonconst<oname,cname ## _t>), \+ (from_nonconst_to_nonconst<cname,cname ## _t>) ) TOBJECT_DEF_VIRT(TNamed) DELETABLE_DEF_VIRT(TNamed)- TNAMED_DEF_VIRT(TNamed)- TNAMED_DEF_NONVIRT(TNamed)+TNAMED_DEF_ACCESSOR(TNamed)
csrc/HROOTCoreTNamed.h view
@@ -1,58 +1,61 @@+ #ifdef __cplusplus-extern "C" { +extern "C" { #endif -#ifndef __HROOT_CORE__TNamed__-#define __HROOT_CORE__TNamed__+#pragma once + #include "HROOT-coreType.h"+ #include "HROOTCoreTObject.h"-#include "HROOTCoreDeletable.h" -#undef TNAMED_DECL_VIRT +#include "STDDeletable.h"++ #define TNAMED_DECL_VIRT(Type) \-void Type ## _SetName ( Type ## _p p, const char* name ); \-void Type ## _SetNameTitle ( Type ## _p p, const char* name, const char* title ); \-void Type ## _SetTitle ( Type ## _p p, const char* name )+void Type##_SetName ( Type##_p p, const char* name );\+void Type##_SetNameTitle ( Type##_p p, const char* name, const char* title );\+void Type##_SetTitle ( Type##_p p, const char* name ); -#undef TNAMED_DECL_NONVIRT + #define TNAMED_DECL_NONVIRT(Type) \-Type ## _p Type ## _newTNamed ( const char* name, const char* title )+Type##_p Type##_newTNamed ( const char* name, const char* title ); -#undef TNAMED_DEF_VIRT-#define TNAMED_DEF_VIRT(Type)\-void Type ## _SetName ( Type ## _p p, const char* name )\-{\-TYPECASTMETHOD(Type,SetName,TNamed)(p)->SetName(name);\++#define TNAMED_DECL_ACCESSOR(Type) \++++#define TNAMED_DEF_VIRT(Type) \+void Type##_SetName ( Type##_p p, const char* name ) {\+((TYPECASTMETHOD(Type, SetName, TNamed))(p))->SetName(name);\ }\-void Type ## _SetNameTitle ( Type ## _p p, const char* name, const char* title )\-{\-TYPECASTMETHOD(Type,SetNameTitle,TNamed)(p)->SetNameTitle(name, title);\+\+void Type##_SetNameTitle ( Type##_p p, const char* name, const char* title ) {\+((TYPECASTMETHOD(Type, SetNameTitle, TNamed))(p))->SetNameTitle(name, title);\ }\-void Type ## _SetTitle ( Type ## _p p, const char* name )\-{\-TYPECASTMETHOD(Type,SetTitle,TNamed)(p)->SetTitle(name);\+\+void Type##_SetTitle ( Type##_p p, const char* name ) {\+((TYPECASTMETHOD(Type, SetTitle, TNamed))(p))->SetTitle(name);\ } -#undef TNAMED_DEF_NONVIRT-#define TNAMED_DEF_NONVIRT(Type)\-Type ## _p Type ## _newTNamed ( const char* name, const char* title )\-{\-Type * newp = new Type (name, title); \-return to_nonconst<Type ## _t, Type >(newp);\++#define TNAMED_DEF_NONVIRT(Type) \+Type##_p Type##_newTNamed ( const char* name, const char* title ) {\+Type* newp=new Type(name, title);return from_nonconst_to_nonconst<Type##_t, Type>(newp);\ } -TOBJECT_DECL_VIRT(TNamed);-DELETABLE_DECL_VIRT(TNamed); +#define TNAMED_DEF_ACCESSOR(Type) \ -TNAMED_DECL_VIRT(TNamed); -TNAMED_DECL_NONVIRT(TNamed);---#endif // __HROOT_CORE__TNamed__+TOBJECT_DECL_VIRT(TNamed)+DELETABLE_DECL_VIRT(TNamed)+TNAMED_DECL_VIRT(TNamed)+TNAMED_DECL_NONVIRT(TNamed)+TNAMED_DECL_ACCESSOR(TNamed) #ifdef __cplusplus }
csrc/HROOTCoreTObjArray.cpp view
@@ -1,24 +1,26 @@-#include <MacroPatternMatch.h>++#include "MacroPatternMatch.h"+ #include "HROOTCoreTSeqCollection.h"+ #include "TObjArray.h"-#include "HROOTCoreTObjArray.h" +#include "HROOTCoreTObjArray.h" +using namespace ROOT; -#define CHECKPROTECT(x,y) IS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED)+#define CHECKPROTECT(x,y) FXIS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED) #define TYPECASTMETHOD(cname,mname,oname) \- IIF( CHECKPROTECT(cname,mname) ) ( \- (to_nonconst<oname,cname ## _t>), \- (to_nonconst<cname,cname ## _t>) )-+ FXIIF( CHECKPROTECT(cname,mname) ) ( \+ (from_nonconst_to_nonconst<oname,cname ## _t>), \+ (from_nonconst_to_nonconst<cname,cname ## _t>) ) TSEQCOLLECTION_DEF_VIRT(TObjArray) TCOLLECTION_DEF_VIRT(TObjArray) TOBJECT_DEF_VIRT(TObjArray) DELETABLE_DEF_VIRT(TObjArray)- TOBJARRAY_DEF_VIRT(TObjArray)- TOBJARRAY_DEF_NONVIRT(TObjArray)+TOBJARRAY_DEF_ACCESSOR(TObjArray)
csrc/HROOTCoreTObjArray.h view
@@ -1,45 +1,53 @@+ #ifdef __cplusplus-extern "C" { +extern "C" { #endif -#ifndef __HROOT_CORE__TObjArray__-#define __HROOT_CORE__TObjArray__+#pragma once + #include "HROOT-coreType.h"+ #include "HROOTCoreTSeqCollection.h"+ #include "HROOTCoreTCollection.h"+ #include "HROOTCoreTObject.h"-#include "HROOTCoreDeletable.h" -#undef TOBJARRAY_DECL_VIRT +#include "STDDeletable.h"++ #define TOBJARRAY_DECL_VIRT(Type) \ -#undef TOBJARRAY_DECL_NONVIRT + #define TOBJARRAY_DECL_NONVIRT(Type) \ -#undef TOBJARRAY_DEF_VIRT-#define TOBJARRAY_DEF_VIRT(Type)\ +#define TOBJARRAY_DECL_ACCESSOR(Type) \ -#undef TOBJARRAY_DEF_NONVIRT-#define TOBJARRAY_DEF_NONVIRT(Type)\ -TSEQCOLLECTION_DECL_VIRT(TObjArray);-TCOLLECTION_DECL_VIRT(TObjArray);-TOBJECT_DECL_VIRT(TObjArray);-DELETABLE_DECL_VIRT(TObjArray);+#define TOBJARRAY_DEF_VIRT(Type) \ -TOBJARRAY_DECL_VIRT(TObjArray); +#define TOBJARRAY_DEF_NONVIRT(Type) \ -TOBJARRAY_DECL_NONVIRT(TObjArray); -#endif // __HROOT_CORE__TObjArray__+#define TOBJARRAY_DEF_ACCESSOR(Type) \++++TSEQCOLLECTION_DECL_VIRT(TObjArray)+TCOLLECTION_DECL_VIRT(TObjArray)+TOBJECT_DECL_VIRT(TObjArray)+DELETABLE_DECL_VIRT(TObjArray)+TOBJARRAY_DECL_VIRT(TObjArray)+TOBJARRAY_DECL_NONVIRT(TObjArray)+TOBJARRAY_DECL_ACCESSOR(TObjArray) #ifdef __cplusplus }
csrc/HROOTCoreTObject.cpp view
@@ -1,22 +1,25 @@-#include <MacroPatternMatch.h>++#include "MacroPatternMatch.h"+ #include "HROOTCoreTClass.h"-#include "HROOTCoreDeletable.h"++#include "STDDeletable.h"+ #include "TObject.h"-#include "HROOTCoreTObject.h" +#include "HROOTCoreTObject.h" +using namespace ROOT; -#define CHECKPROTECT(x,y) IS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED)+#define CHECKPROTECT(x,y) FXIS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED) #define TYPECASTMETHOD(cname,mname,oname) \- IIF( CHECKPROTECT(cname,mname) ) ( \- (to_nonconst<oname,cname ## _t>), \- (to_nonconst<cname,cname ## _t>) )-+ FXIIF( CHECKPROTECT(cname,mname) ) ( \+ (from_nonconst_to_nonconst<oname,cname ## _t>), \+ (from_nonconst_to_nonconst<cname,cname ## _t>) ) DELETABLE_DEF_VIRT(TObject)- TOBJECT_DEF_VIRT(TObject)- TOBJECT_DEF_NONVIRT(TObject)+TOBJECT_DEF_ACCESSOR(TObject)
csrc/HROOTCoreTObject.h view
@@ -1,86 +1,100 @@+ #ifdef __cplusplus-extern "C" { +extern "C" { #endif -#ifndef __HROOT_CORE__TObject__-#define __HROOT_CORE__TObject__+#pragma once + #include "HROOT-coreType.h"-#include "HROOTCoreDeletable.h" -#undef TOBJECT_DECL_VIRT +#include "STDDeletable.h"++#include "stdcxxType.h"++ #define TOBJECT_DECL_VIRT(Type) \-void Type ## _Draw ( Type ## _p p, const char* option ); \-TObject_p Type ## _FindObject ( Type ## _p p, const char* name ); \-const char* Type ## _GetName ( Type ## _p p ); \-TClass_p Type ## _IsA ( Type ## _p p ); \-void Type ## _Paint ( Type ## _p p, const char* option ); \-void Type ## _printObj ( Type ## _p p, const char* option ); \-void Type ## _SaveAs ( Type ## _p p, const char* filename, const char* option ); \-int Type ## _Write ( Type ## _p p, const char* name, int option, int bufsize )+void Type##_Clear ( Type##_p p, const char* option );\+void Type##_Draw ( Type##_p p, const char* option );\+TObject_p Type##_FindObject ( Type##_p p, const char* name );\+const char* Type##_GetName ( Type##_p p );\+TClass_p Type##_IsA ( Type##_p p );\+void Type##_Paint ( Type##_p p, const char* option );\+void Type##_printObj ( Type##_p p, const char* option );\+void Type##_SaveAs ( Type##_p p, const char* filename, const char* option );\+int Type##_Write ( Type##_p p, const char* name, int option, int bufsize );\+int Type##_Write_ ( Type##_p p ); -#undef TOBJECT_DECL_NONVIRT + #define TOBJECT_DECL_NONVIRT(Type) \-Type ## _p Type ## _newTObject ( ); \-int Type ## _tObjectGetObjectStat ( )+Type##_p Type##_newTObject ( );\+bool Type##_tObject_GetObjectStat ( ); -#undef TOBJECT_DEF_VIRT-#define TOBJECT_DEF_VIRT(Type)\-void Type ## _Draw ( Type ## _p p, const char* option )\-{\-TYPECASTMETHOD(Type,Draw,TObject)(p)->Draw(option);\++#define TOBJECT_DECL_ACCESSOR(Type) \++++#define TOBJECT_DEF_VIRT(Type) \+void Type##_Clear ( Type##_p p, const char* option ) {\+((TYPECASTMETHOD(Type, Clear, TObject))(p))->Clear(option);\ }\-TObject_p Type ## _FindObject ( Type ## _p p, const char* name )\-{\-return to_nonconst<TObject_t,TObject>((TObject*)TYPECASTMETHOD(Type,FindObject,TObject)(p)->FindObject(name));\+\+void Type##_Draw ( Type##_p p, const char* option ) {\+((TYPECASTMETHOD(Type, Draw, TObject))(p))->Draw(option);\ }\-const char* Type ## _GetName ( Type ## _p p )\-{\-return TYPECASTMETHOD(Type,GetName,TObject)(p)->GetName();\+\+TObject_p Type##_FindObject ( Type##_p p, const char* name ) {\+return from_nonconst_to_nonconst<TObject_t, TObject>((TObject*)((TYPECASTMETHOD(Type, FindObject, TObject))(p))->FindObject(name));\ }\-TClass_p Type ## _IsA ( Type ## _p p )\-{\-return to_nonconst<TClass_t,TClass>((TClass*)TYPECASTMETHOD(Type,IsA,TObject)(p)->IsA());\+\+const char* Type##_GetName ( Type##_p p ) {\+return ((TYPECASTMETHOD(Type, GetName, TObject))(p))->GetName();\ }\-void Type ## _Paint ( Type ## _p p, const char* option )\-{\-TYPECASTMETHOD(Type,Paint,TObject)(p)->Paint(option);\+\+TClass_p Type##_IsA ( Type##_p p ) {\+return from_nonconst_to_nonconst<TClass_t, TClass>((TClass*)((TYPECASTMETHOD(Type, IsA, TObject))(p))->IsA());\ }\-void Type ## _printObj ( Type ## _p p, const char* option )\-{\-TYPECASTMETHOD(Type,printObj,TObject)(p)->Print(option);\+\+void Type##_Paint ( Type##_p p, const char* option ) {\+((TYPECASTMETHOD(Type, Paint, TObject))(p))->Paint(option);\ }\-void Type ## _SaveAs ( Type ## _p p, const char* filename, const char* option )\-{\-TYPECASTMETHOD(Type,SaveAs,TObject)(p)->SaveAs(filename, option);\+\+void Type##_printObj ( Type##_p p, const char* option ) {\+((TYPECASTMETHOD(Type, printObj, TObject))(p))->Print(option);\ }\-int Type ## _Write ( Type ## _p p, const char* name, int option, int bufsize )\-{\-return TYPECASTMETHOD(Type,Write,TObject)(p)->Write(name, option, bufsize);\+\+void Type##_SaveAs ( Type##_p p, const char* filename, const char* option ) {\+((TYPECASTMETHOD(Type, SaveAs, TObject))(p))->SaveAs(filename, option);\+}\+\+int Type##_Write ( Type##_p p, const char* name, int option, int bufsize ) {\+return ((TYPECASTMETHOD(Type, Write, TObject))(p))->Write(name, option, bufsize);\+}\+\+int Type##_Write_ ( Type##_p p ) {\+return ((TYPECASTMETHOD(Type, Write_, TObject))(p))->Write();\ } -#undef TOBJECT_DEF_NONVIRT-#define TOBJECT_DEF_NONVIRT(Type)\-Type ## _p Type ## _newTObject ( )\-{\-Type * newp = new Type (); \-return to_nonconst<Type ## _t, Type >(newp);\++#define TOBJECT_DEF_NONVIRT(Type) \+Type##_p Type##_newTObject ( ) {\+Type* newp=new Type();return from_nonconst_to_nonconst<Type##_t, Type>(newp);\ }\-int Type ## _tObjectGetObjectStat ( )\-{\+\+bool Type##_tObject_GetObjectStat ( ) {\ return TObject::GetObjectStat();\ } -DELETABLE_DECL_VIRT(TObject); +#define TOBJECT_DEF_ACCESSOR(Type) \ -TOBJECT_DECL_VIRT(TObject); -TOBJECT_DECL_NONVIRT(TObject);---#endif // __HROOT_CORE__TObject__+DELETABLE_DECL_VIRT(TObject)+TOBJECT_DECL_VIRT(TObject)+TOBJECT_DECL_NONVIRT(TObject)+TOBJECT_DECL_ACCESSOR(TObject) #ifdef __cplusplus }
csrc/HROOTCoreTQObject.cpp view
@@ -1,21 +1,23 @@-#include <MacroPatternMatch.h>-#include "HROOTCoreDeletable.h"++#include "MacroPatternMatch.h"++#include "STDDeletable.h"+ #include "TQObject.h"-#include "HROOTCoreTQObject.h" +#include "HROOTCoreTQObject.h" +using namespace ROOT; -#define CHECKPROTECT(x,y) IS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED)+#define CHECKPROTECT(x,y) FXIS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED) #define TYPECASTMETHOD(cname,mname,oname) \- IIF( CHECKPROTECT(cname,mname) ) ( \- (to_nonconst<oname,cname ## _t>), \- (to_nonconst<cname,cname ## _t>) )-+ FXIIF( CHECKPROTECT(cname,mname) ) ( \+ (from_nonconst_to_nonconst<oname,cname ## _t>), \+ (from_nonconst_to_nonconst<cname,cname ## _t>) ) DELETABLE_DEF_VIRT(TQObject)- TQOBJECT_DEF_VIRT(TQObject)- TQOBJECT_DEF_NONVIRT(TQObject)+TQOBJECT_DEF_ACCESSOR(TQObject)
csrc/HROOTCoreTQObject.h view
@@ -1,39 +1,46 @@+ #ifdef __cplusplus-extern "C" { +extern "C" { #endif -#ifndef __HROOT_CORE__TQObject__-#define __HROOT_CORE__TQObject__+#pragma once + #include "HROOT-coreType.h"-#include "HROOTCoreDeletable.h" -#undef TQOBJECT_DECL_VIRT +#include "STDDeletable.h"++#include "stdcxxType.h"++ #define TQOBJECT_DECL_VIRT(Type) \ -#undef TQOBJECT_DECL_NONVIRT + #define TQOBJECT_DECL_NONVIRT(Type) \ -#undef TQOBJECT_DEF_VIRT-#define TQOBJECT_DEF_VIRT(Type)\ +#define TQOBJECT_DECL_ACCESSOR(Type) \ -#undef TQOBJECT_DEF_NONVIRT-#define TQOBJECT_DEF_NONVIRT(Type)\ -DELETABLE_DECL_VIRT(TQObject);+#define TQOBJECT_DEF_VIRT(Type) \ -TQOBJECT_DECL_VIRT(TQObject); +#define TQOBJECT_DEF_NONVIRT(Type) \ -TQOBJECT_DECL_NONVIRT(TQObject); -#endif // __HROOT_CORE__TQObject__+#define TQOBJECT_DEF_ACCESSOR(Type) \++++DELETABLE_DECL_VIRT(TQObject)+TQOBJECT_DECL_VIRT(TQObject)+TQOBJECT_DECL_NONVIRT(TQObject)+TQOBJECT_DECL_ACCESSOR(TQObject) #ifdef __cplusplus }
csrc/HROOTCoreTROOT.cpp view
@@ -1,26 +1,28 @@-#include <MacroPatternMatch.h>++#include "MacroPatternMatch.h"+ #include "HROOTCoreTGlobal.h"+ #include "HROOTCoreTDirectory.h"+ #include "TROOT.h"+ #include "HROOTCoreTROOT.h" using namespace ROOT; --#define CHECKPROTECT(x,y) IS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED)+#define CHECKPROTECT(x,y) FXIS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED) #define TYPECASTMETHOD(cname,mname,oname) \- IIF( CHECKPROTECT(cname,mname) ) ( \- (to_nonconst<oname,cname ## _t>), \- (to_nonconst<cname,cname ## _t>) )-+ FXIIF( CHECKPROTECT(cname,mname) ) ( \+ (from_nonconst_to_nonconst<oname,cname ## _t>), \+ (from_nonconst_to_nonconst<cname,cname ## _t>) ) TDIRECTORY_DEF_VIRT(TROOT) TNAMED_DEF_VIRT(TROOT) TOBJECT_DEF_VIRT(TROOT) DELETABLE_DEF_VIRT(TROOT)- TROOT_DEF_VIRT(TROOT)- TROOT_DEF_NONVIRT(TROOT)+TROOT_DEF_ACCESSOR(TROOT)
csrc/HROOTCoreTROOT.h view
@@ -1,53 +1,60 @@+ #ifdef __cplusplus-extern "C" { +extern "C" { #endif -#ifndef __HROOT_CORE__TROOT__-#define __HROOT_CORE__TROOT__+#pragma once + #include "HROOT-coreType.h"+ #include "HROOTCoreTDirectory.h"+ #include "HROOTCoreTNamed.h"+ #include "HROOTCoreTObject.h"-#include "HROOTCoreDeletable.h" -#undef TROOT_DECL_VIRT +#include "STDDeletable.h"++ #define TROOT_DECL_VIRT(Type) \ -#undef TROOT_DECL_NONVIRT + #define TROOT_DECL_NONVIRT(Type) \-TGlobal_p Type ## _tROOTGetGlobal ( Type ## _p p, const char* name, int load ); \-int Type ## _tROOTInitialized ( )+TGlobal_p Type##_tROOT_GetGlobal ( Type##_p p, const char* name, bool load );\+bool Type##_tROOT_Initialized ( ); -#undef TROOT_DEF_VIRT-#define TROOT_DEF_VIRT(Type)\ +#define TROOT_DECL_ACCESSOR(Type) \ -#undef TROOT_DEF_NONVIRT-#define TROOT_DEF_NONVIRT(Type)\-TGlobal_p Type ## _tROOTGetGlobal ( Type ## _p p, const char* name, int load )\-{\-return to_nonconst<TGlobal_t,TGlobal>((TGlobal*)TYPECASTMETHOD(Type,tROOTGetGlobal,TROOT)(p)->GetGlobal(name, load));\+++#define TROOT_DEF_VIRT(Type) \++++#define TROOT_DEF_NONVIRT(Type) \+TGlobal_p Type##_tROOT_GetGlobal ( Type##_p p, const char* name, bool load ) {\+return from_nonconst_to_nonconst<TGlobal_t, TGlobal>((TGlobal*)((TYPECASTMETHOD(Type, tROOT_GetGlobal, TROOT))(p))->GetGlobal(name, load));\ }\-int Type ## _tROOTInitialized ( )\-{\+\+bool Type##_tROOT_Initialized ( ) {\ return TROOT::Initialized();\ } -TDIRECTORY_DECL_VIRT(TROOT);-TNAMED_DECL_VIRT(TROOT);-TOBJECT_DECL_VIRT(TROOT);-DELETABLE_DECL_VIRT(TROOT); +#define TROOT_DEF_ACCESSOR(Type) \ -TROOT_DECL_VIRT(TROOT); -TROOT_DECL_NONVIRT(TROOT);---#endif // __HROOT_CORE__TROOT__+TDIRECTORY_DECL_VIRT(TROOT)+TNAMED_DECL_VIRT(TROOT)+TOBJECT_DECL_VIRT(TROOT)+DELETABLE_DECL_VIRT(TROOT)+TROOT_DECL_VIRT(TROOT)+TROOT_DECL_NONVIRT(TROOT)+TROOT_DECL_ACCESSOR(TROOT) #ifdef __cplusplus }
csrc/HROOTCoreTSeqCollection.cpp view
@@ -1,23 +1,25 @@-#include <MacroPatternMatch.h>++#include "MacroPatternMatch.h"+ #include "HROOTCoreTCollection.h"+ #include "TSeqCollection.h"-#include "HROOTCoreTSeqCollection.h" +#include "HROOTCoreTSeqCollection.h" +using namespace ROOT; -#define CHECKPROTECT(x,y) IS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED)+#define CHECKPROTECT(x,y) FXIS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED) #define TYPECASTMETHOD(cname,mname,oname) \- IIF( CHECKPROTECT(cname,mname) ) ( \- (to_nonconst<oname,cname ## _t>), \- (to_nonconst<cname,cname ## _t>) )-+ FXIIF( CHECKPROTECT(cname,mname) ) ( \+ (from_nonconst_to_nonconst<oname,cname ## _t>), \+ (from_nonconst_to_nonconst<cname,cname ## _t>) ) TCOLLECTION_DEF_VIRT(TSeqCollection) TOBJECT_DEF_VIRT(TSeqCollection) DELETABLE_DEF_VIRT(TSeqCollection)- TSEQCOLLECTION_DEF_VIRT(TSeqCollection)- TSEQCOLLECTION_DEF_NONVIRT(TSeqCollection)+TSEQCOLLECTION_DEF_ACCESSOR(TSeqCollection)
csrc/HROOTCoreTSeqCollection.h view
@@ -1,43 +1,50 @@+ #ifdef __cplusplus-extern "C" { +extern "C" { #endif -#ifndef __HROOT_CORE__TSeqCollection__-#define __HROOT_CORE__TSeqCollection__+#pragma once + #include "HROOT-coreType.h"+ #include "HROOTCoreTCollection.h"+ #include "HROOTCoreTObject.h"-#include "HROOTCoreDeletable.h" -#undef TSEQCOLLECTION_DECL_VIRT +#include "STDDeletable.h"++ #define TSEQCOLLECTION_DECL_VIRT(Type) \ -#undef TSEQCOLLECTION_DECL_NONVIRT + #define TSEQCOLLECTION_DECL_NONVIRT(Type) \ -#undef TSEQCOLLECTION_DEF_VIRT-#define TSEQCOLLECTION_DEF_VIRT(Type)\ +#define TSEQCOLLECTION_DECL_ACCESSOR(Type) \ -#undef TSEQCOLLECTION_DEF_NONVIRT-#define TSEQCOLLECTION_DEF_NONVIRT(Type)\ -TCOLLECTION_DECL_VIRT(TSeqCollection);-TOBJECT_DECL_VIRT(TSeqCollection);-DELETABLE_DECL_VIRT(TSeqCollection);+#define TSEQCOLLECTION_DEF_VIRT(Type) \ -TSEQCOLLECTION_DECL_VIRT(TSeqCollection); +#define TSEQCOLLECTION_DEF_NONVIRT(Type) \ -TSEQCOLLECTION_DECL_NONVIRT(TSeqCollection); -#endif // __HROOT_CORE__TSeqCollection__+#define TSEQCOLLECTION_DEF_ACCESSOR(Type) \++++TCOLLECTION_DECL_VIRT(TSeqCollection)+TOBJECT_DECL_VIRT(TSeqCollection)+DELETABLE_DECL_VIRT(TSeqCollection)+TSEQCOLLECTION_DECL_VIRT(TSeqCollection)+TSEQCOLLECTION_DECL_NONVIRT(TSeqCollection)+TSEQCOLLECTION_DECL_ACCESSOR(TSeqCollection) #ifdef __cplusplus }
+ csrc/HROOTCoreTStyle.cpp view
@@ -0,0 +1,37 @@++#include "MacroPatternMatch.h"++#include "HROOTCoreTNamed.h"++#include "HROOTCoreTAttLine.h"++#include "HROOTCoreTAttFill.h"++#include "HROOTCoreTAttMarker.h"++#include "HROOTCoreTAttText.h"++#include "TStyle.h"++#include "HROOTCoreTStyle.h"++using namespace ROOT;++#define CHECKPROTECT(x,y) FXIS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED)++#define TYPECASTMETHOD(cname,mname,oname) \+ FXIIF( CHECKPROTECT(cname,mname) ) ( \+ (from_nonconst_to_nonconst<oname,cname ## _t>), \+ (from_nonconst_to_nonconst<cname,cname ## _t>) )++TNAMED_DEF_VIRT(TStyle)+TATTLINE_DEF_VIRT(TStyle)+TATTFILL_DEF_VIRT(TStyle)+TATTMARKER_DEF_VIRT(TStyle)+TATTTEXT_DEF_VIRT(TStyle)+TOBJECT_DEF_VIRT(TStyle)+DELETABLE_DEF_VIRT(TStyle)+TSTYLE_DEF_VIRT(TStyle)+TSTYLE_DEF_NONVIRT(TStyle)+TSTYLE_DEF_ACCESSOR(TStyle)+
+ csrc/HROOTCoreTStyle.h view
@@ -0,0 +1,111 @@++#ifdef __cplusplus+extern "C" {+#endif++#pragma once+++#include "HROOT-coreType.h"++#include "HROOTCoreTNamed.h"++#include "HROOTCoreTAttLine.h"++#include "HROOTCoreTAttFill.h"++#include "HROOTCoreTAttMarker.h"++#include "HROOTCoreTAttText.h"++#include "HROOTCoreTObject.h"++#include "STDDeletable.h"+++#define TSTYLE_DECL_VIRT(Type) \++++#define TSTYLE_DECL_NONVIRT(Type) \+void Type##_tStyle_SetCanvasPreferGL ( Type##_p p, bool prefer );\+void Type##_tStyle_SetOptDate ( Type##_p p, int optdate );\+void Type##_tStyle_SetOptFile ( Type##_p p, int file );\+void Type##_tStyle_SetOptFit ( Type##_p p, int mode );\+void Type##_tStyle_SetOptLogx ( Type##_p p, int logx );\+void Type##_tStyle_SetOptLogy ( Type##_p p, int logy );\+void Type##_tStyle_SetOptLogz ( Type##_p p, int logz );\+void Type##_tStyle_SetOptStat ( Type##_p p, int mode );\+void Type##_tStyle_SetOptTitle ( Type##_p p, int tit );\+void Type##_tStyle_SetPalette ( Type##_p p, int ncolors );+++#define TSTYLE_DECL_ACCESSOR(Type) \++++#define TSTYLE_DEF_VIRT(Type) \++++#define TSTYLE_DEF_NONVIRT(Type) \+void Type##_tStyle_SetCanvasPreferGL ( Type##_p p, bool prefer ) {\+((TYPECASTMETHOD(Type, tStyle_SetCanvasPreferGL, TStyle))(p))->SetCanvasPreferGL(prefer);\+}\+\+void Type##_tStyle_SetOptDate ( Type##_p p, int optdate ) {\+((TYPECASTMETHOD(Type, tStyle_SetOptDate, TStyle))(p))->SetOptDate(optdate);\+}\+\+void Type##_tStyle_SetOptFile ( Type##_p p, int file ) {\+((TYPECASTMETHOD(Type, tStyle_SetOptFile, TStyle))(p))->SetOptFile(file);\+}\+\+void Type##_tStyle_SetOptFit ( Type##_p p, int mode ) {\+((TYPECASTMETHOD(Type, tStyle_SetOptFit, TStyle))(p))->SetOptFit(mode);\+}\+\+void Type##_tStyle_SetOptLogx ( Type##_p p, int logx ) {\+((TYPECASTMETHOD(Type, tStyle_SetOptLogx, TStyle))(p))->SetOptLogx(logx);\+}\+\+void Type##_tStyle_SetOptLogy ( Type##_p p, int logy ) {\+((TYPECASTMETHOD(Type, tStyle_SetOptLogy, TStyle))(p))->SetOptLogy(logy);\+}\+\+void Type##_tStyle_SetOptLogz ( Type##_p p, int logz ) {\+((TYPECASTMETHOD(Type, tStyle_SetOptLogz, TStyle))(p))->SetOptLogz(logz);\+}\+\+void Type##_tStyle_SetOptStat ( Type##_p p, int mode ) {\+((TYPECASTMETHOD(Type, tStyle_SetOptStat, TStyle))(p))->SetOptStat(mode);\+}\+\+void Type##_tStyle_SetOptTitle ( Type##_p p, int tit ) {\+((TYPECASTMETHOD(Type, tStyle_SetOptTitle, TStyle))(p))->SetOptTitle(tit);\+}\+\+void Type##_tStyle_SetPalette ( Type##_p p, int ncolors ) {\+((TYPECASTMETHOD(Type, tStyle_SetPalette, TStyle))(p))->SetPalette(ncolors);\+}+++#define TSTYLE_DEF_ACCESSOR(Type) \++++TNAMED_DECL_VIRT(TStyle)+TATTLINE_DECL_VIRT(TStyle)+TATTFILL_DECL_VIRT(TStyle)+TATTMARKER_DECL_VIRT(TStyle)+TATTTEXT_DECL_VIRT(TStyle)+TOBJECT_DECL_VIRT(TStyle)+DELETABLE_DECL_VIRT(TStyle)+TSTYLE_DECL_VIRT(TStyle)+TSTYLE_DECL_NONVIRT(TStyle)+TSTYLE_DECL_ACCESSOR(TStyle)++#ifdef __cplusplus+}+#endif+
csrc/HROOTCoreTSystem.cpp view
@@ -1,23 +1,25 @@-#include <MacroPatternMatch.h>++#include "MacroPatternMatch.h"+ #include "HROOTCoreTNamed.h"+ #include "TSystem.h"-#include "HROOTCoreTSystem.h" +#include "HROOTCoreTSystem.h" +using namespace ROOT; -#define CHECKPROTECT(x,y) IS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED)+#define CHECKPROTECT(x,y) FXIS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED) #define TYPECASTMETHOD(cname,mname,oname) \- IIF( CHECKPROTECT(cname,mname) ) ( \- (to_nonconst<oname,cname ## _t>), \- (to_nonconst<cname,cname ## _t>) )-+ FXIIF( CHECKPROTECT(cname,mname) ) ( \+ (from_nonconst_to_nonconst<oname,cname ## _t>), \+ (from_nonconst_to_nonconst<cname,cname ## _t>) ) TNAMED_DEF_VIRT(TSystem) TOBJECT_DEF_VIRT(TSystem) DELETABLE_DEF_VIRT(TSystem)- TSYSTEM_DEF_VIRT(TSystem)- TSYSTEM_DEF_NONVIRT(TSystem)+TSYSTEM_DEF_ACCESSOR(TSystem)
csrc/HROOTCoreTSystem.h view
@@ -1,46 +1,52 @@+ #ifdef __cplusplus-extern "C" { +extern "C" { #endif -#ifndef __HROOT_CORE__TSystem__-#define __HROOT_CORE__TSystem__+#pragma once + #include "HROOT-coreType.h"+ #include "HROOTCoreTNamed.h"+ #include "HROOTCoreTObject.h"-#include "HROOTCoreDeletable.h" -#undef TSYSTEM_DECL_VIRT +#include "STDDeletable.h"++ #define TSYSTEM_DECL_VIRT(Type) \-int Type ## _ProcessEvents ( Type ## _p p )+bool Type##_ProcessEvents ( Type##_p p ); -#undef TSYSTEM_DECL_NONVIRT + #define TSYSTEM_DECL_NONVIRT(Type) \ -#undef TSYSTEM_DEF_VIRT-#define TSYSTEM_DEF_VIRT(Type)\-int Type ## _ProcessEvents ( Type ## _p p )\-{\-return TYPECASTMETHOD(Type,ProcessEvents,TSystem)(p)->ProcessEvents();\-} -#undef TSYSTEM_DEF_NONVIRT-#define TSYSTEM_DEF_NONVIRT(Type)\+#define TSYSTEM_DECL_ACCESSOR(Type) \ -TNAMED_DECL_VIRT(TSystem);-TOBJECT_DECL_VIRT(TSystem);-DELETABLE_DECL_VIRT(TSystem); +#define TSYSTEM_DEF_VIRT(Type) \+bool Type##_ProcessEvents ( Type##_p p ) {\+return ((TYPECASTMETHOD(Type, ProcessEvents, TSystem))(p))->ProcessEvents();\+} -TSYSTEM_DECL_VIRT(TSystem); +#define TSYSTEM_DEF_NONVIRT(Type) \ -TSYSTEM_DECL_NONVIRT(TSystem); -#endif // __HROOT_CORE__TSystem__+#define TSYSTEM_DEF_ACCESSOR(Type) \++++TNAMED_DECL_VIRT(TSystem)+TOBJECT_DECL_VIRT(TSystem)+DELETABLE_DECL_VIRT(TSystem)+TSYSTEM_DECL_VIRT(TSystem)+TSYSTEM_DECL_NONVIRT(TSystem)+TSYSTEM_DECL_ACCESSOR(TSystem) #ifdef __cplusplus }
+ csrc/HROOTCoreTVirtualMutex.cpp view
@@ -0,0 +1,22 @@++#include "MacroPatternMatch.h"++#include "STDDeletable.h"++#include "TVirtualMutex.h"++#include "HROOTCoreTVirtualMutex.h"++using namespace ROOT;++#define CHECKPROTECT(x,y) FXIS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED)++#define TYPECASTMETHOD(cname,mname,oname) \+ FXIIF( CHECKPROTECT(cname,mname) ) ( \+ (from_nonconst_to_nonconst<oname,cname ## _t>), \+ (from_nonconst_to_nonconst<cname,cname ## _t>) )++DELETABLE_DEF_VIRT(TVirtualMutex)+TVIRTUALMUTEX_DEF_NONVIRT(TVirtualMutex)+TVIRTUALMUTEX_DEF_ACCESSOR(TVirtualMutex)+
+ csrc/HROOTCoreTVirtualMutex.h view
@@ -0,0 +1,70 @@++#ifdef __cplusplus+extern "C" {+#endif++#pragma once+++#include "HROOT-coreType.h"++#include "STDDeletable.h"++#include "stdcxxType.h"+++#define TVIRTUALMUTEX_DECL_VIRT(Type) \+int Type##_CleanUp ( Type##_p p );\+Type##_p Type##_Factory ( Type##_p p, bool recursive );\+int Type##_Lock ( Type##_p p );\+int Type##_TryLock ( Type##_p p );\+int Type##_UnLock ( Type##_p p );+++#define TVIRTUALMUTEX_DECL_NONVIRT(Type) \++++#define TVIRTUALMUTEX_DECL_ACCESSOR(Type) \++++#define TVIRTUALMUTEX_DEF_VIRT(Type) \+int Type##_CleanUp ( Type##_p p ) {\+return ((TYPECASTMETHOD(Type, CleanUp, TVirtualMutex))(p))->CleanUp();\+}\+\+Type##_p Type##_Factory ( Type##_p p, bool recursive ) {\+return from_nonconst_to_nonconst<Type##_t, Type>((Type*)((TYPECASTMETHOD(Type, Factory, TVirtualMutex))(p))->Factory(recursive));\+}\+\+int Type##_Lock ( Type##_p p ) {\+return ((TYPECASTMETHOD(Type, Lock, TVirtualMutex))(p))->Lock();\+}\+\+int Type##_TryLock ( Type##_p p ) {\+return ((TYPECASTMETHOD(Type, TryLock, TVirtualMutex))(p))->TryLock();\+}\+\+int Type##_UnLock ( Type##_p p ) {\+return ((TYPECASTMETHOD(Type, UnLock, TVirtualMutex))(p))->UnLock();\+}+++#define TVIRTUALMUTEX_DEF_NONVIRT(Type) \++++#define TVIRTUALMUTEX_DEF_ACCESSOR(Type) \++++DELETABLE_DECL_VIRT(TVirtualMutex)+TVIRTUALMUTEX_DECL_VIRT(TVirtualMutex)+TVIRTUALMUTEX_DECL_NONVIRT(TVirtualMutex)+TVIRTUALMUTEX_DECL_ACCESSOR(TVirtualMutex)++#ifdef __cplusplus+}+#endif+
csrc/HROOTCoreTVirtualPad.cpp view
@@ -1,22 +1,36 @@-#include <MacroPatternMatch.h>++#include "MacroPatternMatch.h"+ #include "HROOTCoreTObject.h"++#include "HROOTCoreTAttLine.h"++#include "HROOTCoreTAttFill.h"++#include "HROOTCoreTAttPad.h"++#include "HROOTCoreTQObject.h"+ #include "TVirtualPad.h"-#include "HROOTCoreTVirtualPad.h" +#include "HROOTCoreTVirtualPad.h" +using namespace ROOT; -#define CHECKPROTECT(x,y) IS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED)+#define CHECKPROTECT(x,y) FXIS_PAREN(IS_ ## x ## _ ## y ## _PROTECTED) #define TYPECASTMETHOD(cname,mname,oname) \- IIF( CHECKPROTECT(cname,mname) ) ( \- (to_nonconst<oname,cname ## _t>), \- (to_nonconst<cname,cname ## _t>) )-+ FXIIF( CHECKPROTECT(cname,mname) ) ( \+ (from_nonconst_to_nonconst<oname,cname ## _t>), \+ (from_nonconst_to_nonconst<cname,cname ## _t>) ) TOBJECT_DEF_VIRT(TVirtualPad)+TATTLINE_DEF_VIRT(TVirtualPad)+TATTFILL_DEF_VIRT(TVirtualPad)+TATTPAD_DEF_VIRT(TVirtualPad)+TQOBJECT_DEF_VIRT(TVirtualPad) DELETABLE_DEF_VIRT(TVirtualPad)- TVIRTUALPAD_DEF_VIRT(TVirtualPad)- TVIRTUALPAD_DEF_NONVIRT(TVirtualPad)+TVIRTUALPAD_DEF_ACCESSOR(TVirtualPad)
csrc/HROOTCoreTVirtualPad.h view
@@ -1,64 +1,96 @@+ #ifdef __cplusplus-extern "C" { +extern "C" { #endif -#ifndef __HROOT_CORE__TVirtualPad__-#define __HROOT_CORE__TVirtualPad__+#pragma once + #include "HROOT-coreType.h"+ #include "HROOTCoreTObject.h"-#include "HROOTCoreDeletable.h" -#undef TVIRTUALPAD_DECL_VIRT +#include "HROOTCoreTAttLine.h"++#include "HROOTCoreTAttFill.h"++#include "HROOTCoreTAttPad.h"++#include "HROOTCoreTQObject.h"++#include "STDDeletable.h"++ #define TVIRTUALPAD_DECL_VIRT(Type) \-Type ## _p Type ## _cd ( Type ## _p p, int subpadnumber ); \-void Type ## _divide_tvirtualpad ( Type ## _p p, int nx, int ny, double xmargin, double ymargin, int color ); \-void Type ## _SetLogx ( Type ## _p p, int value ); \-void Type ## _SetLogy ( Type ## _p p, int value ); \-void Type ## _SetLogz ( Type ## _p p, int value )+Type##_p Type##_cd ( Type##_p p, int subpadnumber );\+void Type##_divide_tvirtualpad ( Type##_p p, int nx, int ny, float xmargin, float ymargin, int color );\+void Type##_Modified ( Type##_p p, bool flag );\+void Type##_Range ( Type##_p p, double x1, double y1, double x2, double y2 );\+void Type##_SetLogx ( Type##_p p, int value );\+void Type##_SetLogy ( Type##_p p, int value );\+void Type##_SetLogz ( Type##_p p, int value );\+void Type##_Update ( Type##_p p ); -#undef TVIRTUALPAD_DECL_NONVIRT + #define TVIRTUALPAD_DECL_NONVIRT(Type) \ -#undef TVIRTUALPAD_DEF_VIRT-#define TVIRTUALPAD_DEF_VIRT(Type)\-Type ## _p Type ## _cd ( Type ## _p p, int subpadnumber )\-{\-return to_nonconst<Type ## _t, Type>((Type *)TYPECASTMETHOD(Type,cd,TVirtualPad)(p)->cd(subpadnumber)) ;\++#define TVIRTUALPAD_DECL_ACCESSOR(Type) \++++#define TVIRTUALPAD_DEF_VIRT(Type) \+Type##_p Type##_cd ( Type##_p p, int subpadnumber ) {\+return from_nonconst_to_nonconst<Type##_t, Type>((Type*)((TYPECASTMETHOD(Type, cd, TVirtualPad))(p))->cd(subpadnumber));\ }\-void Type ## _divide_tvirtualpad ( Type ## _p p, int nx, int ny, double xmargin, double ymargin, int color )\-{\-TYPECASTMETHOD(Type,divide_tvirtualpad,TVirtualPad)(p)->Divide(nx, ny, xmargin, ymargin, color);\+\+void Type##_divide_tvirtualpad ( Type##_p p, int nx, int ny, float xmargin, float ymargin, int color ) {\+((TYPECASTMETHOD(Type, divide_tvirtualpad, TVirtualPad))(p))->Divide(nx, ny, xmargin, ymargin, color);\ }\-void Type ## _SetLogx ( Type ## _p p, int value )\-{\-TYPECASTMETHOD(Type,SetLogx,TVirtualPad)(p)->SetLogx(value);\+\+void Type##_Modified ( Type##_p p, bool flag ) {\+((TYPECASTMETHOD(Type, Modified, TVirtualPad))(p))->Modified(flag);\ }\-void Type ## _SetLogy ( Type ## _p p, int value )\-{\-TYPECASTMETHOD(Type,SetLogy,TVirtualPad)(p)->SetLogy(value);\+\+void Type##_Range ( Type##_p p, double x1, double y1, double x2, double y2 ) {\+((TYPECASTMETHOD(Type, Range, TVirtualPad))(p))->Range(x1, y1, x2, y2);\ }\-void Type ## _SetLogz ( Type ## _p p, int value )\-{\-TYPECASTMETHOD(Type,SetLogz,TVirtualPad)(p)->SetLogz(value);\+\+void Type##_SetLogx ( Type##_p p, int value ) {\+((TYPECASTMETHOD(Type, SetLogx, TVirtualPad))(p))->SetLogx(value);\+}\+\+void Type##_SetLogy ( Type##_p p, int value ) {\+((TYPECASTMETHOD(Type, SetLogy, TVirtualPad))(p))->SetLogy(value);\+}\+\+void Type##_SetLogz ( Type##_p p, int value ) {\+((TYPECASTMETHOD(Type, SetLogz, TVirtualPad))(p))->SetLogz(value);\+}\+\+void Type##_Update ( Type##_p p ) {\+((TYPECASTMETHOD(Type, Update, TVirtualPad))(p))->Update();\ } -#undef TVIRTUALPAD_DEF_NONVIRT-#define TVIRTUALPAD_DEF_NONVIRT(Type)\ +#define TVIRTUALPAD_DEF_NONVIRT(Type) \ -TOBJECT_DECL_VIRT(TVirtualPad);-DELETABLE_DECL_VIRT(TVirtualPad); -TVIRTUALPAD_DECL_VIRT(TVirtualPad);+#define TVIRTUALPAD_DEF_ACCESSOR(Type) \ -TVIRTUALPAD_DECL_NONVIRT(TVirtualPad); --#endif // __HROOT_CORE__TVirtualPad__+TOBJECT_DECL_VIRT(TVirtualPad)+TATTLINE_DECL_VIRT(TVirtualPad)+TATTFILL_DECL_VIRT(TVirtualPad)+TATTPAD_DECL_VIRT(TVirtualPad)+TQOBJECT_DECL_VIRT(TVirtualPad)+DELETABLE_DECL_VIRT(TVirtualPad)+TVIRTUALPAD_DECL_VIRT(TVirtualPad)+TVIRTUALPAD_DECL_NONVIRT(TVirtualPad)+TVIRTUALPAD_DECL_ACCESSOR(TVirtualPad) #ifdef __cplusplus }
src/HROOT/Core.hs view
@@ -1,43 +1,29 @@-module HROOT.Core (- module HROOT.Core.Deletable-, module HROOT.Core.TApplication-, module HROOT.Core.TArray-, module HROOT.Core.TArrayC-, module HROOT.Core.TArrayD-, module HROOT.Core.TArrayF-, module HROOT.Core.TArrayI-, module HROOT.Core.TArrayL-, module HROOT.Core.TArrayL64-, module HROOT.Core.TArrayS-, module HROOT.Core.TAtt3D-, module HROOT.Core.TAttAxis-, module HROOT.Core.TAttBBox-, module HROOT.Core.TAttCanvas-, module HROOT.Core.TAttFill-, module HROOT.Core.TAttLine-, module HROOT.Core.TAttMarker-, module HROOT.Core.TAttPad-, module HROOT.Core.TAttText-, module HROOT.Core.TClass-, module HROOT.Core.TCollection-, module HROOT.Core.TDictionary-, module HROOT.Core.TDirectory-, module HROOT.Core.TGlobal-, module HROOT.Core.TKey-, module HROOT.Core.TNamed-, module HROOT.Core.TObjArray-, module HROOT.Core.TObject-, module HROOT.Core.TQObject-, module HROOT.Core.TROOT-, module HROOT.Core.TSeqCollection-, module HROOT.Core.TSystem-, module HROOT.Core.TVirtualPad-, getROOT-, gROOT-, gSystem-) where--import HROOT.Core.Deletable+{-# LANGUAGE FlexibleContexts, FlexibleInstances,+ ForeignFunctionInterface, InterruptibleFFI #-}+module HROOT.Core+ (module HROOT.Core.Rectangle_t, module HROOT.Core.TApplication,+ module HROOT.Core.TArray, module HROOT.Core.TArrayC,+ module HROOT.Core.TArrayD, module HROOT.Core.TArrayF,+ module HROOT.Core.TArrayI, module HROOT.Core.TArrayL,+ module HROOT.Core.TArrayL64, module HROOT.Core.TArrayS,+ module HROOT.Core.TAtt3D, module HROOT.Core.TAttAxis,+ module HROOT.Core.TAttBBox, module HROOT.Core.TAttBBox2D,+ module HROOT.Core.TAttCanvas, module HROOT.Core.TAttFill,+ module HROOT.Core.TAttLine, module HROOT.Core.TAttMarker,+ module HROOT.Core.TAttPad, module HROOT.Core.TAttText,+ module HROOT.Core.TClass, module HROOT.Core.TCollection,+ module HROOT.Core.TColor, module HROOT.Core.TDatime,+ module HROOT.Core.TDictionary, module HROOT.Core.TDirectory,+ module HROOT.Core.TGlobal, module HROOT.Core.TKey,+ module HROOT.Core.TMutex, module HROOT.Core.TNamed,+ module HROOT.Core.TObjArray, module HROOT.Core.TObject,+ module HROOT.Core.TQObject, module HROOT.Core.TROOT,+ module HROOT.Core.TSeqCollection, module HROOT.Core.TStyle,+ module HROOT.Core.TSystem, module HROOT.Core.TVirtualMutex,+ module HROOT.Core.TVirtualPad, module HROOT.Core.Ordinary,+ module HROOT.Core.Template, module HROOT.Core.TH)+ where+import HROOT.Core.Rectangle_t import HROOT.Core.TApplication import HROOT.Core.TArray import HROOT.Core.TArrayC@@ -50,6 +36,7 @@ import HROOT.Core.TAtt3D import HROOT.Core.TAttAxis import HROOT.Core.TAttBBox+import HROOT.Core.TAttBBox2D import HROOT.Core.TAttCanvas import HROOT.Core.TAttFill import HROOT.Core.TAttLine@@ -58,37 +45,23 @@ import HROOT.Core.TAttText import HROOT.Core.TClass import HROOT.Core.TCollection+import HROOT.Core.TColor+import HROOT.Core.TDatime import HROOT.Core.TDictionary import HROOT.Core.TDirectory import HROOT.Core.TGlobal import HROOT.Core.TKey+import HROOT.Core.TMutex import HROOT.Core.TNamed import HROOT.Core.TObjArray import HROOT.Core.TObject import HROOT.Core.TQObject import HROOT.Core.TROOT import HROOT.Core.TSeqCollection+import HROOT.Core.TStyle import HROOT.Core.TSystem+import HROOT.Core.TVirtualMutex import HROOT.Core.TVirtualPad--import Foreign.C-import Foreign.Ptr-import FFICXX.Runtime.Cast-import HROOT.Core.TROOT.RawType-import HROOT.Core.TSystem.RawType-foreign import ccall safe "HROOT-coreTopLevel.h TopLevel_GetROOT"- c_getroot :: IO (Ptr RawTROOT)-foreign import ccall safe "HROOT-coreTopLevel.h TopLevel_gROOT"- c_groot :: IO (Ptr RawTROOT)-foreign import ccall safe "HROOT-coreTopLevel.h TopLevel_gSystem"- c_gsystem :: IO (Ptr RawTSystem)--getROOT :: IO TROOT-getROOT = xformnull c_getroot--gROOT :: IO TROOT-gROOT = xformnull c_groot--gSystem :: IO TSystem-gSystem = xformnull c_gsystem-+import HROOT.Core.Template+import HROOT.Core.TH+import HROOT.Core.Ordinary
− src/HROOT/Core/Deletable.hs
@@ -1,4 +0,0 @@-module HROOT.Core.Deletable (IDeletable(..)) where-import HROOT.Core.Deletable.RawType-import HROOT.Core.Deletable.Interface-import HROOT.Core.Deletable.Implementation
− src/HROOT/Core/Deletable/Cast.hs
@@ -1,9 +0,0 @@-{-# LANGUAGE FlexibleInstances, FlexibleContexts, TypeFamilies,- MultiParamTypeClasses, OverlappingInstances, IncoherentInstances- #-}-module HROOT.Core.Deletable.Cast where-import Foreign.Ptr-import FFICXX.Runtime.Cast-import System.IO.Unsafe-import HROOT.Core.Deletable.RawType-import HROOT.Core.Deletable.Interface
− src/HROOT/Core/Deletable/FFI.hsc
@@ -1,5 +0,0 @@-{-# LANGUAGE ForeignFunctionInterface #-}-module HROOT.Core.Deletable.FFI where-import Foreign.C-import Foreign.Ptr-import HROOT.Core.Deletable.RawType
− src/HROOT/Core/Deletable/Implementation.hs
@@ -1,14 +0,0 @@-{-# LANGUAGE EmptyDataDecls, FlexibleContexts, FlexibleInstances,- ForeignFunctionInterface, IncoherentInstances,- MultiParamTypeClasses, OverlappingInstances, TypeFamilies,- TypeSynonymInstances #-}-module HROOT.Core.Deletable.Implementation where-import FFICXX.Runtime.Cast-import Data.Word-import Foreign.C-import Foreign.Ptr-import System.IO.Unsafe-import HROOT.Core.Deletable.RawType-import HROOT.Core.Deletable.FFI-import HROOT.Core.Deletable.Interface-import HROOT.Core.Deletable.Cast
− src/HROOT/Core/Deletable/Interface.hs
@@ -1,13 +0,0 @@-{-# LANGUAGE EmptyDataDecls, ExistentialQuantification,- FlexibleContexts, FlexibleInstances, ForeignFunctionInterface,- MultiParamTypeClasses, ScopedTypeVariables, TypeFamilies,- TypeSynonymInstances #-}-module HROOT.Core.Deletable.Interface where-import Data.Word-import Foreign.C-import Foreign.Ptr-import FFICXX.Runtime.Cast-import HROOT.Core.Deletable.RawType--class IDeletable a where- delete :: a -> IO ()
− src/HROOT/Core/Deletable/RawType.hs
@@ -1,6 +0,0 @@-{-# LANGUAGE ForeignFunctionInterface, TypeFamilies,- MultiParamTypeClasses, FlexibleInstances, TypeSynonymInstances,- EmptyDataDecls, ExistentialQuantification, ScopedTypeVariables #-}-module HROOT.Core.Deletable.RawType where-import Foreign.Ptr-import FFICXX.Runtime.Cast
+ src/HROOT/Core/Ordinary.hs view
@@ -0,0 +1,45 @@+{-# LANGUAGE FlexibleContexts, FlexibleInstances,+ ForeignFunctionInterface, InterruptibleFFI #-}+module HROOT.Core.Ordinary (getROOT, gROOT, gSystem, gStyle) where+import Foreign.C+import Foreign.Ptr+import FFICXX.Runtime.Cast+import HROOT.Core.TROOT.RawType+import HROOT.Core.TROOT.Cast+import HROOT.Core.TROOT.Interface+import HROOT.Core.TROOT.RawType+import HROOT.Core.TROOT.Cast+import HROOT.Core.TROOT.Interface+import HROOT.Core.TSystem.RawType+import HROOT.Core.TSystem.Cast+import HROOT.Core.TSystem.Interface+import HROOT.Core.TStyle.RawType+import HROOT.Core.TStyle.Cast+import HROOT.Core.TStyle.Interface++foreign import ccall interruptible+ "HROOT-coreTopLevel.h TopLevel_GetROOT" c_getroot ::+ IO (Ptr RawTROOT)++foreign import ccall interruptible+ "HROOT-coreTopLevel.h TopLevel_gROOT" c_groot :: IO (Ptr RawTROOT)++foreign import ccall interruptible+ "HROOT-coreTopLevel.h TopLevel_gSystem" c_gsystem ::+ IO (Ptr RawTSystem)++foreign import ccall interruptible+ "HROOT-coreTopLevel.h TopLevel_gStyle" c_gstyle ::+ IO (Ptr RawTStyle)++getROOT :: () => IO TROOT+getROOT = xformnull c_getroot++gROOT :: IO TROOT+gROOT = xformnull c_groot++gSystem :: IO TSystem+gSystem = xformnull c_gsystem++gStyle :: IO TStyle+gStyle = xformnull c_gstyle
+ src/HROOT/Core/Rectangle_t.hs view
@@ -0,0 +1,7 @@+module HROOT.Core.Rectangle_t+ (Rectangle_t(..), IRectangle_t, upcastRectangle_t,+ downcastRectangle_t)+ where+import HROOT.Core.Rectangle_t.RawType+import HROOT.Core.Rectangle_t.Interface+import HROOT.Core.Rectangle_t.Implementation
+ src/HROOT/Core/Rectangle_t/Cast.hs view
@@ -0,0 +1,19 @@+{-# LANGUAGE FlexibleInstances, FlexibleContexts, TypeFamilies,+ MultiParamTypeClasses, OverlappingInstances, IncoherentInstances+ #-}+module HROOT.Core.Rectangle_t.Cast where+import Foreign.Ptr+import FFICXX.Runtime.Cast+import System.IO.Unsafe+import HROOT.Core.Rectangle_t.RawType+import HROOT.Core.Rectangle_t.Interface++instance (IRectangle_t a, FPtr a) =>+ Castable (a) (Ptr RawRectangle_t)+ where+ cast x f = f (castPtr (get_fptr x))+ uncast x f = f (cast_fptr_to_obj (castPtr x))++instance () => Castable (Rectangle_t) (Ptr RawRectangle_t) where+ cast x f = f (castPtr (get_fptr x))+ uncast x f = f (cast_fptr_to_obj (castPtr x))
+ src/HROOT/Core/Rectangle_t/FFI.hsc view
@@ -0,0 +1,36 @@+{-# LANGUAGE ForeignFunctionInterface, InterruptibleFFI #-}+module HROOT.Core.Rectangle_t.FFI where+import Data.Word+import Data.Int+import Foreign.C+import Foreign.Ptr+import HROOT.Core.Rectangle_t.RawType+import HROOT.Core.Rectangle_t.RawType++foreign import ccall interruptible+ "HROOTCoreRectangle_t.h Rectangle_t_delete" c_rectangle_t_delete ::+ Ptr RawRectangle_t -> IO ()++foreign import ccall interruptible "Rectangle_t_fHeight_get"+ c_rectangle_t_fheight_get :: Ptr RawRectangle_t -> IO CUShort++foreign import ccall interruptible "Rectangle_t_fHeight_set"+ c_rectangle_t_fheight_set :: Ptr RawRectangle_t -> CUShort -> IO ()++foreign import ccall interruptible "Rectangle_t_fWidth_get"+ c_rectangle_t_fwidth_get :: Ptr RawRectangle_t -> IO CUShort++foreign import ccall interruptible "Rectangle_t_fWidth_set"+ c_rectangle_t_fwidth_set :: Ptr RawRectangle_t -> CUShort -> IO ()++foreign import ccall interruptible "Rectangle_t_fX_get"+ c_rectangle_t_fx_get :: Ptr RawRectangle_t -> IO CShort++foreign import ccall interruptible "Rectangle_t_fX_set"+ c_rectangle_t_fx_set :: Ptr RawRectangle_t -> CShort -> IO ()++foreign import ccall interruptible "Rectangle_t_fY_get"+ c_rectangle_t_fy_get :: Ptr RawRectangle_t -> IO CShort++foreign import ccall interruptible "Rectangle_t_fY_set"+ c_rectangle_t_fy_set :: Ptr RawRectangle_t -> CShort -> IO ()
+ src/HROOT/Core/Rectangle_t/Implementation.hs view
@@ -0,0 +1,55 @@+{-# LANGUAGE EmptyDataDecls, FlexibleContexts, FlexibleInstances,+ ForeignFunctionInterface, IncoherentInstances,+ MultiParamTypeClasses, OverlappingInstances, TemplateHaskell,+ TypeFamilies, TypeSynonymInstances #-}+module HROOT.Core.Rectangle_t.Implementation where+import Data.Monoid+import Data.Word+import Data.Int+import Foreign.C+import Foreign.Ptr+import Language.Haskell.TH+import Language.Haskell.TH.Syntax+import System.IO.Unsafe+import FFICXX.Runtime.Cast+import FFICXX.Runtime.CodeGen.Cxx+import FFICXX.Runtime.TH+import HROOT.Core.Rectangle_t.RawType+import HROOT.Core.Rectangle_t.FFI+import HROOT.Core.Rectangle_t.Interface+import HROOT.Core.Rectangle_t.Cast+import HROOT.Core.Rectangle_t.RawType+import HROOT.Core.Rectangle_t.Cast+import HROOT.Core.Rectangle_t.Interface+import STD.Deletable.RawType+import STD.Deletable.Cast+import STD.Deletable.Interface++instance () => IRectangle_t (Rectangle_t) where++instance () => IDeletable (Rectangle_t) where+ delete = xform0 c_rectangle_t_delete++rectangle_t_fHeight_get :: () => Rectangle_t -> IO CUShort+rectangle_t_fHeight_get = xform0 c_rectangle_t_fheight_get++rectangle_t_fHeight_set :: () => Rectangle_t -> CUShort -> IO ()+rectangle_t_fHeight_set = xform1 c_rectangle_t_fheight_set++rectangle_t_fWidth_get :: () => Rectangle_t -> IO CUShort+rectangle_t_fWidth_get = xform0 c_rectangle_t_fwidth_get++rectangle_t_fWidth_set :: () => Rectangle_t -> CUShort -> IO ()+rectangle_t_fWidth_set = xform1 c_rectangle_t_fwidth_set++rectangle_t_fX_get :: () => Rectangle_t -> IO CShort+rectangle_t_fX_get = xform0 c_rectangle_t_fx_get++rectangle_t_fX_set :: () => Rectangle_t -> CShort -> IO ()+rectangle_t_fX_set = xform1 c_rectangle_t_fx_set++rectangle_t_fY_get :: () => Rectangle_t -> IO CShort+rectangle_t_fY_get = xform0 c_rectangle_t_fy_get++rectangle_t_fY_set :: () => Rectangle_t -> CShort -> IO ()+rectangle_t_fY_set = xform1 c_rectangle_t_fy_set
+ src/HROOT/Core/Rectangle_t/Interface.hs view
@@ -0,0 +1,28 @@+{-# LANGUAGE EmptyDataDecls, ExistentialQuantification,+ FlexibleContexts, FlexibleInstances, ForeignFunctionInterface,+ MultiParamTypeClasses, ScopedTypeVariables, TypeFamilies,+ TypeSynonymInstances #-}+module HROOT.Core.Rectangle_t.Interface where+import Data.Word+import Data.Int+import Foreign.C+import Foreign.Ptr+import FFICXX.Runtime.Cast+import HROOT.Core.Rectangle_t.RawType+import STD.Deletable.Interface++class (IDeletable a) => IRectangle_t a where++upcastRectangle_t ::+ forall a . (FPtr a, IRectangle_t a) => a -> Rectangle_t+upcastRectangle_t h+ = let fh = get_fptr h+ fh2 :: Ptr RawRectangle_t = castPtr fh+ in cast_fptr_to_obj fh2++downcastRectangle_t ::+ forall a . (FPtr a, IRectangle_t a) => Rectangle_t -> a+downcastRectangle_t h+ = let fh = get_fptr h+ fh2 = castPtr fh+ in cast_fptr_to_obj fh2
+ src/HROOT/Core/Rectangle_t/RawType.hs view
@@ -0,0 +1,16 @@+{-# LANGUAGE ForeignFunctionInterface, TypeFamilies,+ MultiParamTypeClasses, FlexibleInstances, TypeSynonymInstances,+ EmptyDataDecls, ExistentialQuantification, ScopedTypeVariables #-}+module HROOT.Core.Rectangle_t.RawType where+import Foreign.Ptr+import FFICXX.Runtime.Cast++data RawRectangle_t++newtype Rectangle_t = Rectangle_t (Ptr RawRectangle_t)+ deriving (Eq, Ord, Show)++instance () => FPtr (Rectangle_t) where+ type Raw Rectangle_t = RawRectangle_t+ get_fptr (Rectangle_t ptr) = ptr+ cast_fptr_to_obj = Rectangle_t
src/HROOT/Core/TApplication/Cast.hs view
@@ -8,11 +8,12 @@ import HROOT.Core.TApplication.RawType import HROOT.Core.TApplication.Interface -instance (ITApplication a, FPtr a) => Castable a- (Ptr RawTApplication) where+instance (ITApplication a, FPtr a) =>+ Castable (a) (Ptr RawTApplication)+ where cast x f = f (castPtr (get_fptr x)) uncast x f = f (cast_fptr_to_obj (castPtr x)) -instance Castable TApplication (Ptr RawTApplication) where+instance () => Castable (TApplication) (Ptr RawTApplication) where cast x f = f (castPtr (get_fptr x)) uncast x f = f (cast_fptr_to_obj (castPtr x))
src/HROOT/Core/TApplication/FFI.hsc view
@@ -1,54 +1,64 @@-{-# LANGUAGE ForeignFunctionInterface #-}+{-# LANGUAGE ForeignFunctionInterface, InterruptibleFFI #-} module HROOT.Core.TApplication.FFI where+import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr import HROOT.Core.TApplication.RawType+import HROOT.Core.TApplication.RawType import HROOT.Core.TObject.RawType import HROOT.Core.TClass.RawType -foreign import ccall safe+foreign import ccall interruptible+ "HROOTCoreTApplication.h TApplication_Clear" c_tapplication_clear+ :: Ptr RawTApplication -> CString -> IO ()++foreign import ccall interruptible "HROOTCoreTApplication.h TApplication_Draw" c_tapplication_draw :: Ptr RawTApplication -> CString -> IO () -foreign import ccall safe+foreign import ccall interruptible "HROOTCoreTApplication.h TApplication_FindObject" c_tapplication_findobject :: Ptr RawTApplication -> CString -> IO (Ptr RawTObject) -foreign import ccall safe+foreign import ccall interruptible "HROOTCoreTApplication.h TApplication_GetName" c_tapplication_getname :: Ptr RawTApplication -> IO CString -foreign import ccall safe+foreign import ccall interruptible "HROOTCoreTApplication.h TApplication_IsA" c_tapplication_isa :: Ptr RawTApplication -> IO (Ptr RawTClass) -foreign import ccall safe+foreign import ccall interruptible "HROOTCoreTApplication.h TApplication_Paint" c_tapplication_paint :: Ptr RawTApplication -> CString -> IO () -foreign import ccall safe+foreign import ccall interruptible "HROOTCoreTApplication.h TApplication_printObj" c_tapplication_printobj :: Ptr RawTApplication -> CString -> IO () -foreign import ccall safe+foreign import ccall interruptible "HROOTCoreTApplication.h TApplication_SaveAs" c_tapplication_saveas :: Ptr RawTApplication -> CString -> CString -> IO () -foreign import ccall safe+foreign import ccall interruptible "HROOTCoreTApplication.h TApplication_Write" c_tapplication_write :: Ptr RawTApplication -> CString -> CInt -> CInt -> IO CInt -foreign import ccall safe+foreign import ccall interruptible+ "HROOTCoreTApplication.h TApplication_Write_" c_tapplication_write_+ :: Ptr RawTApplication -> IO CInt++foreign import ccall interruptible "HROOTCoreTApplication.h TApplication_delete" c_tapplication_delete :: Ptr RawTApplication -> IO () -foreign import ccall safe+foreign import ccall interruptible "HROOTCoreTApplication.h TApplication_newTApplication" c_tapplication_newtapplication ::- CString ->- (Ptr CInt) -> (Ptr (CString)) -> IO (Ptr RawTApplication)+ CString -> Ptr CInt -> Ptr CString -> IO (Ptr RawTApplication) -foreign import ccall safe+foreign import ccall interruptible "HROOTCoreTApplication.h TApplication_Run" c_tapplication_run ::- Ptr RawTApplication -> CInt -> IO ()+ Ptr RawTApplication -> CBool -> IO ()
src/HROOT/Core/TApplication/Implementation.hs view
@@ -1,17 +1,26 @@ {-# LANGUAGE EmptyDataDecls, FlexibleContexts, FlexibleInstances, ForeignFunctionInterface, IncoherentInstances,- MultiParamTypeClasses, OverlappingInstances, TypeFamilies,- TypeSynonymInstances #-}+ MultiParamTypeClasses, OverlappingInstances, TemplateHaskell,+ TypeFamilies, TypeSynonymInstances #-} module HROOT.Core.TApplication.Implementation where-import FFICXX.Runtime.Cast+import Data.Monoid import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr+import Language.Haskell.TH+import Language.Haskell.TH.Syntax import System.IO.Unsafe+import FFICXX.Runtime.Cast+import FFICXX.Runtime.CodeGen.Cxx+import FFICXX.Runtime.TH import HROOT.Core.TApplication.RawType import HROOT.Core.TApplication.FFI import HROOT.Core.TApplication.Interface import HROOT.Core.TApplication.Cast+import HROOT.Core.TApplication.RawType+import HROOT.Core.TApplication.Cast+import HROOT.Core.TApplication.Interface import HROOT.Core.TClass.RawType import HROOT.Core.TClass.Cast import HROOT.Core.TClass.Interface@@ -21,14 +30,15 @@ import HROOT.Core.TQObject.RawType import HROOT.Core.TQObject.Cast import HROOT.Core.TQObject.Interface-import HROOT.Core.Deletable.RawType-import HROOT.Core.Deletable.Cast-import HROOT.Core.Deletable.Interface+import STD.Deletable.RawType+import STD.Deletable.Cast+import STD.Deletable.Interface -instance ITApplication TApplication where+instance () => ITApplication (TApplication) where run = xform1 c_tapplication_run -instance ITObject TApplication where+instance () => ITObject (TApplication) where+ clear = xform1 c_tapplication_clear draw = xform1 c_tapplication_draw findObject = xform1 c_tapplication_findobject getName = xform0 c_tapplication_getname@@ -37,13 +47,14 @@ printObj = xform1 c_tapplication_printobj saveAs = xform2 c_tapplication_saveas write = xform3 c_tapplication_write+ write_ = xform0 c_tapplication_write_ -instance ITQObject TApplication+instance () => ITQObject (TApplication) where -instance IDeletable TApplication where+instance () => IDeletable (TApplication) where delete = xform0 c_tapplication_delete newTApplication ::- Castable c0 CString =>- c0 -> (Ptr CInt) -> (Ptr CString) -> IO TApplication+ (Castable c0 CString) =>+ c0 -> Ptr CInt -> Ptr CString -> IO TApplication newTApplication = xform2 c_tapplication_newtapplication
src/HROOT/Core/TApplication/Interface.hs view
@@ -4,6 +4,7 @@ TypeSynonymInstances #-} module HROOT.Core.TApplication.Interface where import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr import FFICXX.Runtime.Cast@@ -12,7 +13,7 @@ import HROOT.Core.TQObject.Interface class (ITObject a, ITQObject a) => ITApplication a where- run :: a -> CInt -> IO ()+ run :: () => a -> CBool -> IO () upcastTApplication :: forall a . (FPtr a, ITApplication a) => a -> TApplication
src/HROOT/Core/TApplication/RawType.hs view
@@ -8,9 +8,9 @@ data RawTApplication newtype TApplication = TApplication (Ptr RawTApplication)- deriving (Eq, Ord, Show)+ deriving (Eq, Ord, Show) -instance FPtr TApplication where+instance () => FPtr (TApplication) where type Raw TApplication = RawTApplication get_fptr (TApplication ptr) = ptr cast_fptr_to_obj = TApplication
src/HROOT/Core/TArray.hs view
@@ -1,5 +1,7 @@ module HROOT.Core.TArray- (TArray(..), ITArray, upcastTArray, downcastTArray) where+ (TArray(..), ITArray(..), upcastTArray, downcastTArray,+ tArray_GetSize)+ where import HROOT.Core.TArray.RawType import HROOT.Core.TArray.Interface import HROOT.Core.TArray.Implementation
src/HROOT/Core/TArray/Cast.hs view
@@ -8,10 +8,10 @@ import HROOT.Core.TArray.RawType import HROOT.Core.TArray.Interface -instance (ITArray a, FPtr a) => Castable a (Ptr RawTArray) where+instance (ITArray a, FPtr a) => Castable (a) (Ptr RawTArray) where cast x f = f (castPtr (get_fptr x)) uncast x f = f (cast_fptr_to_obj (castPtr x)) -instance Castable TArray (Ptr RawTArray) where+instance () => Castable (TArray) (Ptr RawTArray) where cast x f = f (castPtr (get_fptr x)) uncast x f = f (cast_fptr_to_obj (castPtr x))
src/HROOT/Core/TArray/FFI.hsc view
@@ -1,8 +1,26 @@-{-# LANGUAGE ForeignFunctionInterface #-}+{-# LANGUAGE ForeignFunctionInterface, InterruptibleFFI #-} module HROOT.Core.TArray.FFI where+import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr import HROOT.Core.TArray.RawType+import HROOT.Core.TArray.RawType -foreign import ccall safe "HROOTCoreTArray.h TArray_delete"- c_tarray_delete :: Ptr RawTArray -> IO ()+foreign import ccall interruptible+ "HROOTCoreTArray.h TArray_delete" c_tarray_delete ::+ Ptr RawTArray -> IO ()++foreign import ccall interruptible "HROOTCoreTArray.h TArray_GetAt"+ c_tarray_getat :: Ptr RawTArray -> CInt -> IO CDouble++foreign import ccall interruptible+ "HROOTCoreTArray.h TArray_tArray_GetSize" c_tarray_tarray_getsize+ :: Ptr RawTArray -> IO CInt++foreign import ccall interruptible+ "HROOTCoreTArray.h TArray_SetArray" c_tarray_setarray ::+ Ptr RawTArray -> CInt -> IO ()++foreign import ccall interruptible "HROOTCoreTArray.h TArray_SetAt"+ c_tarray_setat :: Ptr RawTArray -> CDouble -> CInt -> IO ()
src/HROOT/Core/TArray/Implementation.hs view
@@ -1,22 +1,37 @@ {-# LANGUAGE EmptyDataDecls, FlexibleContexts, FlexibleInstances, ForeignFunctionInterface, IncoherentInstances,- MultiParamTypeClasses, OverlappingInstances, TypeFamilies,- TypeSynonymInstances #-}+ MultiParamTypeClasses, OverlappingInstances, TemplateHaskell,+ TypeFamilies, TypeSynonymInstances #-} module HROOT.Core.TArray.Implementation where-import FFICXX.Runtime.Cast+import Data.Monoid import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr+import Language.Haskell.TH+import Language.Haskell.TH.Syntax import System.IO.Unsafe+import FFICXX.Runtime.Cast+import FFICXX.Runtime.CodeGen.Cxx+import FFICXX.Runtime.TH import HROOT.Core.TArray.RawType import HROOT.Core.TArray.FFI import HROOT.Core.TArray.Interface import HROOT.Core.TArray.Cast-import HROOT.Core.Deletable.RawType-import HROOT.Core.Deletable.Cast-import HROOT.Core.Deletable.Interface+import HROOT.Core.TArray.RawType+import HROOT.Core.TArray.Cast+import HROOT.Core.TArray.Interface+import STD.Deletable.RawType+import STD.Deletable.Cast+import STD.Deletable.Interface -instance ITArray TArray+instance () => ITArray (TArray) where+ getAt = xform1 c_tarray_getat+ setArray = xform1 c_tarray_setarray+ setAt = xform2 c_tarray_setat -instance IDeletable TArray where+instance () => IDeletable (TArray) where delete = xform0 c_tarray_delete++tArray_GetSize :: () => TArray -> IO CInt+tArray_GetSize = xform0 c_tarray_tarray_getsize
src/HROOT/Core/TArray/Interface.hs view
@@ -4,13 +4,19 @@ TypeSynonymInstances #-} module HROOT.Core.TArray.Interface where import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr import FFICXX.Runtime.Cast import HROOT.Core.TArray.RawType-import HROOT.Core.Deletable.Interface+import STD.Deletable.Interface -class IDeletable a => ITArray a+class (IDeletable a) => ITArray a where+ getAt :: () => a -> CInt -> IO CDouble+ + setArray :: () => a -> CInt -> IO ()+ + setAt :: () => a -> CDouble -> CInt -> IO () upcastTArray :: forall a . (FPtr a, ITArray a) => a -> TArray upcastTArray h
src/HROOT/Core/TArray/RawType.hs view
@@ -8,9 +8,9 @@ data RawTArray newtype TArray = TArray (Ptr RawTArray)- deriving (Eq, Ord, Show)+ deriving (Eq, Ord, Show) -instance FPtr TArray where+instance () => FPtr (TArray) where type Raw TArray = RawTArray get_fptr (TArray ptr) = ptr cast_fptr_to_obj = TArray
src/HROOT/Core/TArrayC/Cast.hs view
@@ -8,10 +8,11 @@ import HROOT.Core.TArrayC.RawType import HROOT.Core.TArrayC.Interface -instance (ITArrayC a, FPtr a) => Castable a (Ptr RawTArrayC) where+instance (ITArrayC a, FPtr a) => Castable (a) (Ptr RawTArrayC)+ where cast x f = f (castPtr (get_fptr x)) uncast x f = f (cast_fptr_to_obj (castPtr x)) -instance Castable TArrayC (Ptr RawTArrayC) where+instance () => Castable (TArrayC) (Ptr RawTArrayC) where cast x f = f (castPtr (get_fptr x)) uncast x f = f (cast_fptr_to_obj (castPtr x))
src/HROOT/Core/TArrayC/FFI.hsc view
@@ -1,8 +1,24 @@-{-# LANGUAGE ForeignFunctionInterface #-}+{-# LANGUAGE ForeignFunctionInterface, InterruptibleFFI #-} module HROOT.Core.TArrayC.FFI where+import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr import HROOT.Core.TArrayC.RawType+import HROOT.Core.TArrayC.RawType -foreign import ccall safe "HROOTCoreTArrayC.h TArrayC_delete"- c_tarrayc_delete :: Ptr RawTArrayC -> IO ()+foreign import ccall interruptible+ "HROOTCoreTArrayC.h TArrayC_GetAt" c_tarrayc_getat ::+ Ptr RawTArrayC -> CInt -> IO CDouble++foreign import ccall interruptible+ "HROOTCoreTArrayC.h TArrayC_SetArray" c_tarrayc_setarray ::+ Ptr RawTArrayC -> CInt -> IO ()++foreign import ccall interruptible+ "HROOTCoreTArrayC.h TArrayC_SetAt" c_tarrayc_setat ::+ Ptr RawTArrayC -> CDouble -> CInt -> IO ()++foreign import ccall interruptible+ "HROOTCoreTArrayC.h TArrayC_delete" c_tarrayc_delete ::+ Ptr RawTArrayC -> IO ()
src/HROOT/Core/TArrayC/Implementation.hs view
@@ -1,27 +1,39 @@ {-# LANGUAGE EmptyDataDecls, FlexibleContexts, FlexibleInstances, ForeignFunctionInterface, IncoherentInstances,- MultiParamTypeClasses, OverlappingInstances, TypeFamilies,- TypeSynonymInstances #-}+ MultiParamTypeClasses, OverlappingInstances, TemplateHaskell,+ TypeFamilies, TypeSynonymInstances #-} module HROOT.Core.TArrayC.Implementation where-import FFICXX.Runtime.Cast+import Data.Monoid import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr+import Language.Haskell.TH+import Language.Haskell.TH.Syntax import System.IO.Unsafe+import FFICXX.Runtime.Cast+import FFICXX.Runtime.CodeGen.Cxx+import FFICXX.Runtime.TH import HROOT.Core.TArrayC.RawType import HROOT.Core.TArrayC.FFI import HROOT.Core.TArrayC.Interface import HROOT.Core.TArrayC.Cast+import HROOT.Core.TArrayC.RawType+import HROOT.Core.TArrayC.Cast+import HROOT.Core.TArrayC.Interface import HROOT.Core.TArray.RawType import HROOT.Core.TArray.Cast import HROOT.Core.TArray.Interface-import HROOT.Core.Deletable.RawType-import HROOT.Core.Deletable.Cast-import HROOT.Core.Deletable.Interface+import STD.Deletable.RawType+import STD.Deletable.Cast+import STD.Deletable.Interface -instance ITArrayC TArrayC+instance () => ITArrayC (TArrayC) where -instance ITArray TArrayC+instance () => ITArray (TArrayC) where+ getAt = xform1 c_tarrayc_getat+ setArray = xform1 c_tarrayc_setarray+ setAt = xform2 c_tarrayc_setat -instance IDeletable TArrayC where+instance () => IDeletable (TArrayC) where delete = xform0 c_tarrayc_delete
src/HROOT/Core/TArrayC/Interface.hs view
@@ -4,13 +4,14 @@ TypeSynonymInstances #-} module HROOT.Core.TArrayC.Interface where import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr import FFICXX.Runtime.Cast import HROOT.Core.TArrayC.RawType import HROOT.Core.TArray.Interface -class ITArray a => ITArrayC a+class (ITArray a) => ITArrayC a where upcastTArrayC :: forall a . (FPtr a, ITArrayC a) => a -> TArrayC upcastTArrayC h
src/HROOT/Core/TArrayC/RawType.hs view
@@ -8,9 +8,9 @@ data RawTArrayC newtype TArrayC = TArrayC (Ptr RawTArrayC)- deriving (Eq, Ord, Show)+ deriving (Eq, Ord, Show) -instance FPtr TArrayC where+instance () => FPtr (TArrayC) where type Raw TArrayC = RawTArrayC get_fptr (TArrayC ptr) = ptr cast_fptr_to_obj = TArrayC
src/HROOT/Core/TArrayD.hs view
@@ -1,5 +1,7 @@ module HROOT.Core.TArrayD- (TArrayD(..), ITArrayD, upcastTArrayD, downcastTArrayD) where+ (TArrayD(..), ITArrayD, upcastTArrayD, downcastTArrayD, tArrayD_At,+ tArrayD_GetArray)+ where import HROOT.Core.TArrayD.RawType import HROOT.Core.TArrayD.Interface import HROOT.Core.TArrayD.Implementation
src/HROOT/Core/TArrayD/Cast.hs view
@@ -8,10 +8,11 @@ import HROOT.Core.TArrayD.RawType import HROOT.Core.TArrayD.Interface -instance (ITArrayD a, FPtr a) => Castable a (Ptr RawTArrayD) where+instance (ITArrayD a, FPtr a) => Castable (a) (Ptr RawTArrayD)+ where cast x f = f (castPtr (get_fptr x)) uncast x f = f (cast_fptr_to_obj (castPtr x)) -instance Castable TArrayD (Ptr RawTArrayD) where+instance () => Castable (TArrayD) (Ptr RawTArrayD) where cast x f = f (castPtr (get_fptr x)) uncast x f = f (cast_fptr_to_obj (castPtr x))
src/HROOT/Core/TArrayD/FFI.hsc view
@@ -1,8 +1,32 @@-{-# LANGUAGE ForeignFunctionInterface #-}+{-# LANGUAGE ForeignFunctionInterface, InterruptibleFFI #-} module HROOT.Core.TArrayD.FFI where+import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr import HROOT.Core.TArrayD.RawType+import HROOT.Core.TArrayD.RawType -foreign import ccall safe "HROOTCoreTArrayD.h TArrayD_delete"- c_tarrayd_delete :: Ptr RawTArrayD -> IO ()+foreign import ccall interruptible+ "HROOTCoreTArrayD.h TArrayD_GetAt" c_tarrayd_getat ::+ Ptr RawTArrayD -> CInt -> IO CDouble++foreign import ccall interruptible+ "HROOTCoreTArrayD.h TArrayD_SetArray" c_tarrayd_setarray ::+ Ptr RawTArrayD -> CInt -> IO ()++foreign import ccall interruptible+ "HROOTCoreTArrayD.h TArrayD_SetAt" c_tarrayd_setat ::+ Ptr RawTArrayD -> CDouble -> CInt -> IO ()++foreign import ccall interruptible+ "HROOTCoreTArrayD.h TArrayD_delete" c_tarrayd_delete ::+ Ptr RawTArrayD -> IO ()++foreign import ccall interruptible+ "HROOTCoreTArrayD.h TArrayD_tArrayD_At" c_tarrayd_tarrayd_at ::+ Ptr RawTArrayD -> CInt -> IO CDouble++foreign import ccall interruptible+ "HROOTCoreTArrayD.h TArrayD_tArrayD_GetArray"+ c_tarrayd_tarrayd_getarray :: Ptr RawTArrayD -> IO (Ptr CDouble)
src/HROOT/Core/TArrayD/Implementation.hs view
@@ -1,27 +1,45 @@ {-# LANGUAGE EmptyDataDecls, FlexibleContexts, FlexibleInstances, ForeignFunctionInterface, IncoherentInstances,- MultiParamTypeClasses, OverlappingInstances, TypeFamilies,- TypeSynonymInstances #-}+ MultiParamTypeClasses, OverlappingInstances, TemplateHaskell,+ TypeFamilies, TypeSynonymInstances #-} module HROOT.Core.TArrayD.Implementation where-import FFICXX.Runtime.Cast+import Data.Monoid import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr+import Language.Haskell.TH+import Language.Haskell.TH.Syntax import System.IO.Unsafe+import FFICXX.Runtime.Cast+import FFICXX.Runtime.CodeGen.Cxx+import FFICXX.Runtime.TH import HROOT.Core.TArrayD.RawType import HROOT.Core.TArrayD.FFI import HROOT.Core.TArrayD.Interface import HROOT.Core.TArrayD.Cast+import HROOT.Core.TArrayD.RawType+import HROOT.Core.TArrayD.Cast+import HROOT.Core.TArrayD.Interface import HROOT.Core.TArray.RawType import HROOT.Core.TArray.Cast import HROOT.Core.TArray.Interface-import HROOT.Core.Deletable.RawType-import HROOT.Core.Deletable.Cast-import HROOT.Core.Deletable.Interface+import STD.Deletable.RawType+import STD.Deletable.Cast+import STD.Deletable.Interface -instance ITArrayD TArrayD+instance () => ITArrayD (TArrayD) where -instance ITArray TArrayD+instance () => ITArray (TArrayD) where+ getAt = xform1 c_tarrayd_getat+ setArray = xform1 c_tarrayd_setarray+ setAt = xform2 c_tarrayd_setat -instance IDeletable TArrayD where+instance () => IDeletable (TArrayD) where delete = xform0 c_tarrayd_delete++tArrayD_At :: () => TArrayD -> CInt -> IO CDouble+tArrayD_At = xform1 c_tarrayd_tarrayd_at++tArrayD_GetArray :: () => TArrayD -> IO (Ptr CDouble)+tArrayD_GetArray = xform0 c_tarrayd_tarrayd_getarray
src/HROOT/Core/TArrayD/Interface.hs view
@@ -4,13 +4,14 @@ TypeSynonymInstances #-} module HROOT.Core.TArrayD.Interface where import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr import FFICXX.Runtime.Cast import HROOT.Core.TArrayD.RawType import HROOT.Core.TArray.Interface -class ITArray a => ITArrayD a+class (ITArray a) => ITArrayD a where upcastTArrayD :: forall a . (FPtr a, ITArrayD a) => a -> TArrayD upcastTArrayD h
src/HROOT/Core/TArrayD/RawType.hs view
@@ -8,9 +8,9 @@ data RawTArrayD newtype TArrayD = TArrayD (Ptr RawTArrayD)- deriving (Eq, Ord, Show)+ deriving (Eq, Ord, Show) -instance FPtr TArrayD where+instance () => FPtr (TArrayD) where type Raw TArrayD = RawTArrayD get_fptr (TArrayD ptr) = ptr cast_fptr_to_obj = TArrayD
src/HROOT/Core/TArrayF/Cast.hs view
@@ -8,10 +8,11 @@ import HROOT.Core.TArrayF.RawType import HROOT.Core.TArrayF.Interface -instance (ITArrayF a, FPtr a) => Castable a (Ptr RawTArrayF) where+instance (ITArrayF a, FPtr a) => Castable (a) (Ptr RawTArrayF)+ where cast x f = f (castPtr (get_fptr x)) uncast x f = f (cast_fptr_to_obj (castPtr x)) -instance Castable TArrayF (Ptr RawTArrayF) where+instance () => Castable (TArrayF) (Ptr RawTArrayF) where cast x f = f (castPtr (get_fptr x)) uncast x f = f (cast_fptr_to_obj (castPtr x))
src/HROOT/Core/TArrayF/FFI.hsc view
@@ -1,8 +1,24 @@-{-# LANGUAGE ForeignFunctionInterface #-}+{-# LANGUAGE ForeignFunctionInterface, InterruptibleFFI #-} module HROOT.Core.TArrayF.FFI where+import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr import HROOT.Core.TArrayF.RawType+import HROOT.Core.TArrayF.RawType -foreign import ccall safe "HROOTCoreTArrayF.h TArrayF_delete"- c_tarrayf_delete :: Ptr RawTArrayF -> IO ()+foreign import ccall interruptible+ "HROOTCoreTArrayF.h TArrayF_GetAt" c_tarrayf_getat ::+ Ptr RawTArrayF -> CInt -> IO CDouble++foreign import ccall interruptible+ "HROOTCoreTArrayF.h TArrayF_SetArray" c_tarrayf_setarray ::+ Ptr RawTArrayF -> CInt -> IO ()++foreign import ccall interruptible+ "HROOTCoreTArrayF.h TArrayF_SetAt" c_tarrayf_setat ::+ Ptr RawTArrayF -> CDouble -> CInt -> IO ()++foreign import ccall interruptible+ "HROOTCoreTArrayF.h TArrayF_delete" c_tarrayf_delete ::+ Ptr RawTArrayF -> IO ()
src/HROOT/Core/TArrayF/Implementation.hs view
@@ -1,27 +1,39 @@ {-# LANGUAGE EmptyDataDecls, FlexibleContexts, FlexibleInstances, ForeignFunctionInterface, IncoherentInstances,- MultiParamTypeClasses, OverlappingInstances, TypeFamilies,- TypeSynonymInstances #-}+ MultiParamTypeClasses, OverlappingInstances, TemplateHaskell,+ TypeFamilies, TypeSynonymInstances #-} module HROOT.Core.TArrayF.Implementation where-import FFICXX.Runtime.Cast+import Data.Monoid import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr+import Language.Haskell.TH+import Language.Haskell.TH.Syntax import System.IO.Unsafe+import FFICXX.Runtime.Cast+import FFICXX.Runtime.CodeGen.Cxx+import FFICXX.Runtime.TH import HROOT.Core.TArrayF.RawType import HROOT.Core.TArrayF.FFI import HROOT.Core.TArrayF.Interface import HROOT.Core.TArrayF.Cast+import HROOT.Core.TArrayF.RawType+import HROOT.Core.TArrayF.Cast+import HROOT.Core.TArrayF.Interface import HROOT.Core.TArray.RawType import HROOT.Core.TArray.Cast import HROOT.Core.TArray.Interface-import HROOT.Core.Deletable.RawType-import HROOT.Core.Deletable.Cast-import HROOT.Core.Deletable.Interface+import STD.Deletable.RawType+import STD.Deletable.Cast+import STD.Deletable.Interface -instance ITArrayF TArrayF+instance () => ITArrayF (TArrayF) where -instance ITArray TArrayF+instance () => ITArray (TArrayF) where+ getAt = xform1 c_tarrayf_getat+ setArray = xform1 c_tarrayf_setarray+ setAt = xform2 c_tarrayf_setat -instance IDeletable TArrayF where+instance () => IDeletable (TArrayF) where delete = xform0 c_tarrayf_delete
src/HROOT/Core/TArrayF/Interface.hs view
@@ -4,13 +4,14 @@ TypeSynonymInstances #-} module HROOT.Core.TArrayF.Interface where import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr import FFICXX.Runtime.Cast import HROOT.Core.TArrayF.RawType import HROOT.Core.TArray.Interface -class ITArray a => ITArrayF a+class (ITArray a) => ITArrayF a where upcastTArrayF :: forall a . (FPtr a, ITArrayF a) => a -> TArrayF upcastTArrayF h
src/HROOT/Core/TArrayF/RawType.hs view
@@ -8,9 +8,9 @@ data RawTArrayF newtype TArrayF = TArrayF (Ptr RawTArrayF)- deriving (Eq, Ord, Show)+ deriving (Eq, Ord, Show) -instance FPtr TArrayF where+instance () => FPtr (TArrayF) where type Raw TArrayF = RawTArrayF get_fptr (TArrayF ptr) = ptr cast_fptr_to_obj = TArrayF
src/HROOT/Core/TArrayI/Cast.hs view
@@ -8,10 +8,11 @@ import HROOT.Core.TArrayI.RawType import HROOT.Core.TArrayI.Interface -instance (ITArrayI a, FPtr a) => Castable a (Ptr RawTArrayI) where+instance (ITArrayI a, FPtr a) => Castable (a) (Ptr RawTArrayI)+ where cast x f = f (castPtr (get_fptr x)) uncast x f = f (cast_fptr_to_obj (castPtr x)) -instance Castable TArrayI (Ptr RawTArrayI) where+instance () => Castable (TArrayI) (Ptr RawTArrayI) where cast x f = f (castPtr (get_fptr x)) uncast x f = f (cast_fptr_to_obj (castPtr x))
src/HROOT/Core/TArrayI/FFI.hsc view
@@ -1,8 +1,24 @@-{-# LANGUAGE ForeignFunctionInterface #-}+{-# LANGUAGE ForeignFunctionInterface, InterruptibleFFI #-} module HROOT.Core.TArrayI.FFI where+import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr import HROOT.Core.TArrayI.RawType+import HROOT.Core.TArrayI.RawType -foreign import ccall safe "HROOTCoreTArrayI.h TArrayI_delete"- c_tarrayi_delete :: Ptr RawTArrayI -> IO ()+foreign import ccall interruptible+ "HROOTCoreTArrayI.h TArrayI_GetAt" c_tarrayi_getat ::+ Ptr RawTArrayI -> CInt -> IO CDouble++foreign import ccall interruptible+ "HROOTCoreTArrayI.h TArrayI_SetArray" c_tarrayi_setarray ::+ Ptr RawTArrayI -> CInt -> IO ()++foreign import ccall interruptible+ "HROOTCoreTArrayI.h TArrayI_SetAt" c_tarrayi_setat ::+ Ptr RawTArrayI -> CDouble -> CInt -> IO ()++foreign import ccall interruptible+ "HROOTCoreTArrayI.h TArrayI_delete" c_tarrayi_delete ::+ Ptr RawTArrayI -> IO ()
src/HROOT/Core/TArrayI/Implementation.hs view
@@ -1,27 +1,39 @@ {-# LANGUAGE EmptyDataDecls, FlexibleContexts, FlexibleInstances, ForeignFunctionInterface, IncoherentInstances,- MultiParamTypeClasses, OverlappingInstances, TypeFamilies,- TypeSynonymInstances #-}+ MultiParamTypeClasses, OverlappingInstances, TemplateHaskell,+ TypeFamilies, TypeSynonymInstances #-} module HROOT.Core.TArrayI.Implementation where-import FFICXX.Runtime.Cast+import Data.Monoid import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr+import Language.Haskell.TH+import Language.Haskell.TH.Syntax import System.IO.Unsafe+import FFICXX.Runtime.Cast+import FFICXX.Runtime.CodeGen.Cxx+import FFICXX.Runtime.TH import HROOT.Core.TArrayI.RawType import HROOT.Core.TArrayI.FFI import HROOT.Core.TArrayI.Interface import HROOT.Core.TArrayI.Cast+import HROOT.Core.TArrayI.RawType+import HROOT.Core.TArrayI.Cast+import HROOT.Core.TArrayI.Interface import HROOT.Core.TArray.RawType import HROOT.Core.TArray.Cast import HROOT.Core.TArray.Interface-import HROOT.Core.Deletable.RawType-import HROOT.Core.Deletable.Cast-import HROOT.Core.Deletable.Interface+import STD.Deletable.RawType+import STD.Deletable.Cast+import STD.Deletable.Interface -instance ITArrayI TArrayI+instance () => ITArrayI (TArrayI) where -instance ITArray TArrayI+instance () => ITArray (TArrayI) where+ getAt = xform1 c_tarrayi_getat+ setArray = xform1 c_tarrayi_setarray+ setAt = xform2 c_tarrayi_setat -instance IDeletable TArrayI where+instance () => IDeletable (TArrayI) where delete = xform0 c_tarrayi_delete
src/HROOT/Core/TArrayI/Interface.hs view
@@ -4,13 +4,14 @@ TypeSynonymInstances #-} module HROOT.Core.TArrayI.Interface where import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr import FFICXX.Runtime.Cast import HROOT.Core.TArrayI.RawType import HROOT.Core.TArray.Interface -class ITArray a => ITArrayI a+class (ITArray a) => ITArrayI a where upcastTArrayI :: forall a . (FPtr a, ITArrayI a) => a -> TArrayI upcastTArrayI h
src/HROOT/Core/TArrayI/RawType.hs view
@@ -8,9 +8,9 @@ data RawTArrayI newtype TArrayI = TArrayI (Ptr RawTArrayI)- deriving (Eq, Ord, Show)+ deriving (Eq, Ord, Show) -instance FPtr TArrayI where+instance () => FPtr (TArrayI) where type Raw TArrayI = RawTArrayI get_fptr (TArrayI ptr) = ptr cast_fptr_to_obj = TArrayI
src/HROOT/Core/TArrayL/Cast.hs view
@@ -8,10 +8,11 @@ import HROOT.Core.TArrayL.RawType import HROOT.Core.TArrayL.Interface -instance (ITArrayL a, FPtr a) => Castable a (Ptr RawTArrayL) where+instance (ITArrayL a, FPtr a) => Castable (a) (Ptr RawTArrayL)+ where cast x f = f (castPtr (get_fptr x)) uncast x f = f (cast_fptr_to_obj (castPtr x)) -instance Castable TArrayL (Ptr RawTArrayL) where+instance () => Castable (TArrayL) (Ptr RawTArrayL) where cast x f = f (castPtr (get_fptr x)) uncast x f = f (cast_fptr_to_obj (castPtr x))
src/HROOT/Core/TArrayL/FFI.hsc view
@@ -1,8 +1,24 @@-{-# LANGUAGE ForeignFunctionInterface #-}+{-# LANGUAGE ForeignFunctionInterface, InterruptibleFFI #-} module HROOT.Core.TArrayL.FFI where+import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr import HROOT.Core.TArrayL.RawType+import HROOT.Core.TArrayL.RawType -foreign import ccall safe "HROOTCoreTArrayL.h TArrayL_delete"- c_tarrayl_delete :: Ptr RawTArrayL -> IO ()+foreign import ccall interruptible+ "HROOTCoreTArrayL.h TArrayL_GetAt" c_tarrayl_getat ::+ Ptr RawTArrayL -> CInt -> IO CDouble++foreign import ccall interruptible+ "HROOTCoreTArrayL.h TArrayL_SetArray" c_tarrayl_setarray ::+ Ptr RawTArrayL -> CInt -> IO ()++foreign import ccall interruptible+ "HROOTCoreTArrayL.h TArrayL_SetAt" c_tarrayl_setat ::+ Ptr RawTArrayL -> CDouble -> CInt -> IO ()++foreign import ccall interruptible+ "HROOTCoreTArrayL.h TArrayL_delete" c_tarrayl_delete ::+ Ptr RawTArrayL -> IO ()
src/HROOT/Core/TArrayL/Implementation.hs view
@@ -1,27 +1,39 @@ {-# LANGUAGE EmptyDataDecls, FlexibleContexts, FlexibleInstances, ForeignFunctionInterface, IncoherentInstances,- MultiParamTypeClasses, OverlappingInstances, TypeFamilies,- TypeSynonymInstances #-}+ MultiParamTypeClasses, OverlappingInstances, TemplateHaskell,+ TypeFamilies, TypeSynonymInstances #-} module HROOT.Core.TArrayL.Implementation where-import FFICXX.Runtime.Cast+import Data.Monoid import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr+import Language.Haskell.TH+import Language.Haskell.TH.Syntax import System.IO.Unsafe+import FFICXX.Runtime.Cast+import FFICXX.Runtime.CodeGen.Cxx+import FFICXX.Runtime.TH import HROOT.Core.TArrayL.RawType import HROOT.Core.TArrayL.FFI import HROOT.Core.TArrayL.Interface import HROOT.Core.TArrayL.Cast+import HROOT.Core.TArrayL.RawType+import HROOT.Core.TArrayL.Cast+import HROOT.Core.TArrayL.Interface import HROOT.Core.TArray.RawType import HROOT.Core.TArray.Cast import HROOT.Core.TArray.Interface-import HROOT.Core.Deletable.RawType-import HROOT.Core.Deletable.Cast-import HROOT.Core.Deletable.Interface+import STD.Deletable.RawType+import STD.Deletable.Cast+import STD.Deletable.Interface -instance ITArrayL TArrayL+instance () => ITArrayL (TArrayL) where -instance ITArray TArrayL+instance () => ITArray (TArrayL) where+ getAt = xform1 c_tarrayl_getat+ setArray = xform1 c_tarrayl_setarray+ setAt = xform2 c_tarrayl_setat -instance IDeletable TArrayL where+instance () => IDeletable (TArrayL) where delete = xform0 c_tarrayl_delete
src/HROOT/Core/TArrayL/Interface.hs view
@@ -4,13 +4,14 @@ TypeSynonymInstances #-} module HROOT.Core.TArrayL.Interface where import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr import FFICXX.Runtime.Cast import HROOT.Core.TArrayL.RawType import HROOT.Core.TArray.Interface -class ITArray a => ITArrayL a+class (ITArray a) => ITArrayL a where upcastTArrayL :: forall a . (FPtr a, ITArrayL a) => a -> TArrayL upcastTArrayL h
src/HROOT/Core/TArrayL/RawType.hs view
@@ -8,9 +8,9 @@ data RawTArrayL newtype TArrayL = TArrayL (Ptr RawTArrayL)- deriving (Eq, Ord, Show)+ deriving (Eq, Ord, Show) -instance FPtr TArrayL where+instance () => FPtr (TArrayL) where type Raw TArrayL = RawTArrayL get_fptr (TArrayL ptr) = ptr cast_fptr_to_obj = TArrayL
src/HROOT/Core/TArrayL64/Cast.hs view
@@ -8,11 +8,11 @@ import HROOT.Core.TArrayL64.RawType import HROOT.Core.TArrayL64.Interface -instance (ITArrayL64 a, FPtr a) => Castable a (Ptr RawTArrayL64)+instance (ITArrayL64 a, FPtr a) => Castable (a) (Ptr RawTArrayL64) where cast x f = f (castPtr (get_fptr x)) uncast x f = f (cast_fptr_to_obj (castPtr x)) -instance Castable TArrayL64 (Ptr RawTArrayL64) where+instance () => Castable (TArrayL64) (Ptr RawTArrayL64) where cast x f = f (castPtr (get_fptr x)) uncast x f = f (cast_fptr_to_obj (castPtr x))
src/HROOT/Core/TArrayL64/FFI.hsc view
@@ -1,8 +1,24 @@-{-# LANGUAGE ForeignFunctionInterface #-}+{-# LANGUAGE ForeignFunctionInterface, InterruptibleFFI #-} module HROOT.Core.TArrayL64.FFI where+import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr import HROOT.Core.TArrayL64.RawType+import HROOT.Core.TArrayL64.RawType -foreign import ccall safe "HROOTCoreTArrayL64.h TArrayL64_delete"- c_tarrayl64_delete :: Ptr RawTArrayL64 -> IO ()+foreign import ccall interruptible+ "HROOTCoreTArrayL64.h TArrayL64_GetAt" c_tarrayl64_getat ::+ Ptr RawTArrayL64 -> CInt -> IO CDouble++foreign import ccall interruptible+ "HROOTCoreTArrayL64.h TArrayL64_SetArray" c_tarrayl64_setarray ::+ Ptr RawTArrayL64 -> CInt -> IO ()++foreign import ccall interruptible+ "HROOTCoreTArrayL64.h TArrayL64_SetAt" c_tarrayl64_setat ::+ Ptr RawTArrayL64 -> CDouble -> CInt -> IO ()++foreign import ccall interruptible+ "HROOTCoreTArrayL64.h TArrayL64_delete" c_tarrayl64_delete ::+ Ptr RawTArrayL64 -> IO ()
src/HROOT/Core/TArrayL64/Implementation.hs view
@@ -1,27 +1,39 @@ {-# LANGUAGE EmptyDataDecls, FlexibleContexts, FlexibleInstances, ForeignFunctionInterface, IncoherentInstances,- MultiParamTypeClasses, OverlappingInstances, TypeFamilies,- TypeSynonymInstances #-}+ MultiParamTypeClasses, OverlappingInstances, TemplateHaskell,+ TypeFamilies, TypeSynonymInstances #-} module HROOT.Core.TArrayL64.Implementation where-import FFICXX.Runtime.Cast+import Data.Monoid import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr+import Language.Haskell.TH+import Language.Haskell.TH.Syntax import System.IO.Unsafe+import FFICXX.Runtime.Cast+import FFICXX.Runtime.CodeGen.Cxx+import FFICXX.Runtime.TH import HROOT.Core.TArrayL64.RawType import HROOT.Core.TArrayL64.FFI import HROOT.Core.TArrayL64.Interface import HROOT.Core.TArrayL64.Cast+import HROOT.Core.TArrayL64.RawType+import HROOT.Core.TArrayL64.Cast+import HROOT.Core.TArrayL64.Interface import HROOT.Core.TArray.RawType import HROOT.Core.TArray.Cast import HROOT.Core.TArray.Interface-import HROOT.Core.Deletable.RawType-import HROOT.Core.Deletable.Cast-import HROOT.Core.Deletable.Interface+import STD.Deletable.RawType+import STD.Deletable.Cast+import STD.Deletable.Interface -instance ITArrayL64 TArrayL64+instance () => ITArrayL64 (TArrayL64) where -instance ITArray TArrayL64+instance () => ITArray (TArrayL64) where+ getAt = xform1 c_tarrayl64_getat+ setArray = xform1 c_tarrayl64_setarray+ setAt = xform2 c_tarrayl64_setat -instance IDeletable TArrayL64 where+instance () => IDeletable (TArrayL64) where delete = xform0 c_tarrayl64_delete
src/HROOT/Core/TArrayL64/Interface.hs view
@@ -4,13 +4,14 @@ TypeSynonymInstances #-} module HROOT.Core.TArrayL64.Interface where import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr import FFICXX.Runtime.Cast import HROOT.Core.TArrayL64.RawType import HROOT.Core.TArray.Interface -class ITArray a => ITArrayL64 a+class (ITArray a) => ITArrayL64 a where upcastTArrayL64 :: forall a . (FPtr a, ITArrayL64 a) => a -> TArrayL64
src/HROOT/Core/TArrayL64/RawType.hs view
@@ -8,9 +8,9 @@ data RawTArrayL64 newtype TArrayL64 = TArrayL64 (Ptr RawTArrayL64)- deriving (Eq, Ord, Show)+ deriving (Eq, Ord, Show) -instance FPtr TArrayL64 where+instance () => FPtr (TArrayL64) where type Raw TArrayL64 = RawTArrayL64 get_fptr (TArrayL64 ptr) = ptr cast_fptr_to_obj = TArrayL64
src/HROOT/Core/TArrayS/Cast.hs view
@@ -8,10 +8,11 @@ import HROOT.Core.TArrayS.RawType import HROOT.Core.TArrayS.Interface -instance (ITArrayS a, FPtr a) => Castable a (Ptr RawTArrayS) where+instance (ITArrayS a, FPtr a) => Castable (a) (Ptr RawTArrayS)+ where cast x f = f (castPtr (get_fptr x)) uncast x f = f (cast_fptr_to_obj (castPtr x)) -instance Castable TArrayS (Ptr RawTArrayS) where+instance () => Castable (TArrayS) (Ptr RawTArrayS) where cast x f = f (castPtr (get_fptr x)) uncast x f = f (cast_fptr_to_obj (castPtr x))
src/HROOT/Core/TArrayS/FFI.hsc view
@@ -1,8 +1,24 @@-{-# LANGUAGE ForeignFunctionInterface #-}+{-# LANGUAGE ForeignFunctionInterface, InterruptibleFFI #-} module HROOT.Core.TArrayS.FFI where+import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr import HROOT.Core.TArrayS.RawType+import HROOT.Core.TArrayS.RawType -foreign import ccall safe "HROOTCoreTArrayS.h TArrayS_delete"- c_tarrays_delete :: Ptr RawTArrayS -> IO ()+foreign import ccall interruptible+ "HROOTCoreTArrayS.h TArrayS_GetAt" c_tarrays_getat ::+ Ptr RawTArrayS -> CInt -> IO CDouble++foreign import ccall interruptible+ "HROOTCoreTArrayS.h TArrayS_SetArray" c_tarrays_setarray ::+ Ptr RawTArrayS -> CInt -> IO ()++foreign import ccall interruptible+ "HROOTCoreTArrayS.h TArrayS_SetAt" c_tarrays_setat ::+ Ptr RawTArrayS -> CDouble -> CInt -> IO ()++foreign import ccall interruptible+ "HROOTCoreTArrayS.h TArrayS_delete" c_tarrays_delete ::+ Ptr RawTArrayS -> IO ()
src/HROOT/Core/TArrayS/Implementation.hs view
@@ -1,27 +1,39 @@ {-# LANGUAGE EmptyDataDecls, FlexibleContexts, FlexibleInstances, ForeignFunctionInterface, IncoherentInstances,- MultiParamTypeClasses, OverlappingInstances, TypeFamilies,- TypeSynonymInstances #-}+ MultiParamTypeClasses, OverlappingInstances, TemplateHaskell,+ TypeFamilies, TypeSynonymInstances #-} module HROOT.Core.TArrayS.Implementation where-import FFICXX.Runtime.Cast+import Data.Monoid import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr+import Language.Haskell.TH+import Language.Haskell.TH.Syntax import System.IO.Unsafe+import FFICXX.Runtime.Cast+import FFICXX.Runtime.CodeGen.Cxx+import FFICXX.Runtime.TH import HROOT.Core.TArrayS.RawType import HROOT.Core.TArrayS.FFI import HROOT.Core.TArrayS.Interface import HROOT.Core.TArrayS.Cast+import HROOT.Core.TArrayS.RawType+import HROOT.Core.TArrayS.Cast+import HROOT.Core.TArrayS.Interface import HROOT.Core.TArray.RawType import HROOT.Core.TArray.Cast import HROOT.Core.TArray.Interface-import HROOT.Core.Deletable.RawType-import HROOT.Core.Deletable.Cast-import HROOT.Core.Deletable.Interface+import STD.Deletable.RawType+import STD.Deletable.Cast+import STD.Deletable.Interface -instance ITArrayS TArrayS+instance () => ITArrayS (TArrayS) where -instance ITArray TArrayS+instance () => ITArray (TArrayS) where+ getAt = xform1 c_tarrays_getat+ setArray = xform1 c_tarrays_setarray+ setAt = xform2 c_tarrays_setat -instance IDeletable TArrayS where+instance () => IDeletable (TArrayS) where delete = xform0 c_tarrays_delete
src/HROOT/Core/TArrayS/Interface.hs view
@@ -4,13 +4,14 @@ TypeSynonymInstances #-} module HROOT.Core.TArrayS.Interface where import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr import FFICXX.Runtime.Cast import HROOT.Core.TArrayS.RawType import HROOT.Core.TArray.Interface -class ITArray a => ITArrayS a+class (ITArray a) => ITArrayS a where upcastTArrayS :: forall a . (FPtr a, ITArrayS a) => a -> TArrayS upcastTArrayS h
src/HROOT/Core/TArrayS/RawType.hs view
@@ -8,9 +8,9 @@ data RawTArrayS newtype TArrayS = TArrayS (Ptr RawTArrayS)- deriving (Eq, Ord, Show)+ deriving (Eq, Ord, Show) -instance FPtr TArrayS where+instance () => FPtr (TArrayS) where type Raw TArrayS = RawTArrayS get_fptr (TArrayS ptr) = ptr cast_fptr_to_obj = TArrayS
src/HROOT/Core/TAtt3D/Cast.hs view
@@ -8,10 +8,10 @@ import HROOT.Core.TAtt3D.RawType import HROOT.Core.TAtt3D.Interface -instance (ITAtt3D a, FPtr a) => Castable a (Ptr RawTAtt3D) where+instance (ITAtt3D a, FPtr a) => Castable (a) (Ptr RawTAtt3D) where cast x f = f (castPtr (get_fptr x)) uncast x f = f (cast_fptr_to_obj (castPtr x)) -instance Castable TAtt3D (Ptr RawTAtt3D) where+instance () => Castable (TAtt3D) (Ptr RawTAtt3D) where cast x f = f (castPtr (get_fptr x)) uncast x f = f (cast_fptr_to_obj (castPtr x))
src/HROOT/Core/TAtt3D/FFI.hsc view
@@ -1,8 +1,12 @@-{-# LANGUAGE ForeignFunctionInterface #-}+{-# LANGUAGE ForeignFunctionInterface, InterruptibleFFI #-} module HROOT.Core.TAtt3D.FFI where+import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr import HROOT.Core.TAtt3D.RawType+import HROOT.Core.TAtt3D.RawType -foreign import ccall safe "HROOTCoreTAtt3D.h TAtt3D_delete"- c_tatt3d_delete :: Ptr RawTAtt3D -> IO ()+foreign import ccall interruptible+ "HROOTCoreTAtt3D.h TAtt3D_delete" c_tatt3d_delete ::+ Ptr RawTAtt3D -> IO ()
src/HROOT/Core/TAtt3D/Implementation.hs view
@@ -1,22 +1,31 @@ {-# LANGUAGE EmptyDataDecls, FlexibleContexts, FlexibleInstances, ForeignFunctionInterface, IncoherentInstances,- MultiParamTypeClasses, OverlappingInstances, TypeFamilies,- TypeSynonymInstances #-}+ MultiParamTypeClasses, OverlappingInstances, TemplateHaskell,+ TypeFamilies, TypeSynonymInstances #-} module HROOT.Core.TAtt3D.Implementation where-import FFICXX.Runtime.Cast+import Data.Monoid import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr+import Language.Haskell.TH+import Language.Haskell.TH.Syntax import System.IO.Unsafe+import FFICXX.Runtime.Cast+import FFICXX.Runtime.CodeGen.Cxx+import FFICXX.Runtime.TH import HROOT.Core.TAtt3D.RawType import HROOT.Core.TAtt3D.FFI import HROOT.Core.TAtt3D.Interface import HROOT.Core.TAtt3D.Cast-import HROOT.Core.Deletable.RawType-import HROOT.Core.Deletable.Cast-import HROOT.Core.Deletable.Interface+import HROOT.Core.TAtt3D.RawType+import HROOT.Core.TAtt3D.Cast+import HROOT.Core.TAtt3D.Interface+import STD.Deletable.RawType+import STD.Deletable.Cast+import STD.Deletable.Interface -instance ITAtt3D TAtt3D+instance () => ITAtt3D (TAtt3D) where -instance IDeletable TAtt3D where+instance () => IDeletable (TAtt3D) where delete = xform0 c_tatt3d_delete
src/HROOT/Core/TAtt3D/Interface.hs view
@@ -4,13 +4,14 @@ TypeSynonymInstances #-} module HROOT.Core.TAtt3D.Interface where import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr import FFICXX.Runtime.Cast import HROOT.Core.TAtt3D.RawType-import HROOT.Core.Deletable.Interface+import STD.Deletable.Interface -class IDeletable a => ITAtt3D a+class (IDeletable a) => ITAtt3D a where upcastTAtt3D :: forall a . (FPtr a, ITAtt3D a) => a -> TAtt3D upcastTAtt3D h
src/HROOT/Core/TAtt3D/RawType.hs view
@@ -8,9 +8,9 @@ data RawTAtt3D newtype TAtt3D = TAtt3D (Ptr RawTAtt3D)- deriving (Eq, Ord, Show)+ deriving (Eq, Ord, Show) -instance FPtr TAtt3D where+instance () => FPtr (TAtt3D) where type Raw TAtt3D = RawTAtt3D get_fptr (TAtt3D ptr) = ptr cast_fptr_to_obj = TAtt3D
src/HROOT/Core/TAttAxis/Cast.hs view
@@ -8,11 +8,11 @@ import HROOT.Core.TAttAxis.RawType import HROOT.Core.TAttAxis.Interface -instance (ITAttAxis a, FPtr a) => Castable a (Ptr RawTAttAxis)+instance (ITAttAxis a, FPtr a) => Castable (a) (Ptr RawTAttAxis) where cast x f = f (castPtr (get_fptr x)) uncast x f = f (cast_fptr_to_obj (castPtr x)) -instance Castable TAttAxis (Ptr RawTAttAxis) where+instance () => Castable (TAttAxis) (Ptr RawTAttAxis) where cast x f = f (castPtr (get_fptr x)) uncast x f = f (cast_fptr_to_obj (castPtr x))
src/HROOT/Core/TAttAxis/FFI.hsc view
@@ -1,97 +1,101 @@-{-# LANGUAGE ForeignFunctionInterface #-}+{-# LANGUAGE ForeignFunctionInterface, InterruptibleFFI #-} module HROOT.Core.TAttAxis.FFI where+import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr import HROOT.Core.TAttAxis.RawType+import HROOT.Core.TAttAxis.RawType -foreign import ccall safe "HROOTCoreTAttAxis.h TAttAxis_delete"- c_tattaxis_delete :: Ptr RawTAttAxis -> IO ()+foreign import ccall interruptible+ "HROOTCoreTAttAxis.h TAttAxis_delete" c_tattaxis_delete ::+ Ptr RawTAttAxis -> IO () -foreign import ccall safe+foreign import ccall interruptible "HROOTCoreTAttAxis.h TAttAxis_newTAttAxis" c_tattaxis_newtattaxis :: IO (Ptr RawTAttAxis) -foreign import ccall safe+foreign import ccall interruptible "HROOTCoreTAttAxis.h TAttAxis_GetNdivisions" c_tattaxis_getndivisions :: Ptr RawTAttAxis -> IO CInt -foreign import ccall safe+foreign import ccall interruptible "HROOTCoreTAttAxis.h TAttAxis_GetAxisColor" c_tattaxis_getaxiscolor- :: Ptr RawTAttAxis -> IO CInt+ :: Ptr RawTAttAxis -> IO CShort -foreign import ccall safe+foreign import ccall interruptible "HROOTCoreTAttAxis.h TAttAxis_GetLabelColor"- c_tattaxis_getlabelcolor :: Ptr RawTAttAxis -> IO CInt+ c_tattaxis_getlabelcolor :: Ptr RawTAttAxis -> IO CShort -foreign import ccall safe+foreign import ccall interruptible "HROOTCoreTAttAxis.h TAttAxis_GetLabelFont" c_tattaxis_getlabelfont- :: Ptr RawTAttAxis -> IO CInt+ :: Ptr RawTAttAxis -> IO CShort -foreign import ccall safe+foreign import ccall interruptible "HROOTCoreTAttAxis.h TAttAxis_GetLabelOffset"- c_tattaxis_getlabeloffset :: Ptr RawTAttAxis -> IO CDouble+ c_tattaxis_getlabeloffset :: Ptr RawTAttAxis -> IO CFloat -foreign import ccall safe+foreign import ccall interruptible "HROOTCoreTAttAxis.h TAttAxis_GetLabelSize" c_tattaxis_getlabelsize- :: Ptr RawTAttAxis -> IO CDouble+ :: Ptr RawTAttAxis -> IO CFloat -foreign import ccall safe+foreign import ccall interruptible "HROOTCoreTAttAxis.h TAttAxis_GetTitleOffset"- c_tattaxis_gettitleoffset :: Ptr RawTAttAxis -> IO CDouble+ c_tattaxis_gettitleoffset :: Ptr RawTAttAxis -> IO CFloat -foreign import ccall safe+foreign import ccall interruptible "HROOTCoreTAttAxis.h TAttAxis_GetTitleSize" c_tattaxis_gettitlesize- :: Ptr RawTAttAxis -> IO CDouble+ :: Ptr RawTAttAxis -> IO CFloat -foreign import ccall safe+foreign import ccall interruptible "HROOTCoreTAttAxis.h TAttAxis_GetTickLength"- c_tattaxis_getticklength :: Ptr RawTAttAxis -> IO CDouble+ c_tattaxis_getticklength :: Ptr RawTAttAxis -> IO CFloat -foreign import ccall safe+foreign import ccall interruptible "HROOTCoreTAttAxis.h TAttAxis_GetTitleFont" c_tattaxis_gettitlefont- :: Ptr RawTAttAxis -> IO CInt+ :: Ptr RawTAttAxis -> IO CShort -foreign import ccall safe+foreign import ccall interruptible "HROOTCoreTAttAxis.h TAttAxis_SetNdivisions" c_tattaxis_setndivisions ::- Ptr RawTAttAxis -> CInt -> CInt -> IO ()+ Ptr RawTAttAxis -> CInt -> CBool -> IO () -foreign import ccall safe+foreign import ccall interruptible "HROOTCoreTAttAxis.h TAttAxis_SetAxisColor" c_tattaxis_setaxiscolor- :: Ptr RawTAttAxis -> CInt -> IO ()+ :: Ptr RawTAttAxis -> CShort -> IO () -foreign import ccall safe+foreign import ccall interruptible "HROOTCoreTAttAxis.h TAttAxis_SetLabelColor"- c_tattaxis_setlabelcolor :: Ptr RawTAttAxis -> CInt -> IO ()+ c_tattaxis_setlabelcolor :: Ptr RawTAttAxis -> CShort -> IO () -foreign import ccall safe+foreign import ccall interruptible "HROOTCoreTAttAxis.h TAttAxis_SetLabelFont" c_tattaxis_setlabelfont- :: Ptr RawTAttAxis -> CInt -> IO ()+ :: Ptr RawTAttAxis -> CShort -> IO () -foreign import ccall safe+foreign import ccall interruptible "HROOTCoreTAttAxis.h TAttAxis_SetLabelOffset"- c_tattaxis_setlabeloffset :: Ptr RawTAttAxis -> CDouble -> IO ()+ c_tattaxis_setlabeloffset :: Ptr RawTAttAxis -> CFloat -> IO () -foreign import ccall safe+foreign import ccall interruptible "HROOTCoreTAttAxis.h TAttAxis_SetLabelSize" c_tattaxis_setlabelsize- :: Ptr RawTAttAxis -> CDouble -> IO ()+ :: Ptr RawTAttAxis -> CFloat -> IO () -foreign import ccall safe+foreign import ccall interruptible "HROOTCoreTAttAxis.h TAttAxis_SetTickLength"- c_tattaxis_setticklength :: Ptr RawTAttAxis -> CDouble -> IO ()+ c_tattaxis_setticklength :: Ptr RawTAttAxis -> CFloat -> IO () -foreign import ccall safe+foreign import ccall interruptible "HROOTCoreTAttAxis.h TAttAxis_SetTitleOffset"- c_tattaxis_settitleoffset :: Ptr RawTAttAxis -> CDouble -> IO ()+ c_tattaxis_settitleoffset :: Ptr RawTAttAxis -> CFloat -> IO () -foreign import ccall safe+foreign import ccall interruptible "HROOTCoreTAttAxis.h TAttAxis_SetTitleSize" c_tattaxis_settitlesize- :: Ptr RawTAttAxis -> CDouble -> IO ()+ :: Ptr RawTAttAxis -> CFloat -> IO () -foreign import ccall safe+foreign import ccall interruptible "HROOTCoreTAttAxis.h TAttAxis_SetTitleColor"- c_tattaxis_settitlecolor :: Ptr RawTAttAxis -> CInt -> IO ()+ c_tattaxis_settitlecolor :: Ptr RawTAttAxis -> CShort -> IO () -foreign import ccall safe+foreign import ccall interruptible "HROOTCoreTAttAxis.h TAttAxis_SetTitleFont" c_tattaxis_settitlefont- :: Ptr RawTAttAxis -> CInt -> IO ()+ :: Ptr RawTAttAxis -> CShort -> IO ()
src/HROOT/Core/TAttAxis/Implementation.hs view
@@ -1,22 +1,31 @@ {-# LANGUAGE EmptyDataDecls, FlexibleContexts, FlexibleInstances, ForeignFunctionInterface, IncoherentInstances,- MultiParamTypeClasses, OverlappingInstances, TypeFamilies,- TypeSynonymInstances #-}+ MultiParamTypeClasses, OverlappingInstances, TemplateHaskell,+ TypeFamilies, TypeSynonymInstances #-} module HROOT.Core.TAttAxis.Implementation where-import FFICXX.Runtime.Cast+import Data.Monoid import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr+import Language.Haskell.TH+import Language.Haskell.TH.Syntax import System.IO.Unsafe+import FFICXX.Runtime.Cast+import FFICXX.Runtime.CodeGen.Cxx+import FFICXX.Runtime.TH import HROOT.Core.TAttAxis.RawType import HROOT.Core.TAttAxis.FFI import HROOT.Core.TAttAxis.Interface import HROOT.Core.TAttAxis.Cast-import HROOT.Core.Deletable.RawType-import HROOT.Core.Deletable.Cast-import HROOT.Core.Deletable.Interface+import HROOT.Core.TAttAxis.RawType+import HROOT.Core.TAttAxis.Cast+import HROOT.Core.TAttAxis.Interface+import STD.Deletable.RawType+import STD.Deletable.Cast+import STD.Deletable.Interface -instance ITAttAxis TAttAxis where+instance () => ITAttAxis (TAttAxis) where getNdivisions = xform0 c_tattaxis_getndivisions getAxisColor = xform0 c_tattaxis_getaxiscolor getLabelColor = xform0 c_tattaxis_getlabelcolor@@ -39,8 +48,8 @@ setTitleColor = xform1 c_tattaxis_settitlecolor setTitleFont = xform1 c_tattaxis_settitlefont -instance IDeletable TAttAxis where+instance () => IDeletable (TAttAxis) where delete = xform0 c_tattaxis_delete -newTAttAxis :: IO TAttAxis+newTAttAxis :: () => IO TAttAxis newTAttAxis = xformnull c_tattaxis_newtattaxis
src/HROOT/Core/TAttAxis/Interface.hs view
@@ -4,54 +4,55 @@ TypeSynonymInstances #-} module HROOT.Core.TAttAxis.Interface where import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr import FFICXX.Runtime.Cast import HROOT.Core.TAttAxis.RawType-import HROOT.Core.Deletable.Interface+import STD.Deletable.Interface -class IDeletable a => ITAttAxis a where- getNdivisions :: a -> IO CInt+class (IDeletable a) => ITAttAxis a where+ getNdivisions :: () => a -> IO CInt - getAxisColor :: a -> IO CInt+ getAxisColor :: () => a -> IO CShort - getLabelColor :: a -> IO CInt+ getLabelColor :: () => a -> IO CShort - getLabelFont :: a -> IO CInt+ getLabelFont :: () => a -> IO CShort - getLabelOffset :: a -> IO CDouble+ getLabelOffset :: () => a -> IO CFloat - getLabelSize :: a -> IO CDouble+ getLabelSize :: () => a -> IO CFloat - getTitleOffset :: a -> IO CDouble+ getTitleOffset :: () => a -> IO CFloat - getTitleSize :: a -> IO CDouble+ getTitleSize :: () => a -> IO CFloat - getTickLength :: a -> IO CDouble+ getTickLength :: () => a -> IO CFloat - getTitleFont :: a -> IO CInt+ getTitleFont :: () => a -> IO CShort - setNdivisions :: a -> CInt -> CInt -> IO ()+ setNdivisions :: () => a -> CInt -> CBool -> IO () - setAxisColor :: a -> CInt -> IO ()+ setAxisColor :: () => a -> CShort -> IO () - setLabelColor :: a -> CInt -> IO ()+ setLabelColor :: () => a -> CShort -> IO () - setLabelFont :: a -> CInt -> IO ()+ setLabelFont :: () => a -> CShort -> IO () - setLabelOffset :: a -> CDouble -> IO ()+ setLabelOffset :: () => a -> CFloat -> IO () - setLabelSize :: a -> CDouble -> IO ()+ setLabelSize :: () => a -> CFloat -> IO () - setTickLength :: a -> CDouble -> IO ()+ setTickLength :: () => a -> CFloat -> IO () - setTitleOffset :: a -> CDouble -> IO ()+ setTitleOffset :: () => a -> CFloat -> IO () - setTitleSize :: a -> CDouble -> IO ()+ setTitleSize :: () => a -> CFloat -> IO () - setTitleColor :: a -> CInt -> IO ()+ setTitleColor :: () => a -> CShort -> IO () - setTitleFont :: a -> CInt -> IO ()+ setTitleFont :: () => a -> CShort -> IO () upcastTAttAxis :: forall a . (FPtr a, ITAttAxis a) => a -> TAttAxis upcastTAttAxis h
src/HROOT/Core/TAttAxis/RawType.hs view
@@ -8,9 +8,9 @@ data RawTAttAxis newtype TAttAxis = TAttAxis (Ptr RawTAttAxis)- deriving (Eq, Ord, Show)+ deriving (Eq, Ord, Show) -instance FPtr TAttAxis where+instance () => FPtr (TAttAxis) where type Raw TAttAxis = RawTAttAxis get_fptr (TAttAxis ptr) = ptr cast_fptr_to_obj = TAttAxis
src/HROOT/Core/TAttBBox/Cast.hs view
@@ -8,11 +8,11 @@ import HROOT.Core.TAttBBox.RawType import HROOT.Core.TAttBBox.Interface -instance (ITAttBBox a, FPtr a) => Castable a (Ptr RawTAttBBox)+instance (ITAttBBox a, FPtr a) => Castable (a) (Ptr RawTAttBBox) where cast x f = f (castPtr (get_fptr x)) uncast x f = f (cast_fptr_to_obj (castPtr x)) -instance Castable TAttBBox (Ptr RawTAttBBox) where+instance () => Castable (TAttBBox) (Ptr RawTAttBBox) where cast x f = f (castPtr (get_fptr x)) uncast x f = f (cast_fptr_to_obj (castPtr x))
src/HROOT/Core/TAttBBox/FFI.hsc view
@@ -1,8 +1,12 @@-{-# LANGUAGE ForeignFunctionInterface #-}+{-# LANGUAGE ForeignFunctionInterface, InterruptibleFFI #-} module HROOT.Core.TAttBBox.FFI where+import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr import HROOT.Core.TAttBBox.RawType+import HROOT.Core.TAttBBox.RawType -foreign import ccall safe "HROOTCoreTAttBBox.h TAttBBox_delete"- c_tattbbox_delete :: Ptr RawTAttBBox -> IO ()+foreign import ccall interruptible+ "HROOTCoreTAttBBox.h TAttBBox_delete" c_tattbbox_delete ::+ Ptr RawTAttBBox -> IO ()
src/HROOT/Core/TAttBBox/Implementation.hs view
@@ -1,22 +1,31 @@ {-# LANGUAGE EmptyDataDecls, FlexibleContexts, FlexibleInstances, ForeignFunctionInterface, IncoherentInstances,- MultiParamTypeClasses, OverlappingInstances, TypeFamilies,- TypeSynonymInstances #-}+ MultiParamTypeClasses, OverlappingInstances, TemplateHaskell,+ TypeFamilies, TypeSynonymInstances #-} module HROOT.Core.TAttBBox.Implementation where-import FFICXX.Runtime.Cast+import Data.Monoid import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr+import Language.Haskell.TH+import Language.Haskell.TH.Syntax import System.IO.Unsafe+import FFICXX.Runtime.Cast+import FFICXX.Runtime.CodeGen.Cxx+import FFICXX.Runtime.TH import HROOT.Core.TAttBBox.RawType import HROOT.Core.TAttBBox.FFI import HROOT.Core.TAttBBox.Interface import HROOT.Core.TAttBBox.Cast-import HROOT.Core.Deletable.RawType-import HROOT.Core.Deletable.Cast-import HROOT.Core.Deletable.Interface+import HROOT.Core.TAttBBox.RawType+import HROOT.Core.TAttBBox.Cast+import HROOT.Core.TAttBBox.Interface+import STD.Deletable.RawType+import STD.Deletable.Cast+import STD.Deletable.Interface -instance ITAttBBox TAttBBox+instance () => ITAttBBox (TAttBBox) where -instance IDeletable TAttBBox where+instance () => IDeletable (TAttBBox) where delete = xform0 c_tattbbox_delete
src/HROOT/Core/TAttBBox/Interface.hs view
@@ -4,13 +4,14 @@ TypeSynonymInstances #-} module HROOT.Core.TAttBBox.Interface where import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr import FFICXX.Runtime.Cast import HROOT.Core.TAttBBox.RawType-import HROOT.Core.Deletable.Interface+import STD.Deletable.Interface -class IDeletable a => ITAttBBox a+class (IDeletable a) => ITAttBBox a where upcastTAttBBox :: forall a . (FPtr a, ITAttBBox a) => a -> TAttBBox upcastTAttBBox h
src/HROOT/Core/TAttBBox/RawType.hs view
@@ -8,9 +8,9 @@ data RawTAttBBox newtype TAttBBox = TAttBBox (Ptr RawTAttBBox)- deriving (Eq, Ord, Show)+ deriving (Eq, Ord, Show) -instance FPtr TAttBBox where+instance () => FPtr (TAttBBox) where type Raw TAttBBox = RawTAttBBox get_fptr (TAttBBox ptr) = ptr cast_fptr_to_obj = TAttBBox
+ src/HROOT/Core/TAttBBox2D.hs view
@@ -0,0 +1,4 @@+module HROOT.Core.TAttBBox2D (ITAttBBox2D(..)) where+import HROOT.Core.TAttBBox2D.RawType+import HROOT.Core.TAttBBox2D.Interface+import HROOT.Core.TAttBBox2D.Implementation
+ src/HROOT/Core/TAttBBox2D/Cast.hs view
@@ -0,0 +1,9 @@+{-# LANGUAGE FlexibleInstances, FlexibleContexts, TypeFamilies,+ MultiParamTypeClasses, OverlappingInstances, IncoherentInstances+ #-}+module HROOT.Core.TAttBBox2D.Cast where+import Foreign.Ptr+import FFICXX.Runtime.Cast+import System.IO.Unsafe+import HROOT.Core.TAttBBox2D.RawType+import HROOT.Core.TAttBBox2D.Interface
+ src/HROOT/Core/TAttBBox2D/FFI.hsc view
@@ -0,0 +1,9 @@+{-# LANGUAGE ForeignFunctionInterface, InterruptibleFFI #-}+module HROOT.Core.TAttBBox2D.FFI where+import Data.Word+import Data.Int+import Foreign.C+import Foreign.Ptr+import HROOT.Core.TAttBBox2D.RawType+import HROOT.Core.TAttBBox2D.RawType+import HROOT.Core.Rectangle_t.RawType
+ src/HROOT/Core/TAttBBox2D/Implementation.hs view
@@ -0,0 +1,29 @@+{-# LANGUAGE EmptyDataDecls, FlexibleContexts, FlexibleInstances,+ ForeignFunctionInterface, IncoherentInstances,+ MultiParamTypeClasses, OverlappingInstances, TemplateHaskell,+ TypeFamilies, TypeSynonymInstances #-}+module HROOT.Core.TAttBBox2D.Implementation where+import Data.Monoid+import Data.Word+import Data.Int+import Foreign.C+import Foreign.Ptr+import Language.Haskell.TH+import Language.Haskell.TH.Syntax+import System.IO.Unsafe+import FFICXX.Runtime.Cast+import FFICXX.Runtime.CodeGen.Cxx+import FFICXX.Runtime.TH+import HROOT.Core.TAttBBox2D.RawType+import HROOT.Core.TAttBBox2D.FFI+import HROOT.Core.TAttBBox2D.Interface+import HROOT.Core.TAttBBox2D.Cast+import HROOT.Core.TAttBBox2D.RawType+import HROOT.Core.TAttBBox2D.Cast+import HROOT.Core.TAttBBox2D.Interface+import HROOT.Core.Rectangle_t.RawType+import HROOT.Core.Rectangle_t.Cast+import HROOT.Core.Rectangle_t.Interface+import STD.Deletable.RawType+import STD.Deletable.Cast+import STD.Deletable.Interface
+ src/HROOT/Core/TAttBBox2D/Interface.hs view
@@ -0,0 +1,24 @@+{-# LANGUAGE EmptyDataDecls, ExistentialQuantification,+ FlexibleContexts, FlexibleInstances, ForeignFunctionInterface,+ MultiParamTypeClasses, ScopedTypeVariables, TypeFamilies,+ TypeSynonymInstances #-}+module HROOT.Core.TAttBBox2D.Interface where+import Data.Word+import Data.Int+import Foreign.C+import Foreign.Ptr+import FFICXX.Runtime.Cast+import HROOT.Core.TAttBBox2D.RawType+import HROOT.Core.Rectangle_t.RawType+import STD.Deletable.Interface++class (IDeletable a) => ITAttBBox2D a where+ getBBox :: () => a -> IO Rectangle_t+ + setBBoxX1 :: () => a -> CInt -> IO ()+ + setBBoxX2 :: () => a -> CInt -> IO ()+ + setBBoxY1 :: () => a -> CInt -> IO ()+ + setBBoxY2 :: () => a -> CInt -> IO ()
+ src/HROOT/Core/TAttBBox2D/RawType.hs view
@@ -0,0 +1,6 @@+{-# LANGUAGE ForeignFunctionInterface, TypeFamilies,+ MultiParamTypeClasses, FlexibleInstances, TypeSynonymInstances,+ EmptyDataDecls, ExistentialQuantification, ScopedTypeVariables #-}+module HROOT.Core.TAttBBox2D.RawType where+import Foreign.Ptr+import FFICXX.Runtime.Cast
src/HROOT/Core/TAttCanvas/Cast.hs view
@@ -8,11 +8,12 @@ import HROOT.Core.TAttCanvas.RawType import HROOT.Core.TAttCanvas.Interface -instance (ITAttCanvas a, FPtr a) => Castable a (Ptr RawTAttCanvas)+instance (ITAttCanvas a, FPtr a) =>+ Castable (a) (Ptr RawTAttCanvas) where cast x f = f (castPtr (get_fptr x)) uncast x f = f (cast_fptr_to_obj (castPtr x)) -instance Castable TAttCanvas (Ptr RawTAttCanvas) where+instance () => Castable (TAttCanvas) (Ptr RawTAttCanvas) where cast x f = f (castPtr (get_fptr x)) uncast x f = f (cast_fptr_to_obj (castPtr x))
src/HROOT/Core/TAttCanvas/FFI.hsc view
@@ -1,12 +1,16 @@-{-# LANGUAGE ForeignFunctionInterface #-}+{-# LANGUAGE ForeignFunctionInterface, InterruptibleFFI #-} module HROOT.Core.TAttCanvas.FFI where+import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr import HROOT.Core.TAttCanvas.RawType+import HROOT.Core.TAttCanvas.RawType -foreign import ccall safe "HROOTCoreTAttCanvas.h TAttCanvas_delete"- c_tattcanvas_delete :: Ptr RawTAttCanvas -> IO ()+foreign import ccall interruptible+ "HROOTCoreTAttCanvas.h TAttCanvas_delete" c_tattcanvas_delete ::+ Ptr RawTAttCanvas -> IO () -foreign import ccall safe+foreign import ccall interruptible "HROOTCoreTAttCanvas.h TAttCanvas_newTAttCanvas" c_tattcanvas_newtattcanvas :: IO (Ptr RawTAttCanvas)
src/HROOT/Core/TAttCanvas/Implementation.hs view
@@ -1,25 +1,34 @@ {-# LANGUAGE EmptyDataDecls, FlexibleContexts, FlexibleInstances, ForeignFunctionInterface, IncoherentInstances,- MultiParamTypeClasses, OverlappingInstances, TypeFamilies,- TypeSynonymInstances #-}+ MultiParamTypeClasses, OverlappingInstances, TemplateHaskell,+ TypeFamilies, TypeSynonymInstances #-} module HROOT.Core.TAttCanvas.Implementation where-import FFICXX.Runtime.Cast+import Data.Monoid import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr+import Language.Haskell.TH+import Language.Haskell.TH.Syntax import System.IO.Unsafe+import FFICXX.Runtime.Cast+import FFICXX.Runtime.CodeGen.Cxx+import FFICXX.Runtime.TH import HROOT.Core.TAttCanvas.RawType import HROOT.Core.TAttCanvas.FFI import HROOT.Core.TAttCanvas.Interface import HROOT.Core.TAttCanvas.Cast-import HROOT.Core.Deletable.RawType-import HROOT.Core.Deletable.Cast-import HROOT.Core.Deletable.Interface+import HROOT.Core.TAttCanvas.RawType+import HROOT.Core.TAttCanvas.Cast+import HROOT.Core.TAttCanvas.Interface+import STD.Deletable.RawType+import STD.Deletable.Cast+import STD.Deletable.Interface -instance ITAttCanvas TAttCanvas+instance () => ITAttCanvas (TAttCanvas) where -instance IDeletable TAttCanvas where+instance () => IDeletable (TAttCanvas) where delete = xform0 c_tattcanvas_delete -newTAttCanvas :: IO TAttCanvas+newTAttCanvas :: () => IO TAttCanvas newTAttCanvas = xformnull c_tattcanvas_newtattcanvas
src/HROOT/Core/TAttCanvas/Interface.hs view
@@ -4,13 +4,14 @@ TypeSynonymInstances #-} module HROOT.Core.TAttCanvas.Interface where import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr import FFICXX.Runtime.Cast import HROOT.Core.TAttCanvas.RawType-import HROOT.Core.Deletable.Interface+import STD.Deletable.Interface -class IDeletable a => ITAttCanvas a+class (IDeletable a) => ITAttCanvas a where upcastTAttCanvas :: forall a . (FPtr a, ITAttCanvas a) => a -> TAttCanvas
src/HROOT/Core/TAttCanvas/RawType.hs view
@@ -8,9 +8,9 @@ data RawTAttCanvas newtype TAttCanvas = TAttCanvas (Ptr RawTAttCanvas)- deriving (Eq, Ord, Show)+ deriving (Eq, Ord, Show) -instance FPtr TAttCanvas where+instance () => FPtr (TAttCanvas) where type Raw TAttCanvas = RawTAttCanvas get_fptr (TAttCanvas ptr) = ptr cast_fptr_to_obj = TAttCanvas
src/HROOT/Core/TAttFill/Cast.hs view
@@ -8,11 +8,11 @@ import HROOT.Core.TAttFill.RawType import HROOT.Core.TAttFill.Interface -instance (ITAttFill a, FPtr a) => Castable a (Ptr RawTAttFill)+instance (ITAttFill a, FPtr a) => Castable (a) (Ptr RawTAttFill) where cast x f = f (castPtr (get_fptr x)) uncast x f = f (cast_fptr_to_obj (castPtr x)) -instance Castable TAttFill (Ptr RawTAttFill) where+instance () => Castable (TAttFill) (Ptr RawTAttFill) where cast x f = f (castPtr (get_fptr x)) uncast x f = f (cast_fptr_to_obj (castPtr x))
src/HROOT/Core/TAttFill/FFI.hsc view
@@ -1,20 +1,24 @@-{-# LANGUAGE ForeignFunctionInterface #-}+{-# LANGUAGE ForeignFunctionInterface, InterruptibleFFI #-} module HROOT.Core.TAttFill.FFI where+import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr import HROOT.Core.TAttFill.RawType+import HROOT.Core.TAttFill.RawType -foreign import ccall safe "HROOTCoreTAttFill.h TAttFill_delete"- c_tattfill_delete :: Ptr RawTAttFill -> IO ()+foreign import ccall interruptible+ "HROOTCoreTAttFill.h TAttFill_delete" c_tattfill_delete ::+ Ptr RawTAttFill -> IO () -foreign import ccall safe+foreign import ccall interruptible "HROOTCoreTAttFill.h TAttFill_newTAttFill" c_tattfill_newtattfill- :: CInt -> CInt -> IO (Ptr RawTAttFill)+ :: CShort -> CShort -> IO (Ptr RawTAttFill) -foreign import ccall safe+foreign import ccall interruptible "HROOTCoreTAttFill.h TAttFill_SetFillColor" c_tattfill_setfillcolor :: Ptr RawTAttFill -> CInt -> IO () -foreign import ccall safe+foreign import ccall interruptible "HROOTCoreTAttFill.h TAttFill_SetFillStyle" c_tattfill_setfillstyle :: Ptr RawTAttFill -> CInt -> IO ()
src/HROOT/Core/TAttFill/Implementation.hs view
@@ -1,27 +1,36 @@ {-# LANGUAGE EmptyDataDecls, FlexibleContexts, FlexibleInstances, ForeignFunctionInterface, IncoherentInstances,- MultiParamTypeClasses, OverlappingInstances, TypeFamilies,- TypeSynonymInstances #-}+ MultiParamTypeClasses, OverlappingInstances, TemplateHaskell,+ TypeFamilies, TypeSynonymInstances #-} module HROOT.Core.TAttFill.Implementation where-import FFICXX.Runtime.Cast+import Data.Monoid import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr+import Language.Haskell.TH+import Language.Haskell.TH.Syntax import System.IO.Unsafe+import FFICXX.Runtime.Cast+import FFICXX.Runtime.CodeGen.Cxx+import FFICXX.Runtime.TH import HROOT.Core.TAttFill.RawType import HROOT.Core.TAttFill.FFI import HROOT.Core.TAttFill.Interface import HROOT.Core.TAttFill.Cast-import HROOT.Core.Deletable.RawType-import HROOT.Core.Deletable.Cast-import HROOT.Core.Deletable.Interface+import HROOT.Core.TAttFill.RawType+import HROOT.Core.TAttFill.Cast+import HROOT.Core.TAttFill.Interface+import STD.Deletable.RawType+import STD.Deletable.Cast+import STD.Deletable.Interface -instance ITAttFill TAttFill where+instance () => ITAttFill (TAttFill) where setFillColor = xform1 c_tattfill_setfillcolor setFillStyle = xform1 c_tattfill_setfillstyle -instance IDeletable TAttFill where+instance () => IDeletable (TAttFill) where delete = xform0 c_tattfill_delete -newTAttFill :: CInt -> CInt -> IO TAttFill+newTAttFill :: () => CShort -> CShort -> IO TAttFill newTAttFill = xform1 c_tattfill_newtattfill
src/HROOT/Core/TAttFill/Interface.hs view
@@ -4,16 +4,17 @@ TypeSynonymInstances #-} module HROOT.Core.TAttFill.Interface where import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr import FFICXX.Runtime.Cast import HROOT.Core.TAttFill.RawType-import HROOT.Core.Deletable.Interface+import STD.Deletable.Interface -class IDeletable a => ITAttFill a where- setFillColor :: a -> CInt -> IO ()+class (IDeletable a) => ITAttFill a where+ setFillColor :: () => a -> CInt -> IO () - setFillStyle :: a -> CInt -> IO ()+ setFillStyle :: () => a -> CInt -> IO () upcastTAttFill :: forall a . (FPtr a, ITAttFill a) => a -> TAttFill upcastTAttFill h
src/HROOT/Core/TAttFill/RawType.hs view
@@ -8,9 +8,9 @@ data RawTAttFill newtype TAttFill = TAttFill (Ptr RawTAttFill)- deriving (Eq, Ord, Show)+ deriving (Eq, Ord, Show) -instance FPtr TAttFill where+instance () => FPtr (TAttFill) where type Raw TAttFill = RawTAttFill get_fptr (TAttFill ptr) = ptr cast_fptr_to_obj = TAttFill
src/HROOT/Core/TAttLine.hs view
@@ -1,6 +1,6 @@ module HROOT.Core.TAttLine (TAttLine(..), ITAttLine(..), upcastTAttLine, downcastTAttLine,- newTAttLine, tAttLineDistancetoLine)+ newTAttLine, tAttLine_DistancetoLine) where import HROOT.Core.TAttLine.RawType import HROOT.Core.TAttLine.Interface
src/HROOT/Core/TAttLine/Cast.hs view
@@ -8,11 +8,11 @@ import HROOT.Core.TAttLine.RawType import HROOT.Core.TAttLine.Interface -instance (ITAttLine a, FPtr a) => Castable a (Ptr RawTAttLine)+instance (ITAttLine a, FPtr a) => Castable (a) (Ptr RawTAttLine) where cast x f = f (castPtr (get_fptr x)) uncast x f = f (cast_fptr_to_obj (castPtr x)) -instance Castable TAttLine (Ptr RawTAttLine) where+instance () => Castable (TAttLine) (Ptr RawTAttLine) where cast x f = f (castPtr (get_fptr x)) uncast x f = f (cast_fptr_to_obj (castPtr x))
src/HROOT/Core/TAttLine/FFI.hsc view
@@ -1,50 +1,54 @@-{-# LANGUAGE ForeignFunctionInterface #-}+{-# LANGUAGE ForeignFunctionInterface, InterruptibleFFI #-} module HROOT.Core.TAttLine.FFI where+import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr import HROOT.Core.TAttLine.RawType+import HROOT.Core.TAttLine.RawType -foreign import ccall safe "HROOTCoreTAttLine.h TAttLine_delete"- c_tattline_delete :: Ptr RawTAttLine -> IO ()+foreign import ccall interruptible+ "HROOTCoreTAttLine.h TAttLine_delete" c_tattline_delete ::+ Ptr RawTAttLine -> IO () -foreign import ccall safe+foreign import ccall interruptible "HROOTCoreTAttLine.h TAttLine_newTAttLine" c_tattline_newtattline- :: CInt -> CInt -> CInt -> IO (Ptr RawTAttLine)+ :: CShort -> CShort -> CShort -> IO (Ptr RawTAttLine) -foreign import ccall safe- "HROOTCoreTAttLine.h TAttLine_tAttLineDistancetoLine"- c_tattline_tattlinedistancetoline ::+foreign import ccall interruptible+ "HROOTCoreTAttLine.h TAttLine_tAttLine_DistancetoLine"+ c_tattline_tattline_distancetoline :: Ptr RawTAttLine -> CInt -> CInt -> CDouble -> CDouble -> CDouble -> CDouble -> IO CInt -foreign import ccall safe+foreign import ccall interruptible "HROOTCoreTAttLine.h TAttLine_GetLineColor" c_tattline_getlinecolor- :: Ptr RawTAttLine -> IO CInt+ :: Ptr RawTAttLine -> IO CShort -foreign import ccall safe+foreign import ccall interruptible "HROOTCoreTAttLine.h TAttLine_GetLineStyle" c_tattline_getlinestyle- :: Ptr RawTAttLine -> IO CInt+ :: Ptr RawTAttLine -> IO CShort -foreign import ccall safe+foreign import ccall interruptible "HROOTCoreTAttLine.h TAttLine_GetLineWidth" c_tattline_getlinewidth- :: Ptr RawTAttLine -> IO CInt+ :: Ptr RawTAttLine -> IO CShort -foreign import ccall safe+foreign import ccall interruptible "HROOTCoreTAttLine.h TAttLine_ResetAttLine" c_tattline_resetattline :: Ptr RawTAttLine -> CString -> IO () -foreign import ccall safe+foreign import ccall interruptible "HROOTCoreTAttLine.h TAttLine_SetLineAttributes" c_tattline_setlineattributes :: Ptr RawTAttLine -> IO () -foreign import ccall safe+foreign import ccall interruptible "HROOTCoreTAttLine.h TAttLine_SetLineColor" c_tattline_setlinecolor- :: Ptr RawTAttLine -> CInt -> IO ()+ :: Ptr RawTAttLine -> CShort -> IO () -foreign import ccall safe+foreign import ccall interruptible "HROOTCoreTAttLine.h TAttLine_SetLineStyle" c_tattline_setlinestyle- :: Ptr RawTAttLine -> CInt -> IO ()+ :: Ptr RawTAttLine -> CShort -> IO () -foreign import ccall safe+foreign import ccall interruptible "HROOTCoreTAttLine.h TAttLine_SetLineWidth" c_tattline_setlinewidth- :: Ptr RawTAttLine -> CInt -> IO ()+ :: Ptr RawTAttLine -> CShort -> IO ()
src/HROOT/Core/TAttLine/Implementation.hs view
@@ -1,22 +1,31 @@ {-# LANGUAGE EmptyDataDecls, FlexibleContexts, FlexibleInstances, ForeignFunctionInterface, IncoherentInstances,- MultiParamTypeClasses, OverlappingInstances, TypeFamilies,- TypeSynonymInstances #-}+ MultiParamTypeClasses, OverlappingInstances, TemplateHaskell,+ TypeFamilies, TypeSynonymInstances #-} module HROOT.Core.TAttLine.Implementation where-import FFICXX.Runtime.Cast+import Data.Monoid import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr+import Language.Haskell.TH+import Language.Haskell.TH.Syntax import System.IO.Unsafe+import FFICXX.Runtime.Cast+import FFICXX.Runtime.CodeGen.Cxx+import FFICXX.Runtime.TH import HROOT.Core.TAttLine.RawType import HROOT.Core.TAttLine.FFI import HROOT.Core.TAttLine.Interface import HROOT.Core.TAttLine.Cast-import HROOT.Core.Deletable.RawType-import HROOT.Core.Deletable.Cast-import HROOT.Core.Deletable.Interface+import HROOT.Core.TAttLine.RawType+import HROOT.Core.TAttLine.Cast+import HROOT.Core.TAttLine.Interface+import STD.Deletable.RawType+import STD.Deletable.Cast+import STD.Deletable.Interface -instance ITAttLine TAttLine where+instance () => ITAttLine (TAttLine) where getLineColor = xform0 c_tattline_getlinecolor getLineStyle = xform0 c_tattline_getlinestyle getLineWidth = xform0 c_tattline_getlinewidth@@ -26,13 +35,14 @@ setLineStyle = xform1 c_tattline_setlinestyle setLineWidth = xform1 c_tattline_setlinewidth -instance IDeletable TAttLine where+instance () => IDeletable (TAttLine) where delete = xform0 c_tattline_delete -newTAttLine :: CInt -> CInt -> CInt -> IO TAttLine+newTAttLine :: () => CShort -> CShort -> CShort -> IO TAttLine newTAttLine = xform2 c_tattline_newtattline -tAttLineDistancetoLine ::- TAttLine ->- CInt -> CInt -> CDouble -> CDouble -> CDouble -> CDouble -> IO CInt-tAttLineDistancetoLine = xform6 c_tattline_tattlinedistancetoline+tAttLine_DistancetoLine ::+ () =>+ TAttLine ->+ CInt -> CInt -> CDouble -> CDouble -> CDouble -> CDouble -> IO CInt+tAttLine_DistancetoLine = xform6 c_tattline_tattline_distancetoline
src/HROOT/Core/TAttLine/Interface.hs view
@@ -4,28 +4,29 @@ TypeSynonymInstances #-} module HROOT.Core.TAttLine.Interface where import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr import FFICXX.Runtime.Cast import HROOT.Core.TAttLine.RawType-import HROOT.Core.Deletable.Interface+import STD.Deletable.Interface -class IDeletable a => ITAttLine a where- getLineColor :: a -> IO CInt+class (IDeletable a) => ITAttLine a where+ getLineColor :: () => a -> IO CShort - getLineStyle :: a -> IO CInt+ getLineStyle :: () => a -> IO CShort - getLineWidth :: a -> IO CInt+ getLineWidth :: () => a -> IO CShort - resetAttLine :: Castable c0 CString => a -> c0 -> IO ()+ resetAttLine :: (Castable c0 CString) => a -> c0 -> IO () - setLineAttributes :: a -> IO ()+ setLineAttributes :: () => a -> IO () - setLineColor :: a -> CInt -> IO ()+ setLineColor :: () => a -> CShort -> IO () - setLineStyle :: a -> CInt -> IO ()+ setLineStyle :: () => a -> CShort -> IO () - setLineWidth :: a -> CInt -> IO ()+ setLineWidth :: () => a -> CShort -> IO () upcastTAttLine :: forall a . (FPtr a, ITAttLine a) => a -> TAttLine upcastTAttLine h
src/HROOT/Core/TAttLine/RawType.hs view
@@ -8,9 +8,9 @@ data RawTAttLine newtype TAttLine = TAttLine (Ptr RawTAttLine)- deriving (Eq, Ord, Show)+ deriving (Eq, Ord, Show) -instance FPtr TAttLine where+instance () => FPtr (TAttLine) where type Raw TAttLine = RawTAttLine get_fptr (TAttLine ptr) = ptr cast_fptr_to_obj = TAttLine
src/HROOT/Core/TAttMarker/Cast.hs view
@@ -8,11 +8,12 @@ import HROOT.Core.TAttMarker.RawType import HROOT.Core.TAttMarker.Interface -instance (ITAttMarker a, FPtr a) => Castable a (Ptr RawTAttMarker)+instance (ITAttMarker a, FPtr a) =>+ Castable (a) (Ptr RawTAttMarker) where cast x f = f (castPtr (get_fptr x)) uncast x f = f (cast_fptr_to_obj (castPtr x)) -instance Castable TAttMarker (Ptr RawTAttMarker) where+instance () => Castable (TAttMarker) (Ptr RawTAttMarker) where cast x f = f (castPtr (get_fptr x)) uncast x f = f (cast_fptr_to_obj (castPtr x))
src/HROOT/Core/TAttMarker/FFI.hsc view
@@ -1,46 +1,50 @@-{-# LANGUAGE ForeignFunctionInterface #-}+{-# LANGUAGE ForeignFunctionInterface, InterruptibleFFI #-} module HROOT.Core.TAttMarker.FFI where+import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr import HROOT.Core.TAttMarker.RawType+import HROOT.Core.TAttMarker.RawType -foreign import ccall safe "HROOTCoreTAttMarker.h TAttMarker_delete"- c_tattmarker_delete :: Ptr RawTAttMarker -> IO ()+foreign import ccall interruptible+ "HROOTCoreTAttMarker.h TAttMarker_delete" c_tattmarker_delete ::+ Ptr RawTAttMarker -> IO () -foreign import ccall safe+foreign import ccall interruptible "HROOTCoreTAttMarker.h TAttMarker_newTAttMarker" c_tattmarker_newtattmarker ::- CInt -> CInt -> CInt -> IO (Ptr RawTAttMarker)+ CShort -> CShort -> CShort -> IO (Ptr RawTAttMarker) -foreign import ccall safe+foreign import ccall interruptible "HROOTCoreTAttMarker.h TAttMarker_GetMarkerColor"- c_tattmarker_getmarkercolor :: Ptr RawTAttMarker -> IO CInt+ c_tattmarker_getmarkercolor :: Ptr RawTAttMarker -> IO CShort -foreign import ccall safe+foreign import ccall interruptible "HROOTCoreTAttMarker.h TAttMarker_GetMarkerStyle"- c_tattmarker_getmarkerstyle :: Ptr RawTAttMarker -> IO CInt+ c_tattmarker_getmarkerstyle :: Ptr RawTAttMarker -> IO CShort -foreign import ccall safe+foreign import ccall interruptible "HROOTCoreTAttMarker.h TAttMarker_GetMarkerSize"- c_tattmarker_getmarkersize :: Ptr RawTAttMarker -> IO CDouble+ c_tattmarker_getmarkersize :: Ptr RawTAttMarker -> IO CFloat -foreign import ccall safe+foreign import ccall interruptible "HROOTCoreTAttMarker.h TAttMarker_ResetAttMarker" c_tattmarker_resetattmarker :: Ptr RawTAttMarker -> CString -> IO () -foreign import ccall safe+foreign import ccall interruptible "HROOTCoreTAttMarker.h TAttMarker_SetMarkerAttributes" c_tattmarker_setmarkerattributes :: Ptr RawTAttMarker -> IO () -foreign import ccall safe+foreign import ccall interruptible "HROOTCoreTAttMarker.h TAttMarker_SetMarkerColor"- c_tattmarker_setmarkercolor :: Ptr RawTAttMarker -> CInt -> IO ()+ c_tattmarker_setmarkercolor :: Ptr RawTAttMarker -> CShort -> IO () -foreign import ccall safe+foreign import ccall interruptible "HROOTCoreTAttMarker.h TAttMarker_SetMarkerStyle"- c_tattmarker_setmarkerstyle :: Ptr RawTAttMarker -> CInt -> IO ()+ c_tattmarker_setmarkerstyle :: Ptr RawTAttMarker -> CShort -> IO () -foreign import ccall safe+foreign import ccall interruptible "HROOTCoreTAttMarker.h TAttMarker_SetMarkerSize"- c_tattmarker_setmarkersize :: Ptr RawTAttMarker -> CInt -> IO ()+ c_tattmarker_setmarkersize :: Ptr RawTAttMarker -> CShort -> IO ()
src/HROOT/Core/TAttMarker/Implementation.hs view
@@ -1,22 +1,31 @@ {-# LANGUAGE EmptyDataDecls, FlexibleContexts, FlexibleInstances, ForeignFunctionInterface, IncoherentInstances,- MultiParamTypeClasses, OverlappingInstances, TypeFamilies,- TypeSynonymInstances #-}+ MultiParamTypeClasses, OverlappingInstances, TemplateHaskell,+ TypeFamilies, TypeSynonymInstances #-} module HROOT.Core.TAttMarker.Implementation where-import FFICXX.Runtime.Cast+import Data.Monoid import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr+import Language.Haskell.TH+import Language.Haskell.TH.Syntax import System.IO.Unsafe+import FFICXX.Runtime.Cast+import FFICXX.Runtime.CodeGen.Cxx+import FFICXX.Runtime.TH import HROOT.Core.TAttMarker.RawType import HROOT.Core.TAttMarker.FFI import HROOT.Core.TAttMarker.Interface import HROOT.Core.TAttMarker.Cast-import HROOT.Core.Deletable.RawType-import HROOT.Core.Deletable.Cast-import HROOT.Core.Deletable.Interface+import HROOT.Core.TAttMarker.RawType+import HROOT.Core.TAttMarker.Cast+import HROOT.Core.TAttMarker.Interface+import STD.Deletable.RawType+import STD.Deletable.Cast+import STD.Deletable.Interface -instance ITAttMarker TAttMarker where+instance () => ITAttMarker (TAttMarker) where getMarkerColor = xform0 c_tattmarker_getmarkercolor getMarkerStyle = xform0 c_tattmarker_getmarkerstyle getMarkerSize = xform0 c_tattmarker_getmarkersize@@ -26,8 +35,8 @@ setMarkerStyle = xform1 c_tattmarker_setmarkerstyle setMarkerSize = xform1 c_tattmarker_setmarkersize -instance IDeletable TAttMarker where+instance () => IDeletable (TAttMarker) where delete = xform0 c_tattmarker_delete -newTAttMarker :: CInt -> CInt -> CInt -> IO TAttMarker+newTAttMarker :: () => CShort -> CShort -> CShort -> IO TAttMarker newTAttMarker = xform2 c_tattmarker_newtattmarker
src/HROOT/Core/TAttMarker/Interface.hs view
@@ -4,28 +4,29 @@ TypeSynonymInstances #-} module HROOT.Core.TAttMarker.Interface where import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr import FFICXX.Runtime.Cast import HROOT.Core.TAttMarker.RawType-import HROOT.Core.Deletable.Interface+import STD.Deletable.Interface -class IDeletable a => ITAttMarker a where- getMarkerColor :: a -> IO CInt+class (IDeletable a) => ITAttMarker a where+ getMarkerColor :: () => a -> IO CShort - getMarkerStyle :: a -> IO CInt+ getMarkerStyle :: () => a -> IO CShort - getMarkerSize :: a -> IO CDouble+ getMarkerSize :: () => a -> IO CFloat - resetAttMarker :: Castable c0 CString => a -> c0 -> IO ()+ resetAttMarker :: (Castable c0 CString) => a -> c0 -> IO () - setMarkerAttributes :: a -> IO ()+ setMarkerAttributes :: () => a -> IO () - setMarkerColor :: a -> CInt -> IO ()+ setMarkerColor :: () => a -> CShort -> IO () - setMarkerStyle :: a -> CInt -> IO ()+ setMarkerStyle :: () => a -> CShort -> IO () - setMarkerSize :: a -> CInt -> IO ()+ setMarkerSize :: () => a -> CShort -> IO () upcastTAttMarker :: forall a . (FPtr a, ITAttMarker a) => a -> TAttMarker
src/HROOT/Core/TAttMarker/RawType.hs view
@@ -8,9 +8,9 @@ data RawTAttMarker newtype TAttMarker = TAttMarker (Ptr RawTAttMarker)- deriving (Eq, Ord, Show)+ deriving (Eq, Ord, Show) -instance FPtr TAttMarker where+instance () => FPtr (TAttMarker) where type Raw TAttMarker = RawTAttMarker get_fptr (TAttMarker ptr) = ptr cast_fptr_to_obj = TAttMarker
src/HROOT/Core/TAttPad.hs view
@@ -1,16 +1,16 @@ module HROOT.Core.TAttPad (TAttPad(..), ITAttPad(..), upcastTAttPad, downcastTAttPad,- newTAttPad, tAttPadGetBottomMargin, tAttPadGetLeftMargin,- tAttPadGetRightMargin, tAttPadGetTopMargin, tAttPadGetAfile,- tAttPadGetXfile, tAttPadGetYfile, tAttPadGetAstat, tAttPadGetXstat,- tAttPadGetYstat, tAttPadGetFrameFillColor,- tAttPadGetFrameLineColor, tAttPadGetFrameFillStyle,- tAttPadGetFrameLineStyle, tAttPadGetFrameLineWidth,- tAttPadGetFrameBorderSize, tAttPadGetFrameBorderMode,- tAttPadSetFrameFillColor, tAttPadSetFrameLineColor,- tAttPadSetFrameFillStyle, tAttPadSetFrameLineStyle,- tAttPadSetFrameLineWidth, tAttPadSetFrameBorderSize,- tAttPadSetFrameBorderMode)+ newTAttPad, tAttPad_GetBottomMargin, tAttPad_GetLeftMargin,+ tAttPad_GetRightMargin, tAttPad_GetTopMargin, tAttPad_GetAfile,+ tAttPad_GetXfile, tAttPad_GetYfile, tAttPad_GetAstat,+ tAttPad_GetXstat, tAttPad_GetYstat, tAttPad_GetFrameFillColor,+ tAttPad_GetFrameLineColor, tAttPad_GetFrameFillStyle,+ tAttPad_GetFrameLineStyle, tAttPad_GetFrameLineWidth,+ tAttPad_GetFrameBorderSize, tAttPad_GetFrameBorderMode,+ tAttPad_SetFrameFillColor, tAttPad_SetFrameLineColor,+ tAttPad_SetFrameFillStyle, tAttPad_SetFrameLineStyle,+ tAttPad_SetFrameLineWidth, tAttPad_SetFrameBorderSize,+ tAttPad_SetFrameBorderMode) where import HROOT.Core.TAttPad.RawType import HROOT.Core.TAttPad.Interface
src/HROOT/Core/TAttPad/Cast.hs view
@@ -8,10 +8,11 @@ import HROOT.Core.TAttPad.RawType import HROOT.Core.TAttPad.Interface -instance (ITAttPad a, FPtr a) => Castable a (Ptr RawTAttPad) where+instance (ITAttPad a, FPtr a) => Castable (a) (Ptr RawTAttPad)+ where cast x f = f (castPtr (get_fptr x)) uncast x f = f (cast_fptr_to_obj (castPtr x)) -instance Castable TAttPad (Ptr RawTAttPad) where+instance () => Castable (TAttPad) (Ptr RawTAttPad) where cast x f = f (castPtr (get_fptr x)) uncast x f = f (cast_fptr_to_obj (castPtr x))
src/HROOT/Core/TAttPad/FFI.hsc view
@@ -1,154 +1,167 @@-{-# LANGUAGE ForeignFunctionInterface #-}+{-# LANGUAGE ForeignFunctionInterface, InterruptibleFFI #-} module HROOT.Core.TAttPad.FFI where+import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr import HROOT.Core.TAttPad.RawType+import HROOT.Core.TAttPad.RawType -foreign import ccall safe "HROOTCoreTAttPad.h TAttPad_delete"- c_tattpad_delete :: Ptr RawTAttPad -> IO ()+foreign import ccall interruptible+ "HROOTCoreTAttPad.h TAttPad_delete" c_tattpad_delete ::+ Ptr RawTAttPad -> IO () -foreign import ccall safe "HROOTCoreTAttPad.h TAttPad_newTAttPad"- c_tattpad_newtattpad :: IO (Ptr RawTAttPad)+foreign import ccall interruptible+ "HROOTCoreTAttPad.h TAttPad_newTAttPad" c_tattpad_newtattpad ::+ IO (Ptr RawTAttPad) -foreign import ccall safe- "HROOTCoreTAttPad.h TAttPad_tAttPadGetBottomMargin"- c_tattpad_tattpadgetbottommargin :: Ptr RawTAttPad -> IO CDouble+foreign import ccall interruptible+ "HROOTCoreTAttPad.h TAttPad_tAttPad_GetBottomMargin"+ c_tattpad_tattpad_getbottommargin :: Ptr RawTAttPad -> IO CFloat -foreign import ccall safe- "HROOTCoreTAttPad.h TAttPad_tAttPadGetLeftMargin"- c_tattpad_tattpadgetleftmargin :: Ptr RawTAttPad -> IO CDouble+foreign import ccall interruptible+ "HROOTCoreTAttPad.h TAttPad_tAttPad_GetLeftMargin"+ c_tattpad_tattpad_getleftmargin :: Ptr RawTAttPad -> IO CFloat -foreign import ccall safe- "HROOTCoreTAttPad.h TAttPad_tAttPadGetRightMargin"- c_tattpad_tattpadgetrightmargin :: Ptr RawTAttPad -> IO CDouble+foreign import ccall interruptible+ "HROOTCoreTAttPad.h TAttPad_tAttPad_GetRightMargin"+ c_tattpad_tattpad_getrightmargin :: Ptr RawTAttPad -> IO CFloat -foreign import ccall safe- "HROOTCoreTAttPad.h TAttPad_tAttPadGetTopMargin"- c_tattpad_tattpadgettopmargin :: Ptr RawTAttPad -> IO CDouble+foreign import ccall interruptible+ "HROOTCoreTAttPad.h TAttPad_tAttPad_GetTopMargin"+ c_tattpad_tattpad_gettopmargin :: Ptr RawTAttPad -> IO CFloat -foreign import ccall safe- "HROOTCoreTAttPad.h TAttPad_tAttPadGetAfile"- c_tattpad_tattpadgetafile :: Ptr RawTAttPad -> IO CDouble+foreign import ccall interruptible+ "HROOTCoreTAttPad.h TAttPad_tAttPad_GetAfile"+ c_tattpad_tattpad_getafile :: Ptr RawTAttPad -> IO CFloat -foreign import ccall safe- "HROOTCoreTAttPad.h TAttPad_tAttPadGetXfile"- c_tattpad_tattpadgetxfile :: Ptr RawTAttPad -> IO CDouble+foreign import ccall interruptible+ "HROOTCoreTAttPad.h TAttPad_tAttPad_GetXfile"+ c_tattpad_tattpad_getxfile :: Ptr RawTAttPad -> IO CFloat -foreign import ccall safe- "HROOTCoreTAttPad.h TAttPad_tAttPadGetYfile"- c_tattpad_tattpadgetyfile :: Ptr RawTAttPad -> IO CDouble+foreign import ccall interruptible+ "HROOTCoreTAttPad.h TAttPad_tAttPad_GetYfile"+ c_tattpad_tattpad_getyfile :: Ptr RawTAttPad -> IO CFloat -foreign import ccall safe- "HROOTCoreTAttPad.h TAttPad_tAttPadGetAstat"- c_tattpad_tattpadgetastat :: Ptr RawTAttPad -> IO CDouble+foreign import ccall interruptible+ "HROOTCoreTAttPad.h TAttPad_tAttPad_GetAstat"+ c_tattpad_tattpad_getastat :: Ptr RawTAttPad -> IO CFloat -foreign import ccall safe- "HROOTCoreTAttPad.h TAttPad_tAttPadGetXstat"- c_tattpad_tattpadgetxstat :: Ptr RawTAttPad -> IO CDouble+foreign import ccall interruptible+ "HROOTCoreTAttPad.h TAttPad_tAttPad_GetXstat"+ c_tattpad_tattpad_getxstat :: Ptr RawTAttPad -> IO CFloat -foreign import ccall safe- "HROOTCoreTAttPad.h TAttPad_tAttPadGetYstat"- c_tattpad_tattpadgetystat :: Ptr RawTAttPad -> IO CDouble+foreign import ccall interruptible+ "HROOTCoreTAttPad.h TAttPad_tAttPad_GetYstat"+ c_tattpad_tattpad_getystat :: Ptr RawTAttPad -> IO CFloat -foreign import ccall safe- "HROOTCoreTAttPad.h TAttPad_tAttPadGetFrameFillColor"- c_tattpad_tattpadgetframefillcolor :: Ptr RawTAttPad -> IO CInt+foreign import ccall interruptible+ "HROOTCoreTAttPad.h TAttPad_tAttPad_GetFrameFillColor"+ c_tattpad_tattpad_getframefillcolor :: Ptr RawTAttPad -> IO CShort -foreign import ccall safe- "HROOTCoreTAttPad.h TAttPad_tAttPadGetFrameLineColor"- c_tattpad_tattpadgetframelinecolor :: Ptr RawTAttPad -> IO CInt+foreign import ccall interruptible+ "HROOTCoreTAttPad.h TAttPad_tAttPad_GetFrameLineColor"+ c_tattpad_tattpad_getframelinecolor :: Ptr RawTAttPad -> IO CShort -foreign import ccall safe- "HROOTCoreTAttPad.h TAttPad_tAttPadGetFrameFillStyle"- c_tattpad_tattpadgetframefillstyle :: Ptr RawTAttPad -> IO CInt+foreign import ccall interruptible+ "HROOTCoreTAttPad.h TAttPad_tAttPad_GetFrameFillStyle"+ c_tattpad_tattpad_getframefillstyle :: Ptr RawTAttPad -> IO CShort -foreign import ccall safe- "HROOTCoreTAttPad.h TAttPad_tAttPadGetFrameLineStyle"- c_tattpad_tattpadgetframelinestyle :: Ptr RawTAttPad -> IO CInt+foreign import ccall interruptible+ "HROOTCoreTAttPad.h TAttPad_tAttPad_GetFrameLineStyle"+ c_tattpad_tattpad_getframelinestyle :: Ptr RawTAttPad -> IO CShort -foreign import ccall safe- "HROOTCoreTAttPad.h TAttPad_tAttPadGetFrameLineWidth"- c_tattpad_tattpadgetframelinewidth :: Ptr RawTAttPad -> IO CInt+foreign import ccall interruptible+ "HROOTCoreTAttPad.h TAttPad_tAttPad_GetFrameLineWidth"+ c_tattpad_tattpad_getframelinewidth :: Ptr RawTAttPad -> IO CShort -foreign import ccall safe- "HROOTCoreTAttPad.h TAttPad_tAttPadGetFrameBorderSize"- c_tattpad_tattpadgetframebordersize :: Ptr RawTAttPad -> IO CInt+foreign import ccall interruptible+ "HROOTCoreTAttPad.h TAttPad_tAttPad_GetFrameBorderSize"+ c_tattpad_tattpad_getframebordersize :: Ptr RawTAttPad -> IO CShort -foreign import ccall safe- "HROOTCoreTAttPad.h TAttPad_tAttPadGetFrameBorderMode"- c_tattpad_tattpadgetframebordermode :: Ptr RawTAttPad -> IO CInt+foreign import ccall interruptible+ "HROOTCoreTAttPad.h TAttPad_tAttPad_GetFrameBorderMode"+ c_tattpad_tattpad_getframebordermode :: Ptr RawTAttPad -> IO CShort -foreign import ccall safe "HROOTCoreTAttPad.h TAttPad_ResetAttPad"- c_tattpad_resetattpad :: Ptr RawTAttPad -> CString -> IO ()+foreign import ccall interruptible+ "HROOTCoreTAttPad.h TAttPad_ResetAttPad" c_tattpad_resetattpad ::+ Ptr RawTAttPad -> CString -> IO () -foreign import ccall safe+foreign import ccall interruptible "HROOTCoreTAttPad.h TAttPad_SetBottomMargin"- c_tattpad_setbottommargin :: Ptr RawTAttPad -> CDouble -> IO ()+ c_tattpad_setbottommargin :: Ptr RawTAttPad -> CFloat -> IO () -foreign import ccall safe+foreign import ccall interruptible "HROOTCoreTAttPad.h TAttPad_SetLeftMargin" c_tattpad_setleftmargin- :: Ptr RawTAttPad -> CDouble -> IO ()+ :: Ptr RawTAttPad -> CFloat -> IO () -foreign import ccall safe+foreign import ccall interruptible "HROOTCoreTAttPad.h TAttPad_SetRightMargin"- c_tattpad_setrightmargin :: Ptr RawTAttPad -> CDouble -> IO ()+ c_tattpad_setrightmargin :: Ptr RawTAttPad -> CFloat -> IO () -foreign import ccall safe "HROOTCoreTAttPad.h TAttPad_SetTopMargin"- c_tattpad_settopmargin :: Ptr RawTAttPad -> CDouble -> IO ()+foreign import ccall interruptible+ "HROOTCoreTAttPad.h TAttPad_SetTopMargin" c_tattpad_settopmargin ::+ Ptr RawTAttPad -> CFloat -> IO () -foreign import ccall safe "HROOTCoreTAttPad.h TAttPad_SetMargin"- c_tattpad_setmargin ::- Ptr RawTAttPad -> CDouble -> CDouble -> CDouble -> CDouble -> IO ()+foreign import ccall interruptible+ "HROOTCoreTAttPad.h TAttPad_SetMargin" c_tattpad_setmargin ::+ Ptr RawTAttPad -> CFloat -> CFloat -> CFloat -> CFloat -> IO () -foreign import ccall safe "HROOTCoreTAttPad.h TAttPad_SetAfile"- c_tattpad_setafile :: Ptr RawTAttPad -> CDouble -> IO ()+foreign import ccall interruptible+ "HROOTCoreTAttPad.h TAttPad_SetAfile" c_tattpad_setafile ::+ Ptr RawTAttPad -> CFloat -> IO () -foreign import ccall safe "HROOTCoreTAttPad.h TAttPad_SetXfile"- c_tattpad_setxfile :: Ptr RawTAttPad -> CDouble -> IO ()+foreign import ccall interruptible+ "HROOTCoreTAttPad.h TAttPad_SetXfile" c_tattpad_setxfile ::+ Ptr RawTAttPad -> CFloat -> IO () -foreign import ccall safe "HROOTCoreTAttPad.h TAttPad_SetYfile"- c_tattpad_setyfile :: Ptr RawTAttPad -> CDouble -> IO ()+foreign import ccall interruptible+ "HROOTCoreTAttPad.h TAttPad_SetYfile" c_tattpad_setyfile ::+ Ptr RawTAttPad -> CFloat -> IO () -foreign import ccall safe "HROOTCoreTAttPad.h TAttPad_SetAstat"- c_tattpad_setastat :: Ptr RawTAttPad -> CDouble -> IO ()+foreign import ccall interruptible+ "HROOTCoreTAttPad.h TAttPad_SetAstat" c_tattpad_setastat ::+ Ptr RawTAttPad -> CFloat -> IO () -foreign import ccall safe "HROOTCoreTAttPad.h TAttPad_SetXstat"- c_tattpad_setxstat :: Ptr RawTAttPad -> CDouble -> IO ()+foreign import ccall interruptible+ "HROOTCoreTAttPad.h TAttPad_SetXstat" c_tattpad_setxstat ::+ Ptr RawTAttPad -> CFloat -> IO () -foreign import ccall safe "HROOTCoreTAttPad.h TAttPad_SetYstat"- c_tattpad_setystat :: Ptr RawTAttPad -> CDouble -> IO ()+foreign import ccall interruptible+ "HROOTCoreTAttPad.h TAttPad_SetYstat" c_tattpad_setystat ::+ Ptr RawTAttPad -> CFloat -> IO () -foreign import ccall safe- "HROOTCoreTAttPad.h TAttPad_tAttPadSetFrameFillColor"- c_tattpad_tattpadsetframefillcolor ::- Ptr RawTAttPad -> CInt -> IO ()+foreign import ccall interruptible+ "HROOTCoreTAttPad.h TAttPad_tAttPad_SetFrameFillColor"+ c_tattpad_tattpad_setframefillcolor ::+ Ptr RawTAttPad -> CShort -> IO () -foreign import ccall safe- "HROOTCoreTAttPad.h TAttPad_tAttPadSetFrameLineColor"- c_tattpad_tattpadsetframelinecolor ::- Ptr RawTAttPad -> CInt -> IO ()+foreign import ccall interruptible+ "HROOTCoreTAttPad.h TAttPad_tAttPad_SetFrameLineColor"+ c_tattpad_tattpad_setframelinecolor ::+ Ptr RawTAttPad -> CShort -> IO () -foreign import ccall safe- "HROOTCoreTAttPad.h TAttPad_tAttPadSetFrameFillStyle"- c_tattpad_tattpadsetframefillstyle ::- Ptr RawTAttPad -> CInt -> IO ()+foreign import ccall interruptible+ "HROOTCoreTAttPad.h TAttPad_tAttPad_SetFrameFillStyle"+ c_tattpad_tattpad_setframefillstyle ::+ Ptr RawTAttPad -> CShort -> IO () -foreign import ccall safe- "HROOTCoreTAttPad.h TAttPad_tAttPadSetFrameLineStyle"- c_tattpad_tattpadsetframelinestyle ::- Ptr RawTAttPad -> CInt -> IO ()+foreign import ccall interruptible+ "HROOTCoreTAttPad.h TAttPad_tAttPad_SetFrameLineStyle"+ c_tattpad_tattpad_setframelinestyle ::+ Ptr RawTAttPad -> CShort -> IO () -foreign import ccall safe- "HROOTCoreTAttPad.h TAttPad_tAttPadSetFrameLineWidth"- c_tattpad_tattpadsetframelinewidth ::- Ptr RawTAttPad -> CInt -> IO ()+foreign import ccall interruptible+ "HROOTCoreTAttPad.h TAttPad_tAttPad_SetFrameLineWidth"+ c_tattpad_tattpad_setframelinewidth ::+ Ptr RawTAttPad -> CShort -> IO () -foreign import ccall safe- "HROOTCoreTAttPad.h TAttPad_tAttPadSetFrameBorderSize"- c_tattpad_tattpadsetframebordersize ::- Ptr RawTAttPad -> CInt -> IO ()+foreign import ccall interruptible+ "HROOTCoreTAttPad.h TAttPad_tAttPad_SetFrameBorderSize"+ c_tattpad_tattpad_setframebordersize ::+ Ptr RawTAttPad -> CShort -> IO () -foreign import ccall safe- "HROOTCoreTAttPad.h TAttPad_tAttPadSetFrameBorderMode"- c_tattpad_tattpadsetframebordermode ::+foreign import ccall interruptible+ "HROOTCoreTAttPad.h TAttPad_tAttPad_SetFrameBorderMode"+ c_tattpad_tattpad_setframebordermode :: Ptr RawTAttPad -> CInt -> IO ()
src/HROOT/Core/TAttPad/Implementation.hs view
@@ -1,22 +1,31 @@ {-# LANGUAGE EmptyDataDecls, FlexibleContexts, FlexibleInstances, ForeignFunctionInterface, IncoherentInstances,- MultiParamTypeClasses, OverlappingInstances, TypeFamilies,- TypeSynonymInstances #-}+ MultiParamTypeClasses, OverlappingInstances, TemplateHaskell,+ TypeFamilies, TypeSynonymInstances #-} module HROOT.Core.TAttPad.Implementation where-import FFICXX.Runtime.Cast+import Data.Monoid import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr+import Language.Haskell.TH+import Language.Haskell.TH.Syntax import System.IO.Unsafe+import FFICXX.Runtime.Cast+import FFICXX.Runtime.CodeGen.Cxx+import FFICXX.Runtime.TH import HROOT.Core.TAttPad.RawType import HROOT.Core.TAttPad.FFI import HROOT.Core.TAttPad.Interface import HROOT.Core.TAttPad.Cast-import HROOT.Core.Deletable.RawType-import HROOT.Core.Deletable.Cast-import HROOT.Core.Deletable.Interface+import HROOT.Core.TAttPad.RawType+import HROOT.Core.TAttPad.Cast+import HROOT.Core.TAttPad.Interface+import STD.Deletable.RawType+import STD.Deletable.Cast+import STD.Deletable.Interface -instance ITAttPad TAttPad where+instance () => ITAttPad (TAttPad) where resetAttPad = xform1 c_tattpad_resetattpad setBottomMargin = xform1 c_tattpad_setbottommargin setLeftMargin = xform1 c_tattpad_setleftmargin@@ -30,94 +39,94 @@ setXstat = xform1 c_tattpad_setxstat setYstat = xform1 c_tattpad_setystat -instance IDeletable TAttPad where+instance () => IDeletable (TAttPad) where delete = xform0 c_tattpad_delete -newTAttPad :: IO TAttPad+newTAttPad :: () => IO TAttPad newTAttPad = xformnull c_tattpad_newtattpad -tAttPadGetBottomMargin :: TAttPad -> IO CDouble-tAttPadGetBottomMargin = xform0 c_tattpad_tattpadgetbottommargin+tAttPad_GetBottomMargin :: () => TAttPad -> IO CFloat+tAttPad_GetBottomMargin = xform0 c_tattpad_tattpad_getbottommargin -tAttPadGetLeftMargin :: TAttPad -> IO CDouble-tAttPadGetLeftMargin = xform0 c_tattpad_tattpadgetleftmargin+tAttPad_GetLeftMargin :: () => TAttPad -> IO CFloat+tAttPad_GetLeftMargin = xform0 c_tattpad_tattpad_getleftmargin -tAttPadGetRightMargin :: TAttPad -> IO CDouble-tAttPadGetRightMargin = xform0 c_tattpad_tattpadgetrightmargin+tAttPad_GetRightMargin :: () => TAttPad -> IO CFloat+tAttPad_GetRightMargin = xform0 c_tattpad_tattpad_getrightmargin -tAttPadGetTopMargin :: TAttPad -> IO CDouble-tAttPadGetTopMargin = xform0 c_tattpad_tattpadgettopmargin+tAttPad_GetTopMargin :: () => TAttPad -> IO CFloat+tAttPad_GetTopMargin = xform0 c_tattpad_tattpad_gettopmargin -tAttPadGetAfile :: TAttPad -> IO CDouble-tAttPadGetAfile = xform0 c_tattpad_tattpadgetafile+tAttPad_GetAfile :: () => TAttPad -> IO CFloat+tAttPad_GetAfile = xform0 c_tattpad_tattpad_getafile -tAttPadGetXfile :: TAttPad -> IO CDouble-tAttPadGetXfile = xform0 c_tattpad_tattpadgetxfile+tAttPad_GetXfile :: () => TAttPad -> IO CFloat+tAttPad_GetXfile = xform0 c_tattpad_tattpad_getxfile -tAttPadGetYfile :: TAttPad -> IO CDouble-tAttPadGetYfile = xform0 c_tattpad_tattpadgetyfile+tAttPad_GetYfile :: () => TAttPad -> IO CFloat+tAttPad_GetYfile = xform0 c_tattpad_tattpad_getyfile -tAttPadGetAstat :: TAttPad -> IO CDouble-tAttPadGetAstat = xform0 c_tattpad_tattpadgetastat+tAttPad_GetAstat :: () => TAttPad -> IO CFloat+tAttPad_GetAstat = xform0 c_tattpad_tattpad_getastat -tAttPadGetXstat :: TAttPad -> IO CDouble-tAttPadGetXstat = xform0 c_tattpad_tattpadgetxstat+tAttPad_GetXstat :: () => TAttPad -> IO CFloat+tAttPad_GetXstat = xform0 c_tattpad_tattpad_getxstat -tAttPadGetYstat :: TAttPad -> IO CDouble-tAttPadGetYstat = xform0 c_tattpad_tattpadgetystat+tAttPad_GetYstat :: () => TAttPad -> IO CFloat+tAttPad_GetYstat = xform0 c_tattpad_tattpad_getystat -tAttPadGetFrameFillColor :: TAttPad -> IO CInt-tAttPadGetFrameFillColor- = xform0 c_tattpad_tattpadgetframefillcolor+tAttPad_GetFrameFillColor :: () => TAttPad -> IO CShort+tAttPad_GetFrameFillColor+ = xform0 c_tattpad_tattpad_getframefillcolor -tAttPadGetFrameLineColor :: TAttPad -> IO CInt-tAttPadGetFrameLineColor- = xform0 c_tattpad_tattpadgetframelinecolor+tAttPad_GetFrameLineColor :: () => TAttPad -> IO CShort+tAttPad_GetFrameLineColor+ = xform0 c_tattpad_tattpad_getframelinecolor -tAttPadGetFrameFillStyle :: TAttPad -> IO CInt-tAttPadGetFrameFillStyle- = xform0 c_tattpad_tattpadgetframefillstyle+tAttPad_GetFrameFillStyle :: () => TAttPad -> IO CShort+tAttPad_GetFrameFillStyle+ = xform0 c_tattpad_tattpad_getframefillstyle -tAttPadGetFrameLineStyle :: TAttPad -> IO CInt-tAttPadGetFrameLineStyle- = xform0 c_tattpad_tattpadgetframelinestyle+tAttPad_GetFrameLineStyle :: () => TAttPad -> IO CShort+tAttPad_GetFrameLineStyle+ = xform0 c_tattpad_tattpad_getframelinestyle -tAttPadGetFrameLineWidth :: TAttPad -> IO CInt-tAttPadGetFrameLineWidth- = xform0 c_tattpad_tattpadgetframelinewidth+tAttPad_GetFrameLineWidth :: () => TAttPad -> IO CShort+tAttPad_GetFrameLineWidth+ = xform0 c_tattpad_tattpad_getframelinewidth -tAttPadGetFrameBorderSize :: TAttPad -> IO CInt-tAttPadGetFrameBorderSize- = xform0 c_tattpad_tattpadgetframebordersize+tAttPad_GetFrameBorderSize :: () => TAttPad -> IO CShort+tAttPad_GetFrameBorderSize+ = xform0 c_tattpad_tattpad_getframebordersize -tAttPadGetFrameBorderMode :: TAttPad -> IO CInt-tAttPadGetFrameBorderMode- = xform0 c_tattpad_tattpadgetframebordermode+tAttPad_GetFrameBorderMode :: () => TAttPad -> IO CShort+tAttPad_GetFrameBorderMode+ = xform0 c_tattpad_tattpad_getframebordermode -tAttPadSetFrameFillColor :: TAttPad -> CInt -> IO ()-tAttPadSetFrameFillColor- = xform1 c_tattpad_tattpadsetframefillcolor+tAttPad_SetFrameFillColor :: () => TAttPad -> CShort -> IO ()+tAttPad_SetFrameFillColor+ = xform1 c_tattpad_tattpad_setframefillcolor -tAttPadSetFrameLineColor :: TAttPad -> CInt -> IO ()-tAttPadSetFrameLineColor- = xform1 c_tattpad_tattpadsetframelinecolor+tAttPad_SetFrameLineColor :: () => TAttPad -> CShort -> IO ()+tAttPad_SetFrameLineColor+ = xform1 c_tattpad_tattpad_setframelinecolor -tAttPadSetFrameFillStyle :: TAttPad -> CInt -> IO ()-tAttPadSetFrameFillStyle- = xform1 c_tattpad_tattpadsetframefillstyle+tAttPad_SetFrameFillStyle :: () => TAttPad -> CShort -> IO ()+tAttPad_SetFrameFillStyle+ = xform1 c_tattpad_tattpad_setframefillstyle -tAttPadSetFrameLineStyle :: TAttPad -> CInt -> IO ()-tAttPadSetFrameLineStyle- = xform1 c_tattpad_tattpadsetframelinestyle+tAttPad_SetFrameLineStyle :: () => TAttPad -> CShort -> IO ()+tAttPad_SetFrameLineStyle+ = xform1 c_tattpad_tattpad_setframelinestyle -tAttPadSetFrameLineWidth :: TAttPad -> CInt -> IO ()-tAttPadSetFrameLineWidth- = xform1 c_tattpad_tattpadsetframelinewidth+tAttPad_SetFrameLineWidth :: () => TAttPad -> CShort -> IO ()+tAttPad_SetFrameLineWidth+ = xform1 c_tattpad_tattpad_setframelinewidth -tAttPadSetFrameBorderSize :: TAttPad -> CInt -> IO ()-tAttPadSetFrameBorderSize- = xform1 c_tattpad_tattpadsetframebordersize+tAttPad_SetFrameBorderSize :: () => TAttPad -> CShort -> IO ()+tAttPad_SetFrameBorderSize+ = xform1 c_tattpad_tattpad_setframebordersize -tAttPadSetFrameBorderMode :: TAttPad -> CInt -> IO ()-tAttPadSetFrameBorderMode- = xform1 c_tattpad_tattpadsetframebordermode+tAttPad_SetFrameBorderMode :: () => TAttPad -> CInt -> IO ()+tAttPad_SetFrameBorderMode+ = xform1 c_tattpad_tattpad_setframebordermode
src/HROOT/Core/TAttPad/Interface.hs view
@@ -4,36 +4,38 @@ TypeSynonymInstances #-} module HROOT.Core.TAttPad.Interface where import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr import FFICXX.Runtime.Cast import HROOT.Core.TAttPad.RawType-import HROOT.Core.Deletable.Interface+import STD.Deletable.Interface -class IDeletable a => ITAttPad a where- resetAttPad :: Castable c0 CString => a -> c0 -> IO ()+class (IDeletable a) => ITAttPad a where+ resetAttPad :: (Castable c0 CString) => a -> c0 -> IO () - setBottomMargin :: a -> CDouble -> IO ()+ setBottomMargin :: () => a -> CFloat -> IO () - setLeftMargin :: a -> CDouble -> IO ()+ setLeftMargin :: () => a -> CFloat -> IO () - setRightMargin :: a -> CDouble -> IO ()+ setRightMargin :: () => a -> CFloat -> IO () - setTopMargin :: a -> CDouble -> IO ()+ setTopMargin :: () => a -> CFloat -> IO () - setMargin :: a -> CDouble -> CDouble -> CDouble -> CDouble -> IO ()+ setMargin ::+ () => a -> CFloat -> CFloat -> CFloat -> CFloat -> IO () - setAfile :: a -> CDouble -> IO ()+ setAfile :: () => a -> CFloat -> IO () - setXfile :: a -> CDouble -> IO ()+ setXfile :: () => a -> CFloat -> IO () - setYfile :: a -> CDouble -> IO ()+ setYfile :: () => a -> CFloat -> IO () - setAstat :: a -> CDouble -> IO ()+ setAstat :: () => a -> CFloat -> IO () - setXstat :: a -> CDouble -> IO ()+ setXstat :: () => a -> CFloat -> IO () - setYstat :: a -> CDouble -> IO ()+ setYstat :: () => a -> CFloat -> IO () upcastTAttPad :: forall a . (FPtr a, ITAttPad a) => a -> TAttPad upcastTAttPad h
src/HROOT/Core/TAttPad/RawType.hs view
@@ -8,9 +8,9 @@ data RawTAttPad newtype TAttPad = TAttPad (Ptr RawTAttPad)- deriving (Eq, Ord, Show)+ deriving (Eq, Ord, Show) -instance FPtr TAttPad where+instance () => FPtr (TAttPad) where type Raw TAttPad = RawTAttPad get_fptr (TAttPad ptr) = ptr cast_fptr_to_obj = TAttPad
src/HROOT/Core/TAttText/Cast.hs view
@@ -8,11 +8,11 @@ import HROOT.Core.TAttText.RawType import HROOT.Core.TAttText.Interface -instance (ITAttText a, FPtr a) => Castable a (Ptr RawTAttText)+instance (ITAttText a, FPtr a) => Castable (a) (Ptr RawTAttText) where cast x f = f (castPtr (get_fptr x)) uncast x f = f (cast_fptr_to_obj (castPtr x)) -instance Castable TAttText (Ptr RawTAttText) where+instance () => Castable (TAttText) (Ptr RawTAttText) where cast x f = f (castPtr (get_fptr x)) uncast x f = f (cast_fptr_to_obj (castPtr x))
src/HROOT/Core/TAttText/FFI.hsc view
@@ -1,65 +1,70 @@-{-# LANGUAGE ForeignFunctionInterface #-}+{-# LANGUAGE ForeignFunctionInterface, InterruptibleFFI #-} module HROOT.Core.TAttText.FFI where+import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr import HROOT.Core.TAttText.RawType+import HROOT.Core.TAttText.RawType -foreign import ccall safe "HROOTCoreTAttText.h TAttText_delete"- c_tatttext_delete :: Ptr RawTAttText -> IO ()+foreign import ccall interruptible+ "HROOTCoreTAttText.h TAttText_delete" c_tatttext_delete ::+ Ptr RawTAttText -> IO () -foreign import ccall safe+foreign import ccall interruptible "HROOTCoreTAttText.h TAttText_newTAttText" c_tatttext_newtatttext ::- CInt -> CDouble -> CInt -> CInt -> CDouble -> IO (Ptr RawTAttText)+ CInt ->+ CFloat -> CShort -> CShort -> CFloat -> IO (Ptr RawTAttText) -foreign import ccall safe+foreign import ccall interruptible "HROOTCoreTAttText.h TAttText_GetTextAlign" c_tatttext_gettextalign- :: Ptr RawTAttText -> IO CInt+ :: Ptr RawTAttText -> IO CShort -foreign import ccall safe+foreign import ccall interruptible "HROOTCoreTAttText.h TAttText_GetTextAngle" c_tatttext_gettextangle- :: Ptr RawTAttText -> IO CDouble+ :: Ptr RawTAttText -> IO CFloat -foreign import ccall safe+foreign import ccall interruptible "HROOTCoreTAttText.h TAttText_GetTextColor" c_tatttext_gettextcolor- :: Ptr RawTAttText -> IO CInt+ :: Ptr RawTAttText -> IO CShort -foreign import ccall safe+foreign import ccall interruptible "HROOTCoreTAttText.h TAttText_GetTextFont" c_tatttext_gettextfont- :: Ptr RawTAttText -> IO CInt+ :: Ptr RawTAttText -> IO CShort -foreign import ccall safe+foreign import ccall interruptible "HROOTCoreTAttText.h TAttText_GetTextSize" c_tatttext_gettextsize- :: Ptr RawTAttText -> IO CDouble+ :: Ptr RawTAttText -> IO CFloat -foreign import ccall safe+foreign import ccall interruptible "HROOTCoreTAttText.h TAttText_ResetAttText" c_tatttext_resetatttext :: Ptr RawTAttText -> CString -> IO () -foreign import ccall safe+foreign import ccall interruptible "HROOTCoreTAttText.h TAttText_SetTextAttributes" c_tatttext_settextattributes :: Ptr RawTAttText -> IO () -foreign import ccall safe+foreign import ccall interruptible "HROOTCoreTAttText.h TAttText_SetTextAlign" c_tatttext_settextalign- :: Ptr RawTAttText -> CInt -> IO ()+ :: Ptr RawTAttText -> CShort -> IO () -foreign import ccall safe+foreign import ccall interruptible "HROOTCoreTAttText.h TAttText_SetTextAngle" c_tatttext_settextangle- :: Ptr RawTAttText -> CDouble -> IO ()+ :: Ptr RawTAttText -> CFloat -> IO () -foreign import ccall safe+foreign import ccall interruptible "HROOTCoreTAttText.h TAttText_SetTextColor" c_tatttext_settextcolor :: Ptr RawTAttText -> CInt -> IO () -foreign import ccall safe+foreign import ccall interruptible "HROOTCoreTAttText.h TAttText_SetTextFont" c_tatttext_settextfont- :: Ptr RawTAttText -> CInt -> IO ()+ :: Ptr RawTAttText -> CShort -> IO () -foreign import ccall safe+foreign import ccall interruptible "HROOTCoreTAttText.h TAttText_SetTextSize" c_tatttext_settextsize- :: Ptr RawTAttText -> CDouble -> IO ()+ :: Ptr RawTAttText -> CFloat -> IO () -foreign import ccall safe+foreign import ccall interruptible "HROOTCoreTAttText.h TAttText_SetTextSizePixels" c_tatttext_settextsizepixels :: Ptr RawTAttText -> CInt -> IO ()
src/HROOT/Core/TAttText/Implementation.hs view
@@ -1,22 +1,31 @@ {-# LANGUAGE EmptyDataDecls, FlexibleContexts, FlexibleInstances, ForeignFunctionInterface, IncoherentInstances,- MultiParamTypeClasses, OverlappingInstances, TypeFamilies,- TypeSynonymInstances #-}+ MultiParamTypeClasses, OverlappingInstances, TemplateHaskell,+ TypeFamilies, TypeSynonymInstances #-} module HROOT.Core.TAttText.Implementation where-import FFICXX.Runtime.Cast+import Data.Monoid import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr+import Language.Haskell.TH+import Language.Haskell.TH.Syntax import System.IO.Unsafe+import FFICXX.Runtime.Cast+import FFICXX.Runtime.CodeGen.Cxx+import FFICXX.Runtime.TH import HROOT.Core.TAttText.RawType import HROOT.Core.TAttText.FFI import HROOT.Core.TAttText.Interface import HROOT.Core.TAttText.Cast-import HROOT.Core.Deletable.RawType-import HROOT.Core.Deletable.Cast-import HROOT.Core.Deletable.Interface+import HROOT.Core.TAttText.RawType+import HROOT.Core.TAttText.Cast+import HROOT.Core.TAttText.Interface+import STD.Deletable.RawType+import STD.Deletable.Cast+import STD.Deletable.Interface -instance ITAttText TAttText where+instance () => ITAttText (TAttText) where getTextAlign = xform0 c_tatttext_gettextalign getTextAngle = xform0 c_tatttext_gettextangle getTextColor = xform0 c_tatttext_gettextcolor@@ -31,9 +40,9 @@ setTextSize = xform1 c_tatttext_settextsize setTextSizePixels = xform1 c_tatttext_settextsizepixels -instance IDeletable TAttText where+instance () => IDeletable (TAttText) where delete = xform0 c_tatttext_delete newTAttText ::- CInt -> CDouble -> CInt -> CInt -> CDouble -> IO TAttText+ () => CInt -> CFloat -> CShort -> CShort -> CFloat -> IO TAttText newTAttText = xform4 c_tatttext_newtatttext
src/HROOT/Core/TAttText/Interface.hs view
@@ -4,38 +4,39 @@ TypeSynonymInstances #-} module HROOT.Core.TAttText.Interface where import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr import FFICXX.Runtime.Cast import HROOT.Core.TAttText.RawType-import HROOT.Core.Deletable.Interface+import STD.Deletable.Interface -class IDeletable a => ITAttText a where- getTextAlign :: a -> IO CInt+class (IDeletable a) => ITAttText a where+ getTextAlign :: () => a -> IO CShort - getTextAngle :: a -> IO CDouble+ getTextAngle :: () => a -> IO CFloat - getTextColor :: a -> IO CInt+ getTextColor :: () => a -> IO CShort - getTextFont :: a -> IO CInt+ getTextFont :: () => a -> IO CShort - getTextSize :: a -> IO CDouble+ getTextSize :: () => a -> IO CFloat - resetAttText :: Castable c0 CString => a -> c0 -> IO ()+ resetAttText :: (Castable c0 CString) => a -> c0 -> IO () - setTextAttributes :: a -> IO ()+ setTextAttributes :: () => a -> IO () - setTextAlign :: a -> CInt -> IO ()+ setTextAlign :: () => a -> CShort -> IO () - setTextAngle :: a -> CDouble -> IO ()+ setTextAngle :: () => a -> CFloat -> IO () - setTextColor :: a -> CInt -> IO ()+ setTextColor :: () => a -> CInt -> IO () - setTextFont :: a -> CInt -> IO ()+ setTextFont :: () => a -> CShort -> IO () - setTextSize :: a -> CDouble -> IO ()+ setTextSize :: () => a -> CFloat -> IO () - setTextSizePixels :: a -> CInt -> IO ()+ setTextSizePixels :: () => a -> CInt -> IO () upcastTAttText :: forall a . (FPtr a, ITAttText a) => a -> TAttText upcastTAttText h
src/HROOT/Core/TAttText/RawType.hs view
@@ -8,9 +8,9 @@ data RawTAttText newtype TAttText = TAttText (Ptr RawTAttText)- deriving (Eq, Ord, Show)+ deriving (Eq, Ord, Show) -instance FPtr TAttText where+instance () => FPtr (TAttText) where type Raw TAttText = RawTAttText get_fptr (TAttText ptr) = ptr cast_fptr_to_obj = TAttText
src/HROOT/Core/TClass/Cast.hs view
@@ -8,10 +8,10 @@ import HROOT.Core.TClass.RawType import HROOT.Core.TClass.Interface -instance (ITClass a, FPtr a) => Castable a (Ptr RawTClass) where+instance (ITClass a, FPtr a) => Castable (a) (Ptr RawTClass) where cast x f = f (castPtr (get_fptr x)) uncast x f = f (cast_fptr_to_obj (castPtr x)) -instance Castable TClass (Ptr RawTClass) where+instance () => Castable (TClass) (Ptr RawTClass) where cast x f = f (castPtr (get_fptr x)) uncast x f = f (cast_fptr_to_obj (castPtr x))
src/HROOT/Core/TClass/FFI.hsc view
@@ -1,45 +1,61 @@-{-# LANGUAGE ForeignFunctionInterface #-}+{-# LANGUAGE ForeignFunctionInterface, InterruptibleFFI #-} module HROOT.Core.TClass.FFI where+import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr import HROOT.Core.TClass.RawType+import HROOT.Core.TClass.RawType import HROOT.Core.TObject.RawType -foreign import ccall safe "HROOTCoreTClass.h TClass_SetName"- c_tclass_setname :: Ptr RawTClass -> CString -> IO ()+foreign import ccall interruptible+ "HROOTCoreTClass.h TClass_SetName" c_tclass_setname ::+ Ptr RawTClass -> CString -> IO () -foreign import ccall safe "HROOTCoreTClass.h TClass_SetNameTitle"- c_tclass_setnametitle ::+foreign import ccall interruptible+ "HROOTCoreTClass.h TClass_SetNameTitle" c_tclass_setnametitle :: Ptr RawTClass -> CString -> CString -> IO () -foreign import ccall safe "HROOTCoreTClass.h TClass_SetTitle"- c_tclass_settitle :: Ptr RawTClass -> CString -> IO ()+foreign import ccall interruptible+ "HROOTCoreTClass.h TClass_SetTitle" c_tclass_settitle ::+ Ptr RawTClass -> CString -> IO () -foreign import ccall safe "HROOTCoreTClass.h TClass_Draw"+foreign import ccall interruptible "HROOTCoreTClass.h TClass_Clear"+ c_tclass_clear :: Ptr RawTClass -> CString -> IO ()++foreign import ccall interruptible "HROOTCoreTClass.h TClass_Draw" c_tclass_draw :: Ptr RawTClass -> CString -> IO () -foreign import ccall safe "HROOTCoreTClass.h TClass_FindObject"- c_tclass_findobject ::+foreign import ccall interruptible+ "HROOTCoreTClass.h TClass_FindObject" c_tclass_findobject :: Ptr RawTClass -> CString -> IO (Ptr RawTObject) -foreign import ccall safe "HROOTCoreTClass.h TClass_GetName"- c_tclass_getname :: Ptr RawTClass -> IO CString+foreign import ccall interruptible+ "HROOTCoreTClass.h TClass_GetName" c_tclass_getname ::+ Ptr RawTClass -> IO CString -foreign import ccall safe "HROOTCoreTClass.h TClass_IsA"+foreign import ccall interruptible "HROOTCoreTClass.h TClass_IsA" c_tclass_isa :: Ptr RawTClass -> IO (Ptr RawTClass) -foreign import ccall safe "HROOTCoreTClass.h TClass_Paint"+foreign import ccall interruptible "HROOTCoreTClass.h TClass_Paint" c_tclass_paint :: Ptr RawTClass -> CString -> IO () -foreign import ccall safe "HROOTCoreTClass.h TClass_printObj"- c_tclass_printobj :: Ptr RawTClass -> CString -> IO ()+foreign import ccall interruptible+ "HROOTCoreTClass.h TClass_printObj" c_tclass_printobj ::+ Ptr RawTClass -> CString -> IO () -foreign import ccall safe "HROOTCoreTClass.h TClass_SaveAs"- c_tclass_saveas :: Ptr RawTClass -> CString -> CString -> IO ()+foreign import ccall interruptible+ "HROOTCoreTClass.h TClass_SaveAs" c_tclass_saveas ::+ Ptr RawTClass -> CString -> CString -> IO () -foreign import ccall safe "HROOTCoreTClass.h TClass_Write"+foreign import ccall interruptible "HROOTCoreTClass.h TClass_Write" c_tclass_write :: Ptr RawTClass -> CString -> CInt -> CInt -> IO CInt -foreign import ccall safe "HROOTCoreTClass.h TClass_delete"- c_tclass_delete :: Ptr RawTClass -> IO ()+foreign import ccall interruptible+ "HROOTCoreTClass.h TClass_Write_" c_tclass_write_ ::+ Ptr RawTClass -> IO CInt++foreign import ccall interruptible+ "HROOTCoreTClass.h TClass_delete" c_tclass_delete ::+ Ptr RawTClass -> IO ()
src/HROOT/Core/TClass/Implementation.hs view
@@ -1,17 +1,26 @@ {-# LANGUAGE EmptyDataDecls, FlexibleContexts, FlexibleInstances, ForeignFunctionInterface, IncoherentInstances,- MultiParamTypeClasses, OverlappingInstances, TypeFamilies,- TypeSynonymInstances #-}+ MultiParamTypeClasses, OverlappingInstances, TemplateHaskell,+ TypeFamilies, TypeSynonymInstances #-} module HROOT.Core.TClass.Implementation where-import FFICXX.Runtime.Cast+import Data.Monoid import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr+import Language.Haskell.TH+import Language.Haskell.TH.Syntax import System.IO.Unsafe+import FFICXX.Runtime.Cast+import FFICXX.Runtime.CodeGen.Cxx+import FFICXX.Runtime.TH import HROOT.Core.TClass.RawType import HROOT.Core.TClass.FFI import HROOT.Core.TClass.Interface import HROOT.Core.TClass.Cast+import HROOT.Core.TClass.RawType+import HROOT.Core.TClass.Cast+import HROOT.Core.TClass.Interface import HROOT.Core.TDictionary.RawType import HROOT.Core.TDictionary.Cast import HROOT.Core.TDictionary.Interface@@ -21,20 +30,21 @@ 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+import STD.Deletable.RawType+import STD.Deletable.Cast+import STD.Deletable.Interface -instance ITClass TClass+instance () => ITClass (TClass) where -instance ITDictionary TClass+instance () => ITDictionary (TClass) where -instance ITNamed TClass where+instance () => ITNamed (TClass) where setName = xform1 c_tclass_setname setNameTitle = xform2 c_tclass_setnametitle setTitle = xform1 c_tclass_settitle -instance ITObject TClass where+instance () => ITObject (TClass) where+ clear = xform1 c_tclass_clear draw = xform1 c_tclass_draw findObject = xform1 c_tclass_findobject getName = xform0 c_tclass_getname@@ -43,6 +53,7 @@ printObj = xform1 c_tclass_printobj saveAs = xform2 c_tclass_saveas write = xform3 c_tclass_write+ write_ = xform0 c_tclass_write_ -instance IDeletable TClass where+instance () => IDeletable (TClass) where delete = xform0 c_tclass_delete
src/HROOT/Core/TClass/Interface.hs view
@@ -4,13 +4,14 @@ TypeSynonymInstances #-} module HROOT.Core.TClass.Interface where import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr import FFICXX.Runtime.Cast import HROOT.Core.TClass.RawType import HROOT.Core.TDictionary.Interface -class ITDictionary a => ITClass a+class (ITDictionary a) => ITClass a where upcastTClass :: forall a . (FPtr a, ITClass a) => a -> TClass upcastTClass h
− src/HROOT/Core/TClass/Interface.hs-boot
@@ -1,3 +0,0 @@-module HROOT.Core.TClass.Interface where--class ITClass a
src/HROOT/Core/TClass/RawType.hs view
@@ -8,9 +8,9 @@ data RawTClass newtype TClass = TClass (Ptr RawTClass)- deriving (Eq, Ord, Show)+ deriving (Eq, Ord, Show) -instance FPtr TClass where+instance () => FPtr (TClass) where type Raw TClass = RawTClass get_fptr (TClass ptr) = ptr cast_fptr_to_obj = TClass
src/HROOT/Core/TCollection/Cast.hs view
@@ -8,11 +8,12 @@ import HROOT.Core.TCollection.RawType import HROOT.Core.TCollection.Interface -instance (ITCollection a, FPtr a) => Castable a- (Ptr RawTCollection) where+instance (ITCollection a, FPtr a) =>+ Castable (a) (Ptr RawTCollection)+ where cast x f = f (castPtr (get_fptr x)) uncast x f = f (cast_fptr_to_obj (castPtr x)) -instance Castable TCollection (Ptr RawTCollection) where+instance () => Castable (TCollection) (Ptr RawTCollection) where cast x f = f (castPtr (get_fptr x)) uncast x f = f (cast_fptr_to_obj (castPtr x))
src/HROOT/Core/TCollection/FFI.hsc view
@@ -1,42 +1,55 @@-{-# LANGUAGE ForeignFunctionInterface #-}+{-# LANGUAGE ForeignFunctionInterface, InterruptibleFFI #-} module HROOT.Core.TCollection.FFI where+import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr import HROOT.Core.TCollection.RawType+import HROOT.Core.TCollection.RawType import HROOT.Core.TObject.RawType import HROOT.Core.TClass.RawType -foreign import ccall safe "HROOTCoreTCollection.h TCollection_Draw"- c_tcollection_draw :: Ptr RawTCollection -> CString -> IO ()+foreign import ccall interruptible+ "HROOTCoreTCollection.h TCollection_Clear" c_tcollection_clear ::+ Ptr RawTCollection -> CString -> IO () -foreign import ccall safe+foreign import ccall interruptible+ "HROOTCoreTCollection.h TCollection_Draw" c_tcollection_draw ::+ Ptr RawTCollection -> CString -> IO ()++foreign import ccall interruptible "HROOTCoreTCollection.h TCollection_FindObject" c_tcollection_findobject :: Ptr RawTCollection -> CString -> IO (Ptr RawTObject) -foreign import ccall safe+foreign import ccall interruptible "HROOTCoreTCollection.h TCollection_GetName" c_tcollection_getname :: Ptr RawTCollection -> IO CString -foreign import ccall safe "HROOTCoreTCollection.h TCollection_IsA"- c_tcollection_isa :: Ptr RawTCollection -> IO (Ptr RawTClass)+foreign import ccall interruptible+ "HROOTCoreTCollection.h TCollection_IsA" c_tcollection_isa ::+ Ptr RawTCollection -> IO (Ptr RawTClass) -foreign import ccall safe+foreign import ccall interruptible "HROOTCoreTCollection.h TCollection_Paint" c_tcollection_paint :: Ptr RawTCollection -> CString -> IO () -foreign import ccall safe+foreign import ccall interruptible "HROOTCoreTCollection.h TCollection_printObj" c_tcollection_printobj :: Ptr RawTCollection -> CString -> IO () -foreign import ccall safe+foreign import ccall interruptible "HROOTCoreTCollection.h TCollection_SaveAs" c_tcollection_saveas :: Ptr RawTCollection -> CString -> CString -> IO () -foreign import ccall safe+foreign import ccall interruptible "HROOTCoreTCollection.h TCollection_Write" c_tcollection_write :: Ptr RawTCollection -> CString -> CInt -> CInt -> IO CInt -foreign import ccall safe+foreign import ccall interruptible+ "HROOTCoreTCollection.h TCollection_Write_" c_tcollection_write_ ::+ Ptr RawTCollection -> IO CInt++foreign import ccall interruptible "HROOTCoreTCollection.h TCollection_delete" c_tcollection_delete :: Ptr RawTCollection -> IO ()
src/HROOT/Core/TCollection/Implementation.hs view
@@ -1,30 +1,40 @@ {-# LANGUAGE EmptyDataDecls, FlexibleContexts, FlexibleInstances, ForeignFunctionInterface, IncoherentInstances,- MultiParamTypeClasses, OverlappingInstances, TypeFamilies,- TypeSynonymInstances #-}+ MultiParamTypeClasses, OverlappingInstances, TemplateHaskell,+ TypeFamilies, TypeSynonymInstances #-} module HROOT.Core.TCollection.Implementation where-import FFICXX.Runtime.Cast+import Data.Monoid import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr+import Language.Haskell.TH+import Language.Haskell.TH.Syntax import System.IO.Unsafe+import FFICXX.Runtime.Cast+import FFICXX.Runtime.CodeGen.Cxx+import FFICXX.Runtime.TH import HROOT.Core.TCollection.RawType import HROOT.Core.TCollection.FFI import HROOT.Core.TCollection.Interface import HROOT.Core.TCollection.Cast+import HROOT.Core.TCollection.RawType+import HROOT.Core.TCollection.Cast+import HROOT.Core.TCollection.Interface import HROOT.Core.TClass.RawType import HROOT.Core.TClass.Cast import HROOT.Core.TClass.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+import STD.Deletable.RawType+import STD.Deletable.Cast+import STD.Deletable.Interface -instance ITCollection TCollection+instance () => ITCollection (TCollection) where -instance ITObject TCollection where+instance () => ITObject (TCollection) where+ clear = xform1 c_tcollection_clear draw = xform1 c_tcollection_draw findObject = xform1 c_tcollection_findobject getName = xform0 c_tcollection_getname@@ -33,6 +43,7 @@ printObj = xform1 c_tcollection_printobj saveAs = xform2 c_tcollection_saveas write = xform3 c_tcollection_write+ write_ = xform0 c_tcollection_write_ -instance IDeletable TCollection where+instance () => IDeletable (TCollection) where delete = xform0 c_tcollection_delete
src/HROOT/Core/TCollection/Interface.hs view
@@ -4,13 +4,14 @@ TypeSynonymInstances #-} module HROOT.Core.TCollection.Interface where import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr import FFICXX.Runtime.Cast import HROOT.Core.TCollection.RawType import HROOT.Core.TObject.Interface -class ITObject a => ITCollection a+class (ITObject a) => ITCollection a where upcastTCollection :: forall a . (FPtr a, ITCollection a) => a -> TCollection
src/HROOT/Core/TCollection/RawType.hs view
@@ -8,9 +8,9 @@ data RawTCollection newtype TCollection = TCollection (Ptr RawTCollection)- deriving (Eq, Ord, Show)+ deriving (Eq, Ord, Show) -instance FPtr TCollection where+instance () => FPtr (TCollection) where type Raw TCollection = RawTCollection get_fptr (TCollection ptr) = ptr cast_fptr_to_obj = TCollection
+ src/HROOT/Core/TColor.hs view
@@ -0,0 +1,7 @@+module HROOT.Core.TColor+ (TColor(..), ITColor, upcastTColor, downcastTColor, newTColor_,+ newTColor, tColor_GetPalette)+ where+import HROOT.Core.TColor.RawType+import HROOT.Core.TColor.Interface+import HROOT.Core.TColor.Implementation
+ src/HROOT/Core/TColor/Cast.hs view
@@ -0,0 +1,17 @@+{-# LANGUAGE FlexibleInstances, FlexibleContexts, TypeFamilies,+ MultiParamTypeClasses, OverlappingInstances, IncoherentInstances+ #-}+module HROOT.Core.TColor.Cast where+import Foreign.Ptr+import FFICXX.Runtime.Cast+import System.IO.Unsafe+import HROOT.Core.TColor.RawType+import HROOT.Core.TColor.Interface++instance (ITColor a, FPtr a) => Castable (a) (Ptr RawTColor) where+ cast x f = f (castPtr (get_fptr x))+ uncast x f = f (cast_fptr_to_obj (castPtr x))++instance () => Castable (TColor) (Ptr RawTColor) where+ cast x f = f (castPtr (get_fptr x))+ uncast x f = f (cast_fptr_to_obj (castPtr x))
+ src/HROOT/Core/TColor/FFI.hsc view
@@ -0,0 +1,75 @@+{-# LANGUAGE ForeignFunctionInterface, InterruptibleFFI #-}+module HROOT.Core.TColor.FFI where+import Data.Word+import Data.Int+import Foreign.C+import Foreign.Ptr+import HROOT.Core.TColor.RawType+import HROOT.Core.TColor.RawType+import HROOT.Core.TObject.RawType+import HROOT.Core.TClass.RawType+import HROOT.Core.TArrayI.RawType++foreign import ccall interruptible+ "HROOTCoreTColor.h TColor_SetName" c_tcolor_setname ::+ Ptr RawTColor -> CString -> IO ()++foreign import ccall interruptible+ "HROOTCoreTColor.h TColor_SetNameTitle" c_tcolor_setnametitle ::+ Ptr RawTColor -> CString -> CString -> IO ()++foreign import ccall interruptible+ "HROOTCoreTColor.h TColor_SetTitle" c_tcolor_settitle ::+ Ptr RawTColor -> CString -> IO ()++foreign import ccall interruptible "HROOTCoreTColor.h TColor_Clear"+ c_tcolor_clear :: Ptr RawTColor -> CString -> IO ()++foreign import ccall interruptible "HROOTCoreTColor.h TColor_Draw"+ c_tcolor_draw :: Ptr RawTColor -> CString -> IO ()++foreign import ccall interruptible+ "HROOTCoreTColor.h TColor_FindObject" c_tcolor_findobject ::+ Ptr RawTColor -> CString -> IO (Ptr RawTObject)++foreign import ccall interruptible+ "HROOTCoreTColor.h TColor_GetName" c_tcolor_getname ::+ Ptr RawTColor -> IO CString++foreign import ccall interruptible "HROOTCoreTColor.h TColor_IsA"+ c_tcolor_isa :: Ptr RawTColor -> IO (Ptr RawTClass)++foreign import ccall interruptible "HROOTCoreTColor.h TColor_Paint"+ c_tcolor_paint :: Ptr RawTColor -> CString -> IO ()++foreign import ccall interruptible+ "HROOTCoreTColor.h TColor_printObj" c_tcolor_printobj ::+ Ptr RawTColor -> CString -> IO ()++foreign import ccall interruptible+ "HROOTCoreTColor.h TColor_SaveAs" c_tcolor_saveas ::+ Ptr RawTColor -> CString -> CString -> IO ()++foreign import ccall interruptible "HROOTCoreTColor.h TColor_Write"+ c_tcolor_write ::+ Ptr RawTColor -> CString -> CInt -> CInt -> IO CInt++foreign import ccall interruptible+ "HROOTCoreTColor.h TColor_Write_" c_tcolor_write_ ::+ Ptr RawTColor -> IO CInt++foreign import ccall interruptible+ "HROOTCoreTColor.h TColor_delete" c_tcolor_delete ::+ Ptr RawTColor -> IO ()++foreign import ccall interruptible+ "HROOTCoreTColor.h TColor_newTColor_" c_tcolor_newtcolor_ ::+ IO (Ptr RawTColor)++foreign import ccall interruptible+ "HROOTCoreTColor.h TColor_newTColor" c_tcolor_newtcolor ::+ CFloat -> CFloat -> CFloat -> CFloat -> IO (Ptr RawTColor)++foreign import ccall interruptible+ "HROOTCoreTColor.h TColor_tColor_GetPalette"+ c_tcolor_tcolor_getpalette :: IO (Ptr RawTArrayI)
+ src/HROOT/Core/TColor/Implementation.hs view
@@ -0,0 +1,70 @@+{-# LANGUAGE EmptyDataDecls, FlexibleContexts, FlexibleInstances,+ ForeignFunctionInterface, IncoherentInstances,+ MultiParamTypeClasses, OverlappingInstances, TemplateHaskell,+ TypeFamilies, TypeSynonymInstances #-}+module HROOT.Core.TColor.Implementation where+import Data.Monoid+import Data.Word+import Data.Int+import Foreign.C+import Foreign.Ptr+import Language.Haskell.TH+import Language.Haskell.TH.Syntax+import System.IO.Unsafe+import FFICXX.Runtime.Cast+import FFICXX.Runtime.CodeGen.Cxx+import FFICXX.Runtime.TH+import HROOT.Core.TColor.RawType+import HROOT.Core.TColor.FFI+import HROOT.Core.TColor.Interface+import HROOT.Core.TColor.Cast+import HROOT.Core.TColor.RawType+import HROOT.Core.TColor.Cast+import HROOT.Core.TColor.Interface+import HROOT.Core.TClass.RawType+import HROOT.Core.TClass.Cast+import HROOT.Core.TClass.Interface+import HROOT.Core.TArrayI.RawType+import HROOT.Core.TArrayI.Cast+import HROOT.Core.TArrayI.Interface+import HROOT.Core.TNamed.RawType+import HROOT.Core.TNamed.Cast+import HROOT.Core.TNamed.Interface+import HROOT.Core.TObject.RawType+import HROOT.Core.TObject.Cast+import HROOT.Core.TObject.Interface+import STD.Deletable.RawType+import STD.Deletable.Cast+import STD.Deletable.Interface++instance () => ITColor (TColor) where++instance () => ITNamed (TColor) where+ setName = xform1 c_tcolor_setname+ setNameTitle = xform2 c_tcolor_setnametitle+ setTitle = xform1 c_tcolor_settitle++instance () => ITObject (TColor) where+ clear = xform1 c_tcolor_clear+ draw = xform1 c_tcolor_draw+ findObject = xform1 c_tcolor_findobject+ getName = xform0 c_tcolor_getname+ isA = xform0 c_tcolor_isa+ paint = xform1 c_tcolor_paint+ printObj = xform1 c_tcolor_printobj+ saveAs = xform2 c_tcolor_saveas+ write = xform3 c_tcolor_write+ write_ = xform0 c_tcolor_write_++instance () => IDeletable (TColor) where+ delete = xform0 c_tcolor_delete++newTColor_ :: () => IO TColor+newTColor_ = xformnull c_tcolor_newtcolor_++newTColor ::+ () => CFloat -> CFloat -> CFloat -> CFloat -> IO TColor+newTColor = xform3 c_tcolor_newtcolor++tColor_GetPalette :: () => IO TArrayI+tColor_GetPalette = xformnull c_tcolor_tcolor_getpalette
+ src/HROOT/Core/TColor/Interface.hs view
@@ -0,0 +1,26 @@+{-# LANGUAGE EmptyDataDecls, ExistentialQuantification,+ FlexibleContexts, FlexibleInstances, ForeignFunctionInterface,+ MultiParamTypeClasses, ScopedTypeVariables, TypeFamilies,+ TypeSynonymInstances #-}+module HROOT.Core.TColor.Interface where+import Data.Word+import Data.Int+import Foreign.C+import Foreign.Ptr+import FFICXX.Runtime.Cast+import HROOT.Core.TColor.RawType+import HROOT.Core.TNamed.Interface++class (ITNamed a) => ITColor a where++upcastTColor :: forall a . (FPtr a, ITColor a) => a -> TColor+upcastTColor h+ = let fh = get_fptr h+ fh2 :: Ptr RawTColor = castPtr fh+ in cast_fptr_to_obj fh2++downcastTColor :: forall a . (FPtr a, ITColor a) => TColor -> a+downcastTColor h+ = let fh = get_fptr h+ fh2 = castPtr fh+ in cast_fptr_to_obj fh2
+ src/HROOT/Core/TColor/RawType.hs view
@@ -0,0 +1,16 @@+{-# LANGUAGE ForeignFunctionInterface, TypeFamilies,+ MultiParamTypeClasses, FlexibleInstances, TypeSynonymInstances,+ EmptyDataDecls, ExistentialQuantification, ScopedTypeVariables #-}+module HROOT.Core.TColor.RawType where+import Foreign.Ptr+import FFICXX.Runtime.Cast++data RawTColor++newtype TColor = TColor (Ptr RawTColor)+ deriving (Eq, Ord, Show)++instance () => FPtr (TColor) where+ type Raw TColor = RawTColor+ get_fptr (TColor ptr) = ptr+ cast_fptr_to_obj = TColor
+ src/HROOT/Core/TDatime.hs view
@@ -0,0 +1,8 @@+module HROOT.Core.TDatime+ (TDatime(..), ITDatime(..), upcastTDatime, downcastTDatime,+ newTDatime, tDatime_GetDay, tDatime_GetHour, tDatime_GetMinute,+ tDatime_GetSecond, tDatime_GetYear, tDatime_GetMonth)+ where+import HROOT.Core.TDatime.RawType+import HROOT.Core.TDatime.Interface+import HROOT.Core.TDatime.Implementation
+ src/HROOT/Core/TDatime/Cast.hs view
@@ -0,0 +1,18 @@+{-# LANGUAGE FlexibleInstances, FlexibleContexts, TypeFamilies,+ MultiParamTypeClasses, OverlappingInstances, IncoherentInstances+ #-}+module HROOT.Core.TDatime.Cast where+import Foreign.Ptr+import FFICXX.Runtime.Cast+import System.IO.Unsafe+import HROOT.Core.TDatime.RawType+import HROOT.Core.TDatime.Interface++instance (ITDatime a, FPtr a) => Castable (a) (Ptr RawTDatime)+ where+ cast x f = f (castPtr (get_fptr x))+ uncast x f = f (cast_fptr_to_obj (castPtr x))++instance () => Castable (TDatime) (Ptr RawTDatime) where+ cast x f = f (castPtr (get_fptr x))+ uncast x f = f (cast_fptr_to_obj (castPtr x))
+ src/HROOT/Core/TDatime/FFI.hsc view
@@ -0,0 +1,48 @@+{-# LANGUAGE ForeignFunctionInterface, InterruptibleFFI #-}+module HROOT.Core.TDatime.FFI where+import Data.Word+import Data.Int+import Foreign.C+import Foreign.Ptr+import HROOT.Core.TDatime.RawType+import HROOT.Core.TDatime.RawType++foreign import ccall interruptible+ "HROOTCoreTDatime.h TDatime_delete" c_tdatime_delete ::+ Ptr RawTDatime -> IO ()++foreign import ccall interruptible+ "HROOTCoreTDatime.h TDatime_newTDatime" c_tdatime_newtdatime ::+ CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> IO (Ptr RawTDatime)++foreign import ccall interruptible+ "HROOTCoreTDatime.h TDatime_Convert" c_tdatime_convert ::+ Ptr RawTDatime -> CBool -> IO CUInt++foreign import ccall interruptible+ "HROOTCoreTDatime.h TDatime_tDatime_GetDay"+ c_tdatime_tdatime_getday :: Ptr RawTDatime -> IO CInt++foreign import ccall interruptible+ "HROOTCoreTDatime.h TDatime_tDatime_GetHour"+ c_tdatime_tdatime_gethour :: Ptr RawTDatime -> IO CInt++foreign import ccall interruptible+ "HROOTCoreTDatime.h TDatime_tDatime_GetMinute"+ c_tdatime_tdatime_getminute :: Ptr RawTDatime -> IO CInt++foreign import ccall interruptible+ "HROOTCoreTDatime.h TDatime_tDatime_GetSecond"+ c_tdatime_tdatime_getsecond :: Ptr RawTDatime -> IO CInt++foreign import ccall interruptible+ "HROOTCoreTDatime.h TDatime_tDatime_GetYear"+ c_tdatime_tdatime_getyear :: Ptr RawTDatime -> IO CInt++foreign import ccall interruptible+ "HROOTCoreTDatime.h TDatime_tDatime_GetMonth"+ c_tdatime_tdatime_getmonth :: Ptr RawTDatime -> IO CInt++foreign import ccall interruptible+ "HROOTCoreTDatime.h TDatime_setTDatime" c_tdatime_settdatime ::+ Ptr RawTDatime -> CUInt -> IO ()
+ src/HROOT/Core/TDatime/Implementation.hs view
@@ -0,0 +1,55 @@+{-# LANGUAGE EmptyDataDecls, FlexibleContexts, FlexibleInstances,+ ForeignFunctionInterface, IncoherentInstances,+ MultiParamTypeClasses, OverlappingInstances, TemplateHaskell,+ TypeFamilies, TypeSynonymInstances #-}+module HROOT.Core.TDatime.Implementation where+import Data.Monoid+import Data.Word+import Data.Int+import Foreign.C+import Foreign.Ptr+import Language.Haskell.TH+import Language.Haskell.TH.Syntax+import System.IO.Unsafe+import FFICXX.Runtime.Cast+import FFICXX.Runtime.CodeGen.Cxx+import FFICXX.Runtime.TH+import HROOT.Core.TDatime.RawType+import HROOT.Core.TDatime.FFI+import HROOT.Core.TDatime.Interface+import HROOT.Core.TDatime.Cast+import HROOT.Core.TDatime.RawType+import HROOT.Core.TDatime.Cast+import HROOT.Core.TDatime.Interface+import STD.Deletable.RawType+import STD.Deletable.Cast+import STD.Deletable.Interface++instance () => ITDatime (TDatime) where+ convert = xform1 c_tdatime_convert+ setTDatime = xform1 c_tdatime_settdatime++instance () => IDeletable (TDatime) where+ delete = xform0 c_tdatime_delete++newTDatime ::+ () => CInt -> CInt -> CInt -> CInt -> CInt -> CInt -> IO TDatime+newTDatime = xform5 c_tdatime_newtdatime++tDatime_GetDay :: () => TDatime -> IO CInt+tDatime_GetDay = xform0 c_tdatime_tdatime_getday++tDatime_GetHour :: () => TDatime -> IO CInt+tDatime_GetHour = xform0 c_tdatime_tdatime_gethour++tDatime_GetMinute :: () => TDatime -> IO CInt+tDatime_GetMinute = xform0 c_tdatime_tdatime_getminute++tDatime_GetSecond :: () => TDatime -> IO CInt+tDatime_GetSecond = xform0 c_tdatime_tdatime_getsecond++tDatime_GetYear :: () => TDatime -> IO CInt+tDatime_GetYear = xform0 c_tdatime_tdatime_getyear++tDatime_GetMonth :: () => TDatime -> IO CInt+tDatime_GetMonth = xform0 c_tdatime_tdatime_getmonth
+ src/HROOT/Core/TDatime/Interface.hs view
@@ -0,0 +1,29 @@+{-# LANGUAGE EmptyDataDecls, ExistentialQuantification,+ FlexibleContexts, FlexibleInstances, ForeignFunctionInterface,+ MultiParamTypeClasses, ScopedTypeVariables, TypeFamilies,+ TypeSynonymInstances #-}+module HROOT.Core.TDatime.Interface where+import Data.Word+import Data.Int+import Foreign.C+import Foreign.Ptr+import FFICXX.Runtime.Cast+import HROOT.Core.TDatime.RawType+import STD.Deletable.Interface++class (IDeletable a) => ITDatime a where+ convert :: () => a -> CBool -> IO CUInt+ + setTDatime :: () => a -> CUInt -> IO ()++upcastTDatime :: forall a . (FPtr a, ITDatime a) => a -> TDatime+upcastTDatime h+ = let fh = get_fptr h+ fh2 :: Ptr RawTDatime = castPtr fh+ in cast_fptr_to_obj fh2++downcastTDatime :: forall a . (FPtr a, ITDatime a) => TDatime -> a+downcastTDatime h+ = let fh = get_fptr h+ fh2 = castPtr fh+ in cast_fptr_to_obj fh2
+ src/HROOT/Core/TDatime/RawType.hs view
@@ -0,0 +1,16 @@+{-# LANGUAGE ForeignFunctionInterface, TypeFamilies,+ MultiParamTypeClasses, FlexibleInstances, TypeSynonymInstances,+ EmptyDataDecls, ExistentialQuantification, ScopedTypeVariables #-}+module HROOT.Core.TDatime.RawType where+import Foreign.Ptr+import FFICXX.Runtime.Cast++data RawTDatime++newtype TDatime = TDatime (Ptr RawTDatime)+ deriving (Eq, Ord, Show)++instance () => FPtr (TDatime) where+ type Raw TDatime = RawTDatime+ get_fptr (TDatime ptr) = ptr+ cast_fptr_to_obj = TDatime
src/HROOT/Core/TDictionary/FFI.hsc view
@@ -1,7 +1,10 @@-{-# LANGUAGE ForeignFunctionInterface #-}+{-# LANGUAGE ForeignFunctionInterface, InterruptibleFFI #-} module HROOT.Core.TDictionary.FFI where+import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr+import HROOT.Core.TDictionary.RawType import HROOT.Core.TDictionary.RawType import HROOT.Core.TObject.RawType import HROOT.Core.TClass.RawType
src/HROOT/Core/TDictionary/Implementation.hs view
@@ -1,17 +1,26 @@ {-# LANGUAGE EmptyDataDecls, FlexibleContexts, FlexibleInstances, ForeignFunctionInterface, IncoherentInstances,- MultiParamTypeClasses, OverlappingInstances, TypeFamilies,- TypeSynonymInstances #-}+ MultiParamTypeClasses, OverlappingInstances, TemplateHaskell,+ TypeFamilies, TypeSynonymInstances #-} module HROOT.Core.TDictionary.Implementation where-import FFICXX.Runtime.Cast+import Data.Monoid import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr+import Language.Haskell.TH+import Language.Haskell.TH.Syntax import System.IO.Unsafe+import FFICXX.Runtime.Cast+import FFICXX.Runtime.CodeGen.Cxx+import FFICXX.Runtime.TH import HROOT.Core.TDictionary.RawType import HROOT.Core.TDictionary.FFI import HROOT.Core.TDictionary.Interface import HROOT.Core.TDictionary.Cast+import HROOT.Core.TDictionary.RawType+import HROOT.Core.TDictionary.Cast+import HROOT.Core.TDictionary.Interface import HROOT.Core.TClass.RawType import HROOT.Core.TClass.Cast import HROOT.Core.TClass.Interface@@ -21,6 +30,6 @@ 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+import STD.Deletable.RawType+import STD.Deletable.Cast+import STD.Deletable.Interface
src/HROOT/Core/TDictionary/Interface.hs view
@@ -4,10 +4,11 @@ TypeSynonymInstances #-} module HROOT.Core.TDictionary.Interface where import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr import FFICXX.Runtime.Cast import HROOT.Core.TDictionary.RawType import HROOT.Core.TNamed.Interface -class ITNamed a => ITDictionary a+class (ITNamed a) => ITDictionary a where
src/HROOT/Core/TDirectory.hs view
@@ -1,7 +1,7 @@ module HROOT.Core.TDirectory (TDirectory(..), ITDirectory(..), upcastTDirectory,- downcastTDirectory, tDirectoryAddDirectory,- tDirectoryAddDirectoryStatus)+ downcastTDirectory, tDirectory_AddDirectory,+ tDirectory_AddDirectoryStatus) where import HROOT.Core.TDirectory.RawType import HROOT.Core.TDirectory.Interface
src/HROOT/Core/TDirectory/Cast.hs view
@@ -8,11 +8,12 @@ import HROOT.Core.TDirectory.RawType import HROOT.Core.TDirectory.Interface -instance (ITDirectory a, FPtr a) => Castable a (Ptr RawTDirectory)+instance (ITDirectory a, FPtr a) =>+ Castable (a) (Ptr RawTDirectory) where cast x f = f (castPtr (get_fptr x)) uncast x f = f (cast_fptr_to_obj (castPtr x)) -instance Castable TDirectory (Ptr RawTDirectory) where+instance () => Castable (TDirectory) (Ptr RawTDirectory) where cast x f = f (castPtr (get_fptr x)) uncast x f = f (cast_fptr_to_obj (castPtr x))
src/HROOT/Core/TDirectory/FFI.hsc view
@@ -1,86 +1,102 @@-{-# LANGUAGE ForeignFunctionInterface #-}+{-# LANGUAGE ForeignFunctionInterface, InterruptibleFFI #-} module HROOT.Core.TDirectory.FFI where+import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr import HROOT.Core.TDirectory.RawType+import HROOT.Core.TDirectory.RawType import HROOT.Core.TObject.RawType import HROOT.Core.TClass.RawType import HROOT.Core.TKey.RawType -foreign import ccall safe+foreign import ccall interruptible "HROOTCoreTDirectory.h TDirectory_SetName" c_tdirectory_setname :: Ptr RawTDirectory -> CString -> IO () -foreign import ccall safe+foreign import ccall interruptible "HROOTCoreTDirectory.h TDirectory_SetNameTitle" c_tdirectory_setnametitle :: Ptr RawTDirectory -> CString -> CString -> IO () -foreign import ccall safe+foreign import ccall interruptible "HROOTCoreTDirectory.h TDirectory_SetTitle" c_tdirectory_settitle :: Ptr RawTDirectory -> CString -> IO () -foreign import ccall safe "HROOTCoreTDirectory.h TDirectory_Draw"- c_tdirectory_draw :: Ptr RawTDirectory -> CString -> IO ()+foreign import ccall interruptible+ "HROOTCoreTDirectory.h TDirectory_Clear" c_tdirectory_clear ::+ Ptr RawTDirectory -> CString -> IO () -foreign import ccall safe+foreign import ccall interruptible+ "HROOTCoreTDirectory.h TDirectory_Draw" c_tdirectory_draw ::+ Ptr RawTDirectory -> CString -> IO ()++foreign import ccall interruptible "HROOTCoreTDirectory.h TDirectory_FindObject" c_tdirectory_findobject :: Ptr RawTDirectory -> CString -> IO (Ptr RawTObject) -foreign import ccall safe+foreign import ccall interruptible "HROOTCoreTDirectory.h TDirectory_GetName" c_tdirectory_getname :: Ptr RawTDirectory -> IO CString -foreign import ccall safe "HROOTCoreTDirectory.h TDirectory_IsA"- c_tdirectory_isa :: Ptr RawTDirectory -> IO (Ptr RawTClass)+foreign import ccall interruptible+ "HROOTCoreTDirectory.h TDirectory_IsA" c_tdirectory_isa ::+ Ptr RawTDirectory -> IO (Ptr RawTClass) -foreign import ccall safe "HROOTCoreTDirectory.h TDirectory_Paint"- c_tdirectory_paint :: Ptr RawTDirectory -> CString -> IO ()+foreign import ccall interruptible+ "HROOTCoreTDirectory.h TDirectory_Paint" c_tdirectory_paint ::+ Ptr RawTDirectory -> CString -> IO () -foreign import ccall safe+foreign import ccall interruptible "HROOTCoreTDirectory.h TDirectory_printObj" c_tdirectory_printobj :: Ptr RawTDirectory -> CString -> IO () -foreign import ccall safe "HROOTCoreTDirectory.h TDirectory_SaveAs"- c_tdirectory_saveas ::+foreign import ccall interruptible+ "HROOTCoreTDirectory.h TDirectory_SaveAs" c_tdirectory_saveas :: Ptr RawTDirectory -> CString -> CString -> IO () -foreign import ccall safe "HROOTCoreTDirectory.h TDirectory_Write"- c_tdirectory_write ::+foreign import ccall interruptible+ "HROOTCoreTDirectory.h TDirectory_Write" c_tdirectory_write :: Ptr RawTDirectory -> CString -> CInt -> CInt -> IO CInt -foreign import ccall safe "HROOTCoreTDirectory.h TDirectory_delete"- c_tdirectory_delete :: Ptr RawTDirectory -> IO ()+foreign import ccall interruptible+ "HROOTCoreTDirectory.h TDirectory_Write_" c_tdirectory_write_ ::+ Ptr RawTDirectory -> IO CInt -foreign import ccall safe- "HROOTCoreTDirectory.h TDirectory_tDirectoryAddDirectory"- c_tdirectory_tdirectoryadddirectory :: CInt -> IO ()+foreign import ccall interruptible+ "HROOTCoreTDirectory.h TDirectory_delete" c_tdirectory_delete ::+ Ptr RawTDirectory -> IO () -foreign import ccall safe- "HROOTCoreTDirectory.h TDirectory_tDirectoryAddDirectoryStatus"- c_tdirectory_tdirectoryadddirectorystatus :: IO CInt+foreign import ccall interruptible+ "HROOTCoreTDirectory.h TDirectory_tDirectory_AddDirectory"+ c_tdirectory_tdirectory_adddirectory :: CBool -> IO () -foreign import ccall safe "HROOTCoreTDirectory.h TDirectory_Append"- c_tdirectory_append ::- Ptr RawTDirectory -> Ptr RawTObject -> CInt -> IO ()+foreign import ccall interruptible+ "HROOTCoreTDirectory.h TDirectory_tDirectory_AddDirectoryStatus"+ c_tdirectory_tdirectory_adddirectorystatus :: IO CBool -foreign import ccall safe "HROOTCoreTDirectory.h TDirectory_addD"- c_tdirectory_addd ::- Ptr RawTDirectory -> Ptr RawTObject -> CInt -> IO ()+foreign import ccall interruptible+ "HROOTCoreTDirectory.h TDirectory_Append" c_tdirectory_append ::+ Ptr RawTDirectory -> Ptr RawTObject -> CBool -> IO () -foreign import ccall safe+foreign import ccall interruptible+ "HROOTCoreTDirectory.h TDirectory_addD" c_tdirectory_addd ::+ Ptr RawTDirectory -> Ptr RawTObject -> CBool -> IO ()++foreign import ccall interruptible "HROOTCoreTDirectory.h TDirectory_AppendKey" c_tdirectory_appendkey :: Ptr RawTDirectory -> Ptr RawTKey -> IO CInt -foreign import ccall safe "HROOTCoreTDirectory.h TDirectory_Close"- c_tdirectory_close :: Ptr RawTDirectory -> CString -> IO ()+foreign import ccall interruptible+ "HROOTCoreTDirectory.h TDirectory_Close" c_tdirectory_close ::+ Ptr RawTDirectory -> CString -> IO () -foreign import ccall safe "HROOTCoreTDirectory.h TDirectory_Get"- c_tdirectory_get ::+foreign import ccall interruptible+ "HROOTCoreTDirectory.h TDirectory_Get" c_tdirectory_get :: Ptr RawTDirectory -> CString -> IO (Ptr RawTObject) -foreign import ccall safe+foreign import ccall interruptible "HROOTCoreTDirectory.h TDirectory_cd_TDirectory" c_tdirectory_cd_tdirectory ::- Ptr RawTDirectory -> CString -> IO CInt+ Ptr RawTDirectory -> CString -> IO CBool
src/HROOT/Core/TDirectory/Implementation.hs view
@@ -1,17 +1,26 @@ {-# LANGUAGE EmptyDataDecls, FlexibleContexts, FlexibleInstances, ForeignFunctionInterface, IncoherentInstances,- MultiParamTypeClasses, OverlappingInstances, TypeFamilies,- TypeSynonymInstances #-}+ MultiParamTypeClasses, OverlappingInstances, TemplateHaskell,+ TypeFamilies, TypeSynonymInstances #-} module HROOT.Core.TDirectory.Implementation where-import FFICXX.Runtime.Cast+import Data.Monoid import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr+import Language.Haskell.TH+import Language.Haskell.TH.Syntax import System.IO.Unsafe+import FFICXX.Runtime.Cast+import FFICXX.Runtime.CodeGen.Cxx+import FFICXX.Runtime.TH import HROOT.Core.TDirectory.RawType import HROOT.Core.TDirectory.FFI import HROOT.Core.TDirectory.Interface import HROOT.Core.TDirectory.Cast+import HROOT.Core.TDirectory.RawType+import HROOT.Core.TDirectory.Cast+import HROOT.Core.TDirectory.Interface import HROOT.Core.TClass.RawType import HROOT.Core.TClass.Cast import HROOT.Core.TClass.Interface@@ -24,11 +33,11 @@ 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+import STD.Deletable.RawType+import STD.Deletable.Cast+import STD.Deletable.Interface -instance ITDirectory TDirectory where+instance () => ITDirectory (TDirectory) where append = xform2 c_tdirectory_append addD = xform2 c_tdirectory_addd appendKey = xform1 c_tdirectory_appendkey@@ -36,12 +45,13 @@ get = xform1 c_tdirectory_get cd_TDirectory = xform1 c_tdirectory_cd_tdirectory -instance ITNamed TDirectory where+instance () => ITNamed (TDirectory) where setName = xform1 c_tdirectory_setname setNameTitle = xform2 c_tdirectory_setnametitle setTitle = xform1 c_tdirectory_settitle -instance ITObject TDirectory where+instance () => ITObject (TDirectory) where+ clear = xform1 c_tdirectory_clear draw = xform1 c_tdirectory_draw findObject = xform1 c_tdirectory_findobject getName = xform0 c_tdirectory_getname@@ -50,13 +60,15 @@ printObj = xform1 c_tdirectory_printobj saveAs = xform2 c_tdirectory_saveas write = xform3 c_tdirectory_write+ write_ = xform0 c_tdirectory_write_ -instance IDeletable TDirectory where+instance () => IDeletable (TDirectory) where delete = xform0 c_tdirectory_delete -tDirectoryAddDirectory :: CInt -> IO ()-tDirectoryAddDirectory = xform0 c_tdirectory_tdirectoryadddirectory+tDirectory_AddDirectory :: () => CBool -> IO ()+tDirectory_AddDirectory+ = xform0 c_tdirectory_tdirectory_adddirectory -tDirectoryAddDirectoryStatus :: IO CInt-tDirectoryAddDirectoryStatus- = xformnull c_tdirectory_tdirectoryadddirectorystatus+tDirectory_AddDirectoryStatus :: () => IO CBool+tDirectory_AddDirectoryStatus+ = xformnull c_tdirectory_tdirectory_adddirectorystatus
src/HROOT/Core/TDirectory/Interface.hs view
@@ -4,27 +4,28 @@ TypeSynonymInstances #-} module HROOT.Core.TDirectory.Interface where import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr import FFICXX.Runtime.Cast import HROOT.Core.TDirectory.RawType import HROOT.Core.TObject.RawType import HROOT.Core.TNamed.Interface-import {-# SOURCE #-} HROOT.Core.TObject.Interface-import {-# SOURCE #-} HROOT.Core.TKey.Interface+import HROOT.Core.TObject.Interface+import HROOT.Core.TKey.Interface -class ITNamed a => ITDirectory a where- append :: (ITObject c0, FPtr c0) => a -> c0 -> CInt -> IO ()+class (ITNamed a) => ITDirectory a where+ append :: (ITObject c0, FPtr c0) => a -> c0 -> CBool -> IO () - addD :: (ITObject c0, FPtr c0) => a -> c0 -> CInt -> IO ()+ addD :: (ITObject c0, FPtr c0) => a -> c0 -> CBool -> IO () appendKey :: (ITKey c0, FPtr c0) => a -> c0 -> IO CInt - close :: Castable c0 CString => a -> c0 -> IO ()+ close :: (Castable c0 CString) => a -> c0 -> IO () - get :: Castable c0 CString => a -> c0 -> IO TObject+ get :: (Castable c0 CString) => a -> c0 -> IO TObject - cd_TDirectory :: Castable c0 CString => a -> c0 -> IO CInt+ cd_TDirectory :: (Castable c0 CString) => a -> c0 -> IO CBool upcastTDirectory :: forall a . (FPtr a, ITDirectory a) => a -> TDirectory
− src/HROOT/Core/TDirectory/Interface.hs-boot
@@ -1,3 +0,0 @@-module HROOT.Core.TDirectory.Interface where--class ITDirectory a
src/HROOT/Core/TDirectory/RawType.hs view
@@ -8,9 +8,9 @@ data RawTDirectory newtype TDirectory = TDirectory (Ptr RawTDirectory)- deriving (Eq, Ord, Show)+ deriving (Eq, Ord, Show) -instance FPtr TDirectory where+instance () => FPtr (TDirectory) where type Raw TDirectory = RawTDirectory get_fptr (TDirectory ptr) = ptr cast_fptr_to_obj = TDirectory
src/HROOT/Core/TGlobal/Cast.hs view
@@ -8,10 +8,11 @@ import HROOT.Core.TGlobal.RawType import HROOT.Core.TGlobal.Interface -instance (ITGlobal a, FPtr a) => Castable a (Ptr RawTGlobal) where+instance (ITGlobal a, FPtr a) => Castable (a) (Ptr RawTGlobal)+ where cast x f = f (castPtr (get_fptr x)) uncast x f = f (cast_fptr_to_obj (castPtr x)) -instance Castable TGlobal (Ptr RawTGlobal) where+instance () => Castable (TGlobal) (Ptr RawTGlobal) where cast x f = f (castPtr (get_fptr x)) uncast x f = f (cast_fptr_to_obj (castPtr x))
src/HROOT/Core/TGlobal/FFI.hsc view
@@ -1,46 +1,65 @@-{-# LANGUAGE ForeignFunctionInterface #-}+{-# LANGUAGE ForeignFunctionInterface, InterruptibleFFI #-} module HROOT.Core.TGlobal.FFI where+import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr import HROOT.Core.TGlobal.RawType+import HROOT.Core.TGlobal.RawType import HROOT.Core.TObject.RawType import HROOT.Core.TClass.RawType -foreign import ccall safe "HROOTCoreTGlobal.h TGlobal_SetName"- c_tglobal_setname :: Ptr RawTGlobal -> CString -> IO ()+foreign import ccall interruptible+ "HROOTCoreTGlobal.h TGlobal_SetName" c_tglobal_setname ::+ Ptr RawTGlobal -> CString -> IO () -foreign import ccall safe "HROOTCoreTGlobal.h TGlobal_SetNameTitle"- c_tglobal_setnametitle ::+foreign import ccall interruptible+ "HROOTCoreTGlobal.h TGlobal_SetNameTitle" c_tglobal_setnametitle :: Ptr RawTGlobal -> CString -> CString -> IO () -foreign import ccall safe "HROOTCoreTGlobal.h TGlobal_SetTitle"- c_tglobal_settitle :: Ptr RawTGlobal -> CString -> IO ()+foreign import ccall interruptible+ "HROOTCoreTGlobal.h TGlobal_SetTitle" c_tglobal_settitle ::+ Ptr RawTGlobal -> CString -> IO () -foreign import ccall safe "HROOTCoreTGlobal.h TGlobal_Draw"- c_tglobal_draw :: Ptr RawTGlobal -> CString -> IO ()+foreign import ccall interruptible+ "HROOTCoreTGlobal.h TGlobal_Clear" c_tglobal_clear ::+ Ptr RawTGlobal -> CString -> IO () -foreign import ccall safe "HROOTCoreTGlobal.h TGlobal_FindObject"- c_tglobal_findobject ::+foreign import ccall interruptible+ "HROOTCoreTGlobal.h TGlobal_Draw" c_tglobal_draw ::+ Ptr RawTGlobal -> CString -> IO ()++foreign import ccall interruptible+ "HROOTCoreTGlobal.h TGlobal_FindObject" c_tglobal_findobject :: Ptr RawTGlobal -> CString -> IO (Ptr RawTObject) -foreign import ccall safe "HROOTCoreTGlobal.h TGlobal_GetName"- c_tglobal_getname :: Ptr RawTGlobal -> IO CString+foreign import ccall interruptible+ "HROOTCoreTGlobal.h TGlobal_GetName" c_tglobal_getname ::+ Ptr RawTGlobal -> IO CString -foreign import ccall safe "HROOTCoreTGlobal.h TGlobal_IsA"+foreign import ccall interruptible "HROOTCoreTGlobal.h TGlobal_IsA" c_tglobal_isa :: Ptr RawTGlobal -> IO (Ptr RawTClass) -foreign import ccall safe "HROOTCoreTGlobal.h TGlobal_Paint"- c_tglobal_paint :: Ptr RawTGlobal -> CString -> IO ()+foreign import ccall interruptible+ "HROOTCoreTGlobal.h TGlobal_Paint" c_tglobal_paint ::+ Ptr RawTGlobal -> CString -> IO () -foreign import ccall safe "HROOTCoreTGlobal.h TGlobal_printObj"- c_tglobal_printobj :: Ptr RawTGlobal -> CString -> IO ()+foreign import ccall interruptible+ "HROOTCoreTGlobal.h TGlobal_printObj" c_tglobal_printobj ::+ Ptr RawTGlobal -> CString -> IO () -foreign import ccall safe "HROOTCoreTGlobal.h TGlobal_SaveAs"- c_tglobal_saveas :: Ptr RawTGlobal -> CString -> CString -> IO ()+foreign import ccall interruptible+ "HROOTCoreTGlobal.h TGlobal_SaveAs" c_tglobal_saveas ::+ Ptr RawTGlobal -> CString -> CString -> IO () -foreign import ccall safe "HROOTCoreTGlobal.h TGlobal_Write"- c_tglobal_write ::+foreign import ccall interruptible+ "HROOTCoreTGlobal.h TGlobal_Write" c_tglobal_write :: Ptr RawTGlobal -> CString -> CInt -> CInt -> IO CInt -foreign import ccall safe "HROOTCoreTGlobal.h TGlobal_delete"- c_tglobal_delete :: Ptr RawTGlobal -> IO ()+foreign import ccall interruptible+ "HROOTCoreTGlobal.h TGlobal_Write_" c_tglobal_write_ ::+ Ptr RawTGlobal -> IO CInt++foreign import ccall interruptible+ "HROOTCoreTGlobal.h TGlobal_delete" c_tglobal_delete ::+ Ptr RawTGlobal -> IO ()
src/HROOT/Core/TGlobal/Implementation.hs view
@@ -1,17 +1,26 @@ {-# LANGUAGE EmptyDataDecls, FlexibleContexts, FlexibleInstances, ForeignFunctionInterface, IncoherentInstances,- MultiParamTypeClasses, OverlappingInstances, TypeFamilies,- TypeSynonymInstances #-}+ MultiParamTypeClasses, OverlappingInstances, TemplateHaskell,+ TypeFamilies, TypeSynonymInstances #-} module HROOT.Core.TGlobal.Implementation where-import FFICXX.Runtime.Cast+import Data.Monoid import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr+import Language.Haskell.TH+import Language.Haskell.TH.Syntax import System.IO.Unsafe+import FFICXX.Runtime.Cast+import FFICXX.Runtime.CodeGen.Cxx+import FFICXX.Runtime.TH import HROOT.Core.TGlobal.RawType import HROOT.Core.TGlobal.FFI import HROOT.Core.TGlobal.Interface import HROOT.Core.TGlobal.Cast+import HROOT.Core.TGlobal.RawType+import HROOT.Core.TGlobal.Cast+import HROOT.Core.TGlobal.Interface import HROOT.Core.TClass.RawType import HROOT.Core.TClass.Cast import HROOT.Core.TClass.Interface@@ -24,20 +33,21 @@ 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+import STD.Deletable.RawType+import STD.Deletable.Cast+import STD.Deletable.Interface -instance ITGlobal TGlobal+instance () => ITGlobal (TGlobal) where -instance ITDictionary TGlobal+instance () => ITDictionary (TGlobal) where -instance ITNamed TGlobal where+instance () => ITNamed (TGlobal) where setName = xform1 c_tglobal_setname setNameTitle = xform2 c_tglobal_setnametitle setTitle = xform1 c_tglobal_settitle -instance ITObject TGlobal where+instance () => ITObject (TGlobal) where+ clear = xform1 c_tglobal_clear draw = xform1 c_tglobal_draw findObject = xform1 c_tglobal_findobject getName = xform0 c_tglobal_getname@@ -46,6 +56,7 @@ printObj = xform1 c_tglobal_printobj saveAs = xform2 c_tglobal_saveas write = xform3 c_tglobal_write+ write_ = xform0 c_tglobal_write_ -instance IDeletable TGlobal where+instance () => IDeletable (TGlobal) where delete = xform0 c_tglobal_delete
src/HROOT/Core/TGlobal/Interface.hs view
@@ -4,13 +4,14 @@ TypeSynonymInstances #-} module HROOT.Core.TGlobal.Interface where import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr import FFICXX.Runtime.Cast import HROOT.Core.TGlobal.RawType import HROOT.Core.TDictionary.Interface -class ITDictionary a => ITGlobal a+class (ITDictionary a) => ITGlobal a where upcastTGlobal :: forall a . (FPtr a, ITGlobal a) => a -> TGlobal upcastTGlobal h
src/HROOT/Core/TGlobal/RawType.hs view
@@ -8,9 +8,9 @@ data RawTGlobal newtype TGlobal = TGlobal (Ptr RawTGlobal)- deriving (Eq, Ord, Show)+ deriving (Eq, Ord, Show) -instance FPtr TGlobal where+instance () => FPtr (TGlobal) where type Raw TGlobal = RawTGlobal get_fptr (TGlobal ptr) = ptr cast_fptr_to_obj = TGlobal
+ src/HROOT/Core/TH.hs view
@@ -0,0 +1,12 @@+{-# LANGUAGE FlexibleContexts, FlexibleInstances,+ ForeignFunctionInterface, InterruptibleFFI, TemplateHaskell #-}+module HROOT.Core.TH () where+import Data.Char+import Data.List+import Data.Monoid+import Foreign.C.Types+import Foreign.Ptr+import Language.Haskell.TH+import Language.Haskell.TH.Syntax+import FFICXX.Runtime.CodeGen.Cxx+import FFICXX.Runtime.TH
src/HROOT/Core/TKey/Cast.hs view
@@ -8,10 +8,10 @@ import HROOT.Core.TKey.RawType import HROOT.Core.TKey.Interface -instance (ITKey a, FPtr a) => Castable a (Ptr RawTKey) where+instance (ITKey a, FPtr a) => Castable (a) (Ptr RawTKey) where cast x f = f (castPtr (get_fptr x)) uncast x f = f (cast_fptr_to_obj (castPtr x)) -instance Castable TKey (Ptr RawTKey) where+instance () => Castable (TKey) (Ptr RawTKey) where cast x f = f (castPtr (get_fptr x)) uncast x f = f (cast_fptr_to_obj (castPtr x))
src/HROOT/Core/TKey/FFI.hsc view
@@ -1,49 +1,60 @@-{-# LANGUAGE ForeignFunctionInterface #-}+{-# LANGUAGE ForeignFunctionInterface, InterruptibleFFI #-} module HROOT.Core.TKey.FFI where+import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr import HROOT.Core.TKey.RawType+import HROOT.Core.TKey.RawType import HROOT.Core.TObject.RawType import HROOT.Core.TClass.RawType import HROOT.Core.TDirectory.RawType -foreign import ccall safe "HROOTCoreTKey.h TKey_SetName"+foreign import ccall interruptible "HROOTCoreTKey.h TKey_SetName" c_tkey_setname :: Ptr RawTKey -> CString -> IO () -foreign import ccall safe "HROOTCoreTKey.h TKey_SetNameTitle"- c_tkey_setnametitle :: Ptr RawTKey -> CString -> CString -> IO ()+foreign import ccall interruptible+ "HROOTCoreTKey.h TKey_SetNameTitle" c_tkey_setnametitle ::+ Ptr RawTKey -> CString -> CString -> IO () -foreign import ccall safe "HROOTCoreTKey.h TKey_SetTitle"+foreign import ccall interruptible "HROOTCoreTKey.h TKey_SetTitle" c_tkey_settitle :: Ptr RawTKey -> CString -> IO () -foreign import ccall safe "HROOTCoreTKey.h TKey_Draw" c_tkey_draw- :: Ptr RawTKey -> CString -> IO ()+foreign import ccall interruptible "HROOTCoreTKey.h TKey_Clear"+ c_tkey_clear :: Ptr RawTKey -> CString -> IO () -foreign import ccall safe "HROOTCoreTKey.h TKey_FindObject"- c_tkey_findobject :: Ptr RawTKey -> CString -> IO (Ptr RawTObject)+foreign import ccall interruptible "HROOTCoreTKey.h TKey_Draw"+ c_tkey_draw :: Ptr RawTKey -> CString -> IO () -foreign import ccall safe "HROOTCoreTKey.h TKey_GetName"+foreign import ccall interruptible+ "HROOTCoreTKey.h TKey_FindObject" c_tkey_findobject ::+ Ptr RawTKey -> CString -> IO (Ptr RawTObject)++foreign import ccall interruptible "HROOTCoreTKey.h TKey_GetName" c_tkey_getname :: Ptr RawTKey -> IO CString -foreign import ccall safe "HROOTCoreTKey.h TKey_IsA" c_tkey_isa ::- Ptr RawTKey -> IO (Ptr RawTClass)+foreign import ccall interruptible "HROOTCoreTKey.h TKey_IsA"+ c_tkey_isa :: Ptr RawTKey -> IO (Ptr RawTClass) -foreign import ccall safe "HROOTCoreTKey.h TKey_Paint" c_tkey_paint- :: Ptr RawTKey -> CString -> IO ()+foreign import ccall interruptible "HROOTCoreTKey.h TKey_Paint"+ c_tkey_paint :: Ptr RawTKey -> CString -> IO () -foreign import ccall safe "HROOTCoreTKey.h TKey_printObj"+foreign import ccall interruptible "HROOTCoreTKey.h TKey_printObj" c_tkey_printobj :: Ptr RawTKey -> CString -> IO () -foreign import ccall safe "HROOTCoreTKey.h TKey_SaveAs"+foreign import ccall interruptible "HROOTCoreTKey.h TKey_SaveAs" c_tkey_saveas :: Ptr RawTKey -> CString -> CString -> IO () -foreign import ccall safe "HROOTCoreTKey.h TKey_Write" c_tkey_write- :: Ptr RawTKey -> CString -> CInt -> CInt -> IO CInt+foreign import ccall interruptible "HROOTCoreTKey.h TKey_Write"+ c_tkey_write :: Ptr RawTKey -> CString -> CInt -> CInt -> IO CInt -foreign import ccall safe "HROOTCoreTKey.h TKey_delete"+foreign import ccall interruptible "HROOTCoreTKey.h TKey_Write_"+ c_tkey_write_ :: Ptr RawTKey -> IO CInt++foreign import ccall interruptible "HROOTCoreTKey.h TKey_delete" c_tkey_delete :: Ptr RawTKey -> IO () -foreign import ccall safe "HROOTCoreTKey.h TKey_newTKey"+foreign import ccall interruptible "HROOTCoreTKey.h TKey_newTKey" c_tkey_newtkey :: CString -> CString ->
src/HROOT/Core/TKey/Implementation.hs view
@@ -1,17 +1,26 @@ {-# LANGUAGE EmptyDataDecls, FlexibleContexts, FlexibleInstances, ForeignFunctionInterface, IncoherentInstances,- MultiParamTypeClasses, OverlappingInstances, TypeFamilies,- TypeSynonymInstances #-}+ MultiParamTypeClasses, OverlappingInstances, TemplateHaskell,+ TypeFamilies, TypeSynonymInstances #-} module HROOT.Core.TKey.Implementation where-import FFICXX.Runtime.Cast+import Data.Monoid import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr+import Language.Haskell.TH+import Language.Haskell.TH.Syntax import System.IO.Unsafe+import FFICXX.Runtime.Cast+import FFICXX.Runtime.CodeGen.Cxx+import FFICXX.Runtime.TH import HROOT.Core.TKey.RawType import HROOT.Core.TKey.FFI import HROOT.Core.TKey.Interface import HROOT.Core.TKey.Cast+import HROOT.Core.TKey.RawType+import HROOT.Core.TKey.Cast+import HROOT.Core.TKey.Interface import HROOT.Core.TClass.RawType import HROOT.Core.TClass.Cast import HROOT.Core.TClass.Interface@@ -24,18 +33,19 @@ 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+import STD.Deletable.RawType+import STD.Deletable.Cast+import STD.Deletable.Interface -instance ITKey TKey+instance () => ITKey (TKey) where -instance ITNamed TKey where+instance () => ITNamed (TKey) where setName = xform1 c_tkey_setname setNameTitle = xform2 c_tkey_setnametitle setTitle = xform1 c_tkey_settitle -instance ITObject TKey where+instance () => ITObject (TKey) where+ clear = xform1 c_tkey_clear draw = xform1 c_tkey_draw findObject = xform1 c_tkey_findobject getName = xform0 c_tkey_getname@@ -44,8 +54,9 @@ printObj = xform1 c_tkey_printobj saveAs = xform2 c_tkey_saveas write = xform3 c_tkey_write+ write_ = xform0 c_tkey_write_ -instance IDeletable TKey where+instance () => IDeletable (TKey) where delete = xform0 c_tkey_delete newTKey ::
src/HROOT/Core/TKey/Interface.hs view
@@ -4,15 +4,14 @@ TypeSynonymInstances #-} module HROOT.Core.TKey.Interface where import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr import FFICXX.Runtime.Cast import HROOT.Core.TKey.RawType import HROOT.Core.TNamed.Interface-import {-# SOURCE #-} HROOT.Core.TClass.Interface-import {-# SOURCE #-} HROOT.Core.TDirectory.Interface -class ITNamed a => ITKey a+class (ITNamed a) => ITKey a where upcastTKey :: forall a . (FPtr a, ITKey a) => a -> TKey upcastTKey h
− src/HROOT/Core/TKey/Interface.hs-boot
@@ -1,3 +0,0 @@-module HROOT.Core.TKey.Interface where--class ITKey a
src/HROOT/Core/TKey/RawType.hs view
@@ -8,9 +8,9 @@ data RawTKey newtype TKey = TKey (Ptr RawTKey)- deriving (Eq, Ord, Show)+ deriving (Eq, Ord, Show) -instance FPtr TKey where+instance () => FPtr (TKey) where type Raw TKey = RawTKey get_fptr (TKey ptr) = ptr cast_fptr_to_obj = TKey
+ src/HROOT/Core/TMutex.hs view
@@ -0,0 +1,6 @@+module HROOT.Core.TMutex+ (TMutex(..), ITMutex, upcastTMutex, downcastTMutex, newTMutex)+ where+import HROOT.Core.TMutex.RawType+import HROOT.Core.TMutex.Interface+import HROOT.Core.TMutex.Implementation
+ src/HROOT/Core/TMutex/Cast.hs view
@@ -0,0 +1,17 @@+{-# LANGUAGE FlexibleInstances, FlexibleContexts, TypeFamilies,+ MultiParamTypeClasses, OverlappingInstances, IncoherentInstances+ #-}+module HROOT.Core.TMutex.Cast where+import Foreign.Ptr+import FFICXX.Runtime.Cast+import System.IO.Unsafe+import HROOT.Core.TMutex.RawType+import HROOT.Core.TMutex.Interface++instance (ITMutex a, FPtr a) => Castable (a) (Ptr RawTMutex) where+ cast x f = f (castPtr (get_fptr x))+ uncast x f = f (cast_fptr_to_obj (castPtr x))++instance () => Castable (TMutex) (Ptr RawTMutex) where+ cast x f = f (castPtr (get_fptr x))+ uncast x f = f (cast_fptr_to_obj (castPtr x))
+ src/HROOT/Core/TMutex/FFI.hsc view
@@ -0,0 +1,35 @@+{-# LANGUAGE ForeignFunctionInterface, InterruptibleFFI #-}+module HROOT.Core.TMutex.FFI where+import Data.Word+import Data.Int+import Foreign.C+import Foreign.Ptr+import HROOT.Core.TMutex.RawType+import HROOT.Core.TMutex.RawType++foreign import ccall interruptible+ "HROOTCoreTMutex.h TMutex_CleanUp" c_tmutex_cleanup ::+ Ptr RawTMutex -> IO CInt++foreign import ccall interruptible+ "HROOTCoreTMutex.h TMutex_Factory" c_tmutex_factory ::+ Ptr RawTMutex -> CBool -> IO (Ptr RawTMutex)++foreign import ccall interruptible "HROOTCoreTMutex.h TMutex_Lock"+ c_tmutex_lock :: Ptr RawTMutex -> IO CInt++foreign import ccall interruptible+ "HROOTCoreTMutex.h TMutex_TryLock" c_tmutex_trylock ::+ Ptr RawTMutex -> IO CInt++foreign import ccall interruptible+ "HROOTCoreTMutex.h TMutex_UnLock" c_tmutex_unlock ::+ Ptr RawTMutex -> IO CInt++foreign import ccall interruptible+ "HROOTCoreTMutex.h TMutex_delete" c_tmutex_delete ::+ Ptr RawTMutex -> IO ()++foreign import ccall interruptible+ "HROOTCoreTMutex.h TMutex_newTMutex" c_tmutex_newtmutex ::+ CBool -> IO (Ptr RawTMutex)
+ src/HROOT/Core/TMutex/Implementation.hs view
@@ -0,0 +1,44 @@+{-# LANGUAGE EmptyDataDecls, FlexibleContexts, FlexibleInstances,+ ForeignFunctionInterface, IncoherentInstances,+ MultiParamTypeClasses, OverlappingInstances, TemplateHaskell,+ TypeFamilies, TypeSynonymInstances #-}+module HROOT.Core.TMutex.Implementation where+import Data.Monoid+import Data.Word+import Data.Int+import Foreign.C+import Foreign.Ptr+import Language.Haskell.TH+import Language.Haskell.TH.Syntax+import System.IO.Unsafe+import FFICXX.Runtime.Cast+import FFICXX.Runtime.CodeGen.Cxx+import FFICXX.Runtime.TH+import HROOT.Core.TMutex.RawType+import HROOT.Core.TMutex.FFI+import HROOT.Core.TMutex.Interface+import HROOT.Core.TMutex.Cast+import HROOT.Core.TMutex.RawType+import HROOT.Core.TMutex.Cast+import HROOT.Core.TMutex.Interface+import HROOT.Core.TVirtualMutex.RawType+import HROOT.Core.TVirtualMutex.Cast+import HROOT.Core.TVirtualMutex.Interface+import STD.Deletable.RawType+import STD.Deletable.Cast+import STD.Deletable.Interface++instance () => ITMutex (TMutex) where++instance () => ITVirtualMutex (TMutex) where+ cleanUp = xform0 c_tmutex_cleanup+ factory = xform1 c_tmutex_factory+ lock = xform0 c_tmutex_lock+ tryLock = xform0 c_tmutex_trylock+ unLock = xform0 c_tmutex_unlock++instance () => IDeletable (TMutex) where+ delete = xform0 c_tmutex_delete++newTMutex :: () => CBool -> IO TMutex+newTMutex = xform0 c_tmutex_newtmutex
+ src/HROOT/Core/TMutex/Interface.hs view
@@ -0,0 +1,26 @@+{-# LANGUAGE EmptyDataDecls, ExistentialQuantification,+ FlexibleContexts, FlexibleInstances, ForeignFunctionInterface,+ MultiParamTypeClasses, ScopedTypeVariables, TypeFamilies,+ TypeSynonymInstances #-}+module HROOT.Core.TMutex.Interface where+import Data.Word+import Data.Int+import Foreign.C+import Foreign.Ptr+import FFICXX.Runtime.Cast+import HROOT.Core.TMutex.RawType+import HROOT.Core.TVirtualMutex.Interface++class (ITVirtualMutex a) => ITMutex a where++upcastTMutex :: forall a . (FPtr a, ITMutex a) => a -> TMutex+upcastTMutex h+ = let fh = get_fptr h+ fh2 :: Ptr RawTMutex = castPtr fh+ in cast_fptr_to_obj fh2++downcastTMutex :: forall a . (FPtr a, ITMutex a) => TMutex -> a+downcastTMutex h+ = let fh = get_fptr h+ fh2 = castPtr fh+ in cast_fptr_to_obj fh2
+ src/HROOT/Core/TMutex/RawType.hs view
@@ -0,0 +1,16 @@+{-# LANGUAGE ForeignFunctionInterface, TypeFamilies,+ MultiParamTypeClasses, FlexibleInstances, TypeSynonymInstances,+ EmptyDataDecls, ExistentialQuantification, ScopedTypeVariables #-}+module HROOT.Core.TMutex.RawType where+import Foreign.Ptr+import FFICXX.Runtime.Cast++data RawTMutex++newtype TMutex = TMutex (Ptr RawTMutex)+ deriving (Eq, Ord, Show)++instance () => FPtr (TMutex) where+ type Raw TMutex = RawTMutex+ get_fptr (TMutex ptr) = ptr+ cast_fptr_to_obj = TMutex
src/HROOT/Core/TNamed/Cast.hs view
@@ -8,10 +8,10 @@ import HROOT.Core.TNamed.RawType import HROOT.Core.TNamed.Interface -instance (ITNamed a, FPtr a) => Castable a (Ptr RawTNamed) where+instance (ITNamed a, FPtr a) => Castable (a) (Ptr RawTNamed) where cast x f = f (castPtr (get_fptr x)) uncast x f = f (cast_fptr_to_obj (castPtr x)) -instance Castable TNamed (Ptr RawTNamed) where+instance () => Castable (TNamed) (Ptr RawTNamed) where cast x f = f (castPtr (get_fptr x)) uncast x f = f (cast_fptr_to_obj (castPtr x))
src/HROOT/Core/TNamed/FFI.hsc view
@@ -1,49 +1,66 @@-{-# LANGUAGE ForeignFunctionInterface #-}+{-# LANGUAGE ForeignFunctionInterface, InterruptibleFFI #-} module HROOT.Core.TNamed.FFI where+import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr import HROOT.Core.TNamed.RawType+import HROOT.Core.TNamed.RawType import HROOT.Core.TObject.RawType import HROOT.Core.TClass.RawType -foreign import ccall safe "HROOTCoreTNamed.h TNamed_Draw"+foreign import ccall interruptible "HROOTCoreTNamed.h TNamed_Clear"+ c_tnamed_clear :: Ptr RawTNamed -> CString -> IO ()++foreign import ccall interruptible "HROOTCoreTNamed.h TNamed_Draw" c_tnamed_draw :: Ptr RawTNamed -> CString -> IO () -foreign import ccall safe "HROOTCoreTNamed.h TNamed_FindObject"- c_tnamed_findobject ::+foreign import ccall interruptible+ "HROOTCoreTNamed.h TNamed_FindObject" c_tnamed_findobject :: Ptr RawTNamed -> CString -> IO (Ptr RawTObject) -foreign import ccall safe "HROOTCoreTNamed.h TNamed_GetName"- c_tnamed_getname :: Ptr RawTNamed -> IO CString+foreign import ccall interruptible+ "HROOTCoreTNamed.h TNamed_GetName" c_tnamed_getname ::+ Ptr RawTNamed -> IO CString -foreign import ccall safe "HROOTCoreTNamed.h TNamed_IsA"+foreign import ccall interruptible "HROOTCoreTNamed.h TNamed_IsA" c_tnamed_isa :: Ptr RawTNamed -> IO (Ptr RawTClass) -foreign import ccall safe "HROOTCoreTNamed.h TNamed_Paint"+foreign import ccall interruptible "HROOTCoreTNamed.h TNamed_Paint" c_tnamed_paint :: Ptr RawTNamed -> CString -> IO () -foreign import ccall safe "HROOTCoreTNamed.h TNamed_printObj"- c_tnamed_printobj :: Ptr RawTNamed -> CString -> IO ()+foreign import ccall interruptible+ "HROOTCoreTNamed.h TNamed_printObj" c_tnamed_printobj ::+ Ptr RawTNamed -> CString -> IO () -foreign import ccall safe "HROOTCoreTNamed.h TNamed_SaveAs"- c_tnamed_saveas :: Ptr RawTNamed -> CString -> CString -> IO ()+foreign import ccall interruptible+ "HROOTCoreTNamed.h TNamed_SaveAs" c_tnamed_saveas ::+ Ptr RawTNamed -> CString -> CString -> IO () -foreign import ccall safe "HROOTCoreTNamed.h TNamed_Write"+foreign import ccall interruptible "HROOTCoreTNamed.h TNamed_Write" c_tnamed_write :: Ptr RawTNamed -> CString -> CInt -> CInt -> IO CInt -foreign import ccall safe "HROOTCoreTNamed.h TNamed_delete"- c_tnamed_delete :: Ptr RawTNamed -> IO ()+foreign import ccall interruptible+ "HROOTCoreTNamed.h TNamed_Write_" c_tnamed_write_ ::+ Ptr RawTNamed -> IO CInt -foreign import ccall safe "HROOTCoreTNamed.h TNamed_newTNamed"- c_tnamed_newtnamed :: CString -> CString -> IO (Ptr RawTNamed)+foreign import ccall interruptible+ "HROOTCoreTNamed.h TNamed_delete" c_tnamed_delete ::+ Ptr RawTNamed -> IO () -foreign import ccall safe "HROOTCoreTNamed.h TNamed_SetName"- c_tnamed_setname :: Ptr RawTNamed -> CString -> IO ()+foreign import ccall interruptible+ "HROOTCoreTNamed.h TNamed_newTNamed" c_tnamed_newtnamed ::+ CString -> CString -> IO (Ptr RawTNamed) -foreign import ccall safe "HROOTCoreTNamed.h TNamed_SetNameTitle"- c_tnamed_setnametitle ::+foreign import ccall interruptible+ "HROOTCoreTNamed.h TNamed_SetName" c_tnamed_setname ::+ Ptr RawTNamed -> CString -> IO ()++foreign import ccall interruptible+ "HROOTCoreTNamed.h TNamed_SetNameTitle" c_tnamed_setnametitle :: Ptr RawTNamed -> CString -> CString -> IO () -foreign import ccall safe "HROOTCoreTNamed.h TNamed_SetTitle"- c_tnamed_settitle :: Ptr RawTNamed -> CString -> IO ()+foreign import ccall interruptible+ "HROOTCoreTNamed.h TNamed_SetTitle" c_tnamed_settitle ::+ Ptr RawTNamed -> CString -> IO ()
src/HROOT/Core/TNamed/Implementation.hs view
@@ -1,33 +1,43 @@ {-# LANGUAGE EmptyDataDecls, FlexibleContexts, FlexibleInstances, ForeignFunctionInterface, IncoherentInstances,- MultiParamTypeClasses, OverlappingInstances, TypeFamilies,- TypeSynonymInstances #-}+ MultiParamTypeClasses, OverlappingInstances, TemplateHaskell,+ TypeFamilies, TypeSynonymInstances #-} module HROOT.Core.TNamed.Implementation where-import FFICXX.Runtime.Cast+import Data.Monoid import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr+import Language.Haskell.TH+import Language.Haskell.TH.Syntax import System.IO.Unsafe+import FFICXX.Runtime.Cast+import FFICXX.Runtime.CodeGen.Cxx+import FFICXX.Runtime.TH import HROOT.Core.TNamed.RawType import HROOT.Core.TNamed.FFI import HROOT.Core.TNamed.Interface import HROOT.Core.TNamed.Cast+import HROOT.Core.TNamed.RawType+import HROOT.Core.TNamed.Cast+import HROOT.Core.TNamed.Interface import HROOT.Core.TClass.RawType import HROOT.Core.TClass.Cast import HROOT.Core.TClass.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+import STD.Deletable.RawType+import STD.Deletable.Cast+import STD.Deletable.Interface -instance ITNamed TNamed where+instance () => ITNamed (TNamed) where setName = xform1 c_tnamed_setname setNameTitle = xform2 c_tnamed_setnametitle setTitle = xform1 c_tnamed_settitle -instance ITObject TNamed where+instance () => ITObject (TNamed) where+ clear = xform1 c_tnamed_clear draw = xform1 c_tnamed_draw findObject = xform1 c_tnamed_findobject getName = xform0 c_tnamed_getname@@ -36,8 +46,9 @@ printObj = xform1 c_tnamed_printobj saveAs = xform2 c_tnamed_saveas write = xform3 c_tnamed_write+ write_ = xform0 c_tnamed_write_ -instance IDeletable TNamed where+instance () => IDeletable (TNamed) where delete = xform0 c_tnamed_delete newTNamed ::
src/HROOT/Core/TNamed/Interface.hs view
@@ -4,20 +4,21 @@ TypeSynonymInstances #-} module HROOT.Core.TNamed.Interface where import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr import FFICXX.Runtime.Cast import HROOT.Core.TNamed.RawType import HROOT.Core.TObject.Interface -class ITObject a => ITNamed a where- setName :: Castable c0 CString => a -> c0 -> IO ()+class (ITObject a) => ITNamed a where+ setName :: (Castable c0 CString) => a -> c0 -> IO () setNameTitle :: (Castable c1 CString, Castable c0 CString) => a -> c0 -> c1 -> IO () - setTitle :: Castable c0 CString => a -> c0 -> IO ()+ setTitle :: (Castable c0 CString) => a -> c0 -> IO () upcastTNamed :: forall a . (FPtr a, ITNamed a) => a -> TNamed upcastTNamed h
src/HROOT/Core/TNamed/RawType.hs view
@@ -8,9 +8,9 @@ data RawTNamed newtype TNamed = TNamed (Ptr RawTNamed)- deriving (Eq, Ord, Show)+ deriving (Eq, Ord, Show) -instance FPtr TNamed where+instance () => FPtr (TNamed) where type Raw TNamed = RawTNamed get_fptr (TNamed ptr) = ptr cast_fptr_to_obj = TNamed
src/HROOT/Core/TObjArray/Cast.hs view
@@ -8,11 +8,11 @@ import HROOT.Core.TObjArray.RawType import HROOT.Core.TObjArray.Interface -instance (ITObjArray a, FPtr a) => Castable a (Ptr RawTObjArray)+instance (ITObjArray a, FPtr a) => Castable (a) (Ptr RawTObjArray) where cast x f = f (castPtr (get_fptr x)) uncast x f = f (cast_fptr_to_obj (castPtr x)) -instance Castable TObjArray (Ptr RawTObjArray) where+instance () => Castable (TObjArray) (Ptr RawTObjArray) where cast x f = f (castPtr (get_fptr x)) uncast x f = f (cast_fptr_to_obj (castPtr x))
src/HROOT/Core/TObjArray/FFI.hsc view
@@ -1,37 +1,54 @@-{-# LANGUAGE ForeignFunctionInterface #-}+{-# LANGUAGE ForeignFunctionInterface, InterruptibleFFI #-} module HROOT.Core.TObjArray.FFI where+import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr import HROOT.Core.TObjArray.RawType+import HROOT.Core.TObjArray.RawType import HROOT.Core.TObject.RawType import HROOT.Core.TClass.RawType -foreign import ccall safe "HROOTCoreTObjArray.h TObjArray_Draw"- c_tobjarray_draw :: Ptr RawTObjArray -> CString -> IO ()+foreign import ccall interruptible+ "HROOTCoreTObjArray.h TObjArray_Clear" c_tobjarray_clear ::+ Ptr RawTObjArray -> CString -> IO () -foreign import ccall safe+foreign import ccall interruptible+ "HROOTCoreTObjArray.h TObjArray_Draw" c_tobjarray_draw ::+ Ptr RawTObjArray -> CString -> IO ()++foreign import ccall interruptible "HROOTCoreTObjArray.h TObjArray_FindObject" c_tobjarray_findobject :: Ptr RawTObjArray -> CString -> IO (Ptr RawTObject) -foreign import ccall safe "HROOTCoreTObjArray.h TObjArray_GetName"- c_tobjarray_getname :: Ptr RawTObjArray -> IO CString+foreign import ccall interruptible+ "HROOTCoreTObjArray.h TObjArray_GetName" c_tobjarray_getname ::+ Ptr RawTObjArray -> IO CString -foreign import ccall safe "HROOTCoreTObjArray.h TObjArray_IsA"- c_tobjarray_isa :: Ptr RawTObjArray -> IO (Ptr RawTClass)+foreign import ccall interruptible+ "HROOTCoreTObjArray.h TObjArray_IsA" c_tobjarray_isa ::+ Ptr RawTObjArray -> IO (Ptr RawTClass) -foreign import ccall safe "HROOTCoreTObjArray.h TObjArray_Paint"- c_tobjarray_paint :: Ptr RawTObjArray -> CString -> IO ()+foreign import ccall interruptible+ "HROOTCoreTObjArray.h TObjArray_Paint" c_tobjarray_paint ::+ Ptr RawTObjArray -> CString -> IO () -foreign import ccall safe "HROOTCoreTObjArray.h TObjArray_printObj"- c_tobjarray_printobj :: Ptr RawTObjArray -> CString -> IO ()+foreign import ccall interruptible+ "HROOTCoreTObjArray.h TObjArray_printObj" c_tobjarray_printobj ::+ Ptr RawTObjArray -> CString -> IO () -foreign import ccall safe "HROOTCoreTObjArray.h TObjArray_SaveAs"- c_tobjarray_saveas ::+foreign import ccall interruptible+ "HROOTCoreTObjArray.h TObjArray_SaveAs" c_tobjarray_saveas :: Ptr RawTObjArray -> CString -> CString -> IO () -foreign import ccall safe "HROOTCoreTObjArray.h TObjArray_Write"- c_tobjarray_write ::+foreign import ccall interruptible+ "HROOTCoreTObjArray.h TObjArray_Write" c_tobjarray_write :: Ptr RawTObjArray -> CString -> CInt -> CInt -> IO CInt -foreign import ccall safe "HROOTCoreTObjArray.h TObjArray_delete"- c_tobjarray_delete :: Ptr RawTObjArray -> IO ()+foreign import ccall interruptible+ "HROOTCoreTObjArray.h TObjArray_Write_" c_tobjarray_write_ ::+ Ptr RawTObjArray -> IO CInt++foreign import ccall interruptible+ "HROOTCoreTObjArray.h TObjArray_delete" c_tobjarray_delete ::+ Ptr RawTObjArray -> IO ()
src/HROOT/Core/TObjArray/Implementation.hs view
@@ -1,17 +1,26 @@ {-# LANGUAGE EmptyDataDecls, FlexibleContexts, FlexibleInstances, ForeignFunctionInterface, IncoherentInstances,- MultiParamTypeClasses, OverlappingInstances, TypeFamilies,- TypeSynonymInstances #-}+ MultiParamTypeClasses, OverlappingInstances, TemplateHaskell,+ TypeFamilies, TypeSynonymInstances #-} module HROOT.Core.TObjArray.Implementation where-import FFICXX.Runtime.Cast+import Data.Monoid import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr+import Language.Haskell.TH+import Language.Haskell.TH.Syntax import System.IO.Unsafe+import FFICXX.Runtime.Cast+import FFICXX.Runtime.CodeGen.Cxx+import FFICXX.Runtime.TH import HROOT.Core.TObjArray.RawType import HROOT.Core.TObjArray.FFI import HROOT.Core.TObjArray.Interface import HROOT.Core.TObjArray.Cast+import HROOT.Core.TObjArray.RawType+import HROOT.Core.TObjArray.Cast+import HROOT.Core.TObjArray.Interface import HROOT.Core.TClass.RawType import HROOT.Core.TClass.Cast import HROOT.Core.TClass.Interface@@ -24,17 +33,18 @@ 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+import STD.Deletable.RawType+import STD.Deletable.Cast+import STD.Deletable.Interface -instance ITObjArray TObjArray+instance () => ITObjArray (TObjArray) where -instance ITSeqCollection TObjArray+instance () => ITSeqCollection (TObjArray) where -instance ITCollection TObjArray+instance () => ITCollection (TObjArray) where -instance ITObject TObjArray where+instance () => ITObject (TObjArray) where+ clear = xform1 c_tobjarray_clear draw = xform1 c_tobjarray_draw findObject = xform1 c_tobjarray_findobject getName = xform0 c_tobjarray_getname@@ -43,6 +53,7 @@ printObj = xform1 c_tobjarray_printobj saveAs = xform2 c_tobjarray_saveas write = xform3 c_tobjarray_write+ write_ = xform0 c_tobjarray_write_ -instance IDeletable TObjArray where+instance () => IDeletable (TObjArray) where delete = xform0 c_tobjarray_delete
src/HROOT/Core/TObjArray/Interface.hs view
@@ -4,13 +4,14 @@ TypeSynonymInstances #-} module HROOT.Core.TObjArray.Interface where import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr import FFICXX.Runtime.Cast import HROOT.Core.TObjArray.RawType import HROOT.Core.TSeqCollection.Interface -class ITSeqCollection a => ITObjArray a+class (ITSeqCollection a) => ITObjArray a where upcastTObjArray :: forall a . (FPtr a, ITObjArray a) => a -> TObjArray
src/HROOT/Core/TObjArray/RawType.hs view
@@ -8,9 +8,9 @@ data RawTObjArray newtype TObjArray = TObjArray (Ptr RawTObjArray)- deriving (Eq, Ord, Show)+ deriving (Eq, Ord, Show) -instance FPtr TObjArray where+instance () => FPtr (TObjArray) where type Raw TObjArray = RawTObjArray get_fptr (TObjArray ptr) = ptr cast_fptr_to_obj = TObjArray
src/HROOT/Core/TObject.hs view
@@ -1,6 +1,6 @@ module HROOT.Core.TObject (TObject(..), ITObject(..), upcastTObject, downcastTObject,- newTObject, tObjectGetObjectStat)+ newTObject, tObject_GetObjectStat) where import HROOT.Core.TObject.RawType import HROOT.Core.TObject.Interface
src/HROOT/Core/TObject/Cast.hs view
@@ -8,10 +8,11 @@ import HROOT.Core.TObject.RawType import HROOT.Core.TObject.Interface -instance (ITObject a, FPtr a) => Castable a (Ptr RawTObject) where+instance (ITObject a, FPtr a) => Castable (a) (Ptr RawTObject)+ where cast x f = f (castPtr (get_fptr x)) uncast x f = f (cast_fptr_to_obj (castPtr x)) -instance Castable TObject (Ptr RawTObject) where+instance () => Castable (TObject) (Ptr RawTObject) where cast x f = f (castPtr (get_fptr x)) uncast x f = f (cast_fptr_to_obj (castPtr x))
src/HROOT/Core/TObject/FFI.hsc view
@@ -1,42 +1,60 @@-{-# LANGUAGE ForeignFunctionInterface #-}+{-# LANGUAGE ForeignFunctionInterface, InterruptibleFFI #-} module HROOT.Core.TObject.FFI where+import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr import HROOT.Core.TObject.RawType+import HROOT.Core.TObject.RawType import HROOT.Core.TClass.RawType -foreign import ccall safe "HROOTCoreTObject.h TObject_delete"- c_tobject_delete :: Ptr RawTObject -> IO ()+foreign import ccall interruptible+ "HROOTCoreTObject.h TObject_delete" c_tobject_delete ::+ Ptr RawTObject -> IO () -foreign import ccall safe "HROOTCoreTObject.h TObject_newTObject"- c_tobject_newtobject :: IO (Ptr RawTObject)+foreign import ccall interruptible+ "HROOTCoreTObject.h TObject_newTObject" c_tobject_newtobject ::+ IO (Ptr RawTObject) -foreign import ccall safe "HROOTCoreTObject.h TObject_Draw"- c_tobject_draw :: Ptr RawTObject -> CString -> IO ()+foreign import ccall interruptible+ "HROOTCoreTObject.h TObject_Clear" c_tobject_clear ::+ Ptr RawTObject -> CString -> IO () -foreign import ccall safe "HROOTCoreTObject.h TObject_FindObject"- c_tobject_findobject ::+foreign import ccall interruptible+ "HROOTCoreTObject.h TObject_Draw" c_tobject_draw ::+ Ptr RawTObject -> CString -> IO ()++foreign import ccall interruptible+ "HROOTCoreTObject.h TObject_FindObject" c_tobject_findobject :: Ptr RawTObject -> CString -> IO (Ptr RawTObject) -foreign import ccall safe "HROOTCoreTObject.h TObject_GetName"- c_tobject_getname :: Ptr RawTObject -> IO CString+foreign import ccall interruptible+ "HROOTCoreTObject.h TObject_GetName" c_tobject_getname ::+ Ptr RawTObject -> IO CString -foreign import ccall safe "HROOTCoreTObject.h TObject_IsA"+foreign import ccall interruptible "HROOTCoreTObject.h TObject_IsA" c_tobject_isa :: Ptr RawTObject -> IO (Ptr RawTClass) -foreign import ccall safe "HROOTCoreTObject.h TObject_Paint"- c_tobject_paint :: Ptr RawTObject -> CString -> IO ()+foreign import ccall interruptible+ "HROOTCoreTObject.h TObject_Paint" c_tobject_paint ::+ Ptr RawTObject -> CString -> IO () -foreign import ccall safe "HROOTCoreTObject.h TObject_printObj"- c_tobject_printobj :: Ptr RawTObject -> CString -> IO ()+foreign import ccall interruptible+ "HROOTCoreTObject.h TObject_printObj" c_tobject_printobj ::+ Ptr RawTObject -> CString -> IO () -foreign import ccall safe "HROOTCoreTObject.h TObject_SaveAs"- c_tobject_saveas :: Ptr RawTObject -> CString -> CString -> IO ()+foreign import ccall interruptible+ "HROOTCoreTObject.h TObject_SaveAs" c_tobject_saveas ::+ Ptr RawTObject -> CString -> CString -> IO () -foreign import ccall safe "HROOTCoreTObject.h TObject_Write"- c_tobject_write ::+foreign import ccall interruptible+ "HROOTCoreTObject.h TObject_Write" c_tobject_write :: Ptr RawTObject -> CString -> CInt -> CInt -> IO CInt -foreign import ccall safe- "HROOTCoreTObject.h TObject_tObjectGetObjectStat"- c_tobject_tobjectgetobjectstat :: IO CInt+foreign import ccall interruptible+ "HROOTCoreTObject.h TObject_Write_" c_tobject_write_ ::+ Ptr RawTObject -> IO CInt++foreign import ccall interruptible+ "HROOTCoreTObject.h TObject_tObject_GetObjectStat"+ c_tobject_tobject_getobjectstat :: IO CBool
src/HROOT/Core/TObject/Implementation.hs view
@@ -1,25 +1,35 @@ {-# LANGUAGE EmptyDataDecls, FlexibleContexts, FlexibleInstances, ForeignFunctionInterface, IncoherentInstances,- MultiParamTypeClasses, OverlappingInstances, TypeFamilies,- TypeSynonymInstances #-}+ MultiParamTypeClasses, OverlappingInstances, TemplateHaskell,+ TypeFamilies, TypeSynonymInstances #-} module HROOT.Core.TObject.Implementation where-import FFICXX.Runtime.Cast+import Data.Monoid import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr+import Language.Haskell.TH+import Language.Haskell.TH.Syntax import System.IO.Unsafe+import FFICXX.Runtime.Cast+import FFICXX.Runtime.CodeGen.Cxx+import FFICXX.Runtime.TH import HROOT.Core.TObject.RawType import HROOT.Core.TObject.FFI import HROOT.Core.TObject.Interface import HROOT.Core.TObject.Cast+import HROOT.Core.TObject.RawType+import HROOT.Core.TObject.Cast+import HROOT.Core.TObject.Interface import HROOT.Core.TClass.RawType import HROOT.Core.TClass.Cast import HROOT.Core.TClass.Interface-import HROOT.Core.Deletable.RawType-import HROOT.Core.Deletable.Cast-import HROOT.Core.Deletable.Interface+import STD.Deletable.RawType+import STD.Deletable.Cast+import STD.Deletable.Interface -instance ITObject TObject where+instance () => ITObject (TObject) where+ clear = xform1 c_tobject_clear draw = xform1 c_tobject_draw findObject = xform1 c_tobject_findobject getName = xform0 c_tobject_getname@@ -28,12 +38,13 @@ printObj = xform1 c_tobject_printobj saveAs = xform2 c_tobject_saveas write = xform3 c_tobject_write+ write_ = xform0 c_tobject_write_ -instance IDeletable TObject where+instance () => IDeletable (TObject) where delete = xform0 c_tobject_delete -newTObject :: IO TObject+newTObject :: () => IO TObject newTObject = xformnull c_tobject_newtobject -tObjectGetObjectStat :: IO CInt-tObjectGetObjectStat = xformnull c_tobject_tobjectgetobjectstat+tObject_GetObjectStat :: () => IO CBool+tObject_GetObjectStat = xformnull c_tobject_tobject_getobjectstat
src/HROOT/Core/TObject/Interface.hs view
@@ -4,31 +4,37 @@ TypeSynonymInstances #-} module HROOT.Core.TObject.Interface where import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr import FFICXX.Runtime.Cast import HROOT.Core.TObject.RawType import HROOT.Core.TClass.RawType-import HROOT.Core.Deletable.Interface+import STD.Deletable.Interface -class IDeletable a => ITObject a where- draw :: Castable c0 CString => a -> c0 -> IO ()+class (IDeletable a) => ITObject a where+ clear :: (Castable c0 CString) => a -> c0 -> IO () - findObject :: Castable c0 CString => a -> c0 -> IO TObject+ draw :: (Castable c0 CString) => a -> c0 -> IO () - getName :: a -> IO CString+ findObject :: (Castable c0 CString) => a -> c0 -> IO TObject - isA :: a -> IO TClass+ getName :: () => a -> IO CString - paint :: Castable c0 CString => a -> c0 -> IO ()+ isA :: () => a -> IO TClass - printObj :: Castable c0 CString => a -> c0 -> IO ()+ paint :: (Castable c0 CString) => a -> c0 -> IO () + printObj :: (Castable c0 CString) => a -> c0 -> IO ()+ saveAs :: (Castable c1 CString, Castable c0 CString) => a -> c0 -> c1 -> IO () - write :: Castable c0 CString => a -> c0 -> CInt -> CInt -> IO CInt+ write ::+ (Castable c0 CString) => a -> c0 -> CInt -> CInt -> IO CInt+ + write_ :: () => a -> IO CInt upcastTObject :: forall a . (FPtr a, ITObject a) => a -> TObject upcastTObject h
− src/HROOT/Core/TObject/Interface.hs-boot
@@ -1,3 +0,0 @@-module HROOT.Core.TObject.Interface where--class ITObject a
src/HROOT/Core/TObject/RawType.hs view
@@ -8,9 +8,9 @@ data RawTObject newtype TObject = TObject (Ptr RawTObject)- deriving (Eq, Ord, Show)+ deriving (Eq, Ord, Show) -instance FPtr TObject where+instance () => FPtr (TObject) where type Raw TObject = RawTObject get_fptr (TObject ptr) = ptr cast_fptr_to_obj = TObject
src/HROOT/Core/TQObject/Cast.hs view
@@ -8,11 +8,11 @@ import HROOT.Core.TQObject.RawType import HROOT.Core.TQObject.Interface -instance (ITQObject a, FPtr a) => Castable a (Ptr RawTQObject)+instance (ITQObject a, FPtr a) => Castable (a) (Ptr RawTQObject) where cast x f = f (castPtr (get_fptr x)) uncast x f = f (cast_fptr_to_obj (castPtr x)) -instance Castable TQObject (Ptr RawTQObject) where+instance () => Castable (TQObject) (Ptr RawTQObject) where cast x f = f (castPtr (get_fptr x)) uncast x f = f (cast_fptr_to_obj (castPtr x))
src/HROOT/Core/TQObject/FFI.hsc view
@@ -1,8 +1,12 @@-{-# LANGUAGE ForeignFunctionInterface #-}+{-# LANGUAGE ForeignFunctionInterface, InterruptibleFFI #-} module HROOT.Core.TQObject.FFI where+import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr import HROOT.Core.TQObject.RawType+import HROOT.Core.TQObject.RawType -foreign import ccall safe "HROOTCoreTQObject.h TQObject_delete"- c_tqobject_delete :: Ptr RawTQObject -> IO ()+foreign import ccall interruptible+ "HROOTCoreTQObject.h TQObject_delete" c_tqobject_delete ::+ Ptr RawTQObject -> IO ()
src/HROOT/Core/TQObject/Implementation.hs view
@@ -1,22 +1,31 @@ {-# LANGUAGE EmptyDataDecls, FlexibleContexts, FlexibleInstances, ForeignFunctionInterface, IncoherentInstances,- MultiParamTypeClasses, OverlappingInstances, TypeFamilies,- TypeSynonymInstances #-}+ MultiParamTypeClasses, OverlappingInstances, TemplateHaskell,+ TypeFamilies, TypeSynonymInstances #-} module HROOT.Core.TQObject.Implementation where-import FFICXX.Runtime.Cast+import Data.Monoid import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr+import Language.Haskell.TH+import Language.Haskell.TH.Syntax import System.IO.Unsafe+import FFICXX.Runtime.Cast+import FFICXX.Runtime.CodeGen.Cxx+import FFICXX.Runtime.TH import HROOT.Core.TQObject.RawType import HROOT.Core.TQObject.FFI import HROOT.Core.TQObject.Interface import HROOT.Core.TQObject.Cast-import HROOT.Core.Deletable.RawType-import HROOT.Core.Deletable.Cast-import HROOT.Core.Deletable.Interface+import HROOT.Core.TQObject.RawType+import HROOT.Core.TQObject.Cast+import HROOT.Core.TQObject.Interface+import STD.Deletable.RawType+import STD.Deletable.Cast+import STD.Deletable.Interface -instance ITQObject TQObject+instance () => ITQObject (TQObject) where -instance IDeletable TQObject where+instance () => IDeletable (TQObject) where delete = xform0 c_tqobject_delete
src/HROOT/Core/TQObject/Interface.hs view
@@ -4,13 +4,14 @@ TypeSynonymInstances #-} module HROOT.Core.TQObject.Interface where import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr import FFICXX.Runtime.Cast import HROOT.Core.TQObject.RawType-import HROOT.Core.Deletable.Interface+import STD.Deletable.Interface -class IDeletable a => ITQObject a+class (IDeletable a) => ITQObject a where upcastTQObject :: forall a . (FPtr a, ITQObject a) => a -> TQObject upcastTQObject h
src/HROOT/Core/TQObject/RawType.hs view
@@ -8,9 +8,9 @@ data RawTQObject newtype TQObject = TQObject (Ptr RawTQObject)- deriving (Eq, Ord, Show)+ deriving (Eq, Ord, Show) -instance FPtr TQObject where+instance () => FPtr (TQObject) where type Raw TQObject = RawTQObject get_fptr (TQObject ptr) = ptr cast_fptr_to_obj = TQObject
src/HROOT/Core/TROOT.hs view
@@ -1,6 +1,6 @@ module HROOT.Core.TROOT- (TROOT(..), ITROOT, upcastTROOT, downcastTROOT, tROOTGetGlobal,- tROOTInitialized)+ (TROOT(..), ITROOT, upcastTROOT, downcastTROOT, tROOT_GetGlobal,+ tROOT_Initialized) where import HROOT.Core.TROOT.RawType import HROOT.Core.TROOT.Interface
src/HROOT/Core/TROOT/Cast.hs view
@@ -8,10 +8,10 @@ import HROOT.Core.TROOT.RawType import HROOT.Core.TROOT.Interface -instance (ITROOT a, FPtr a) => Castable a (Ptr RawTROOT) where+instance (ITROOT a, FPtr a) => Castable (a) (Ptr RawTROOT) where cast x f = f (castPtr (get_fptr x)) uncast x f = f (cast_fptr_to_obj (castPtr x)) -instance Castable TROOT (Ptr RawTROOT) where+instance () => Castable (TROOT) (Ptr RawTROOT) where cast x f = f (castPtr (get_fptr x)) uncast x f = f (cast_fptr_to_obj (castPtr x))
src/HROOT/Core/TROOT/FFI.hsc view
@@ -1,71 +1,86 @@-{-# LANGUAGE ForeignFunctionInterface #-}+{-# LANGUAGE ForeignFunctionInterface, InterruptibleFFI #-} module HROOT.Core.TROOT.FFI where+import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr import HROOT.Core.TROOT.RawType+import HROOT.Core.TROOT.RawType import HROOT.Core.TObject.RawType import HROOT.Core.TKey.RawType import HROOT.Core.TClass.RawType import HROOT.Core.TGlobal.RawType -foreign import ccall safe "HROOTCoreTROOT.h TROOT_Append"- c_troot_append :: Ptr RawTROOT -> Ptr RawTObject -> CInt -> IO ()+foreign import ccall interruptible "HROOTCoreTROOT.h TROOT_Append"+ c_troot_append :: Ptr RawTROOT -> Ptr RawTObject -> CBool -> IO () -foreign import ccall safe "HROOTCoreTROOT.h TROOT_addD"- c_troot_addd :: Ptr RawTROOT -> Ptr RawTObject -> CInt -> IO ()+foreign import ccall interruptible "HROOTCoreTROOT.h TROOT_addD"+ c_troot_addd :: Ptr RawTROOT -> Ptr RawTObject -> CBool -> IO () -foreign import ccall safe "HROOTCoreTROOT.h TROOT_AppendKey"- c_troot_appendkey :: Ptr RawTROOT -> Ptr RawTKey -> IO CInt+foreign import ccall interruptible+ "HROOTCoreTROOT.h TROOT_AppendKey" c_troot_appendkey ::+ Ptr RawTROOT -> Ptr RawTKey -> IO CInt -foreign import ccall safe "HROOTCoreTROOT.h TROOT_Close"+foreign import ccall interruptible "HROOTCoreTROOT.h TROOT_Close" c_troot_close :: Ptr RawTROOT -> CString -> IO () -foreign import ccall safe "HROOTCoreTROOT.h TROOT_Get" c_troot_get- :: Ptr RawTROOT -> CString -> IO (Ptr RawTObject)+foreign import ccall interruptible "HROOTCoreTROOT.h TROOT_Get"+ c_troot_get :: Ptr RawTROOT -> CString -> IO (Ptr RawTObject) -foreign import ccall safe "HROOTCoreTROOT.h TROOT_cd_TDirectory"- c_troot_cd_tdirectory :: Ptr RawTROOT -> CString -> IO CInt+foreign import ccall interruptible+ "HROOTCoreTROOT.h TROOT_cd_TDirectory" c_troot_cd_tdirectory ::+ Ptr RawTROOT -> CString -> IO CBool -foreign import ccall safe "HROOTCoreTROOT.h TROOT_SetName"+foreign import ccall interruptible "HROOTCoreTROOT.h TROOT_SetName" c_troot_setname :: Ptr RawTROOT -> CString -> IO () -foreign import ccall safe "HROOTCoreTROOT.h TROOT_SetNameTitle"- c_troot_setnametitle :: Ptr RawTROOT -> CString -> CString -> IO ()+foreign import ccall interruptible+ "HROOTCoreTROOT.h TROOT_SetNameTitle" c_troot_setnametitle ::+ Ptr RawTROOT -> CString -> CString -> IO () -foreign import ccall safe "HROOTCoreTROOT.h TROOT_SetTitle"- c_troot_settitle :: Ptr RawTROOT -> CString -> IO ()+foreign import ccall interruptible+ "HROOTCoreTROOT.h TROOT_SetTitle" c_troot_settitle ::+ Ptr RawTROOT -> CString -> IO () -foreign import ccall safe "HROOTCoreTROOT.h TROOT_Draw"+foreign import ccall interruptible "HROOTCoreTROOT.h TROOT_Clear"+ c_troot_clear :: Ptr RawTROOT -> CString -> IO ()++foreign import ccall interruptible "HROOTCoreTROOT.h TROOT_Draw" c_troot_draw :: Ptr RawTROOT -> CString -> IO () -foreign import ccall safe "HROOTCoreTROOT.h TROOT_FindObject"- c_troot_findobject ::+foreign import ccall interruptible+ "HROOTCoreTROOT.h TROOT_FindObject" c_troot_findobject :: Ptr RawTROOT -> CString -> IO (Ptr RawTObject) -foreign import ccall safe "HROOTCoreTROOT.h TROOT_GetName"+foreign import ccall interruptible "HROOTCoreTROOT.h TROOT_GetName" c_troot_getname :: Ptr RawTROOT -> IO CString -foreign import ccall safe "HROOTCoreTROOT.h TROOT_IsA" c_troot_isa- :: Ptr RawTROOT -> IO (Ptr RawTClass)+foreign import ccall interruptible "HROOTCoreTROOT.h TROOT_IsA"+ c_troot_isa :: Ptr RawTROOT -> IO (Ptr RawTClass) -foreign import ccall safe "HROOTCoreTROOT.h TROOT_Paint"+foreign import ccall interruptible "HROOTCoreTROOT.h TROOT_Paint" c_troot_paint :: Ptr RawTROOT -> CString -> IO () -foreign import ccall safe "HROOTCoreTROOT.h TROOT_printObj"- c_troot_printobj :: Ptr RawTROOT -> CString -> IO ()+foreign import ccall interruptible+ "HROOTCoreTROOT.h TROOT_printObj" c_troot_printobj ::+ Ptr RawTROOT -> CString -> IO () -foreign import ccall safe "HROOTCoreTROOT.h TROOT_SaveAs"+foreign import ccall interruptible "HROOTCoreTROOT.h TROOT_SaveAs" c_troot_saveas :: Ptr RawTROOT -> CString -> CString -> IO () -foreign import ccall safe "HROOTCoreTROOT.h TROOT_Write"+foreign import ccall interruptible "HROOTCoreTROOT.h TROOT_Write" c_troot_write :: Ptr RawTROOT -> CString -> CInt -> CInt -> IO CInt -foreign import ccall safe "HROOTCoreTROOT.h TROOT_delete"+foreign import ccall interruptible "HROOTCoreTROOT.h TROOT_Write_"+ c_troot_write_ :: Ptr RawTROOT -> IO CInt++foreign import ccall interruptible "HROOTCoreTROOT.h TROOT_delete" c_troot_delete :: Ptr RawTROOT -> IO () -foreign import ccall safe "HROOTCoreTROOT.h TROOT_tROOTGetGlobal"- c_troot_trootgetglobal ::- Ptr RawTROOT -> CString -> CInt -> IO (Ptr RawTGlobal)+foreign import ccall interruptible+ "HROOTCoreTROOT.h TROOT_tROOT_GetGlobal" c_troot_troot_getglobal ::+ Ptr RawTROOT -> CString -> CBool -> IO (Ptr RawTGlobal) -foreign import ccall safe "HROOTCoreTROOT.h TROOT_tROOTInitialized"- c_troot_trootinitialized :: IO CInt+foreign import ccall interruptible+ "HROOTCoreTROOT.h TROOT_tROOT_Initialized"+ c_troot_troot_initialized :: IO CBool
src/HROOT/Core/TROOT/Implementation.hs view
@@ -1,17 +1,26 @@ {-# LANGUAGE EmptyDataDecls, FlexibleContexts, FlexibleInstances, ForeignFunctionInterface, IncoherentInstances,- MultiParamTypeClasses, OverlappingInstances, TypeFamilies,- TypeSynonymInstances #-}+ MultiParamTypeClasses, OverlappingInstances, TemplateHaskell,+ TypeFamilies, TypeSynonymInstances #-} module HROOT.Core.TROOT.Implementation where-import FFICXX.Runtime.Cast+import Data.Monoid import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr+import Language.Haskell.TH+import Language.Haskell.TH.Syntax import System.IO.Unsafe+import FFICXX.Runtime.Cast+import FFICXX.Runtime.CodeGen.Cxx+import FFICXX.Runtime.TH import HROOT.Core.TROOT.RawType import HROOT.Core.TROOT.FFI import HROOT.Core.TROOT.Interface import HROOT.Core.TROOT.Cast+import HROOT.Core.TROOT.RawType+import HROOT.Core.TROOT.Cast+import HROOT.Core.TROOT.Interface import HROOT.Core.TKey.RawType import HROOT.Core.TKey.Cast import HROOT.Core.TKey.Interface@@ -30,13 +39,13 @@ 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+import STD.Deletable.RawType+import STD.Deletable.Cast+import STD.Deletable.Interface -instance ITROOT TROOT+instance () => ITROOT (TROOT) where -instance ITDirectory TROOT where+instance () => ITDirectory (TROOT) where append = xform2 c_troot_append addD = xform2 c_troot_addd appendKey = xform1 c_troot_appendkey@@ -44,12 +53,13 @@ get = xform1 c_troot_get cd_TDirectory = xform1 c_troot_cd_tdirectory -instance ITNamed TROOT where+instance () => ITNamed (TROOT) where setName = xform1 c_troot_setname setNameTitle = xform2 c_troot_setnametitle setTitle = xform1 c_troot_settitle -instance ITObject TROOT where+instance () => ITObject (TROOT) where+ clear = xform1 c_troot_clear draw = xform1 c_troot_draw findObject = xform1 c_troot_findobject getName = xform0 c_troot_getname@@ -58,13 +68,14 @@ printObj = xform1 c_troot_printobj saveAs = xform2 c_troot_saveas write = xform3 c_troot_write+ write_ = xform0 c_troot_write_ -instance IDeletable TROOT where+instance () => IDeletable (TROOT) where delete = xform0 c_troot_delete -tROOTGetGlobal ::- Castable c0 CString => TROOT -> c0 -> CInt -> IO TGlobal-tROOTGetGlobal = xform2 c_troot_trootgetglobal+tROOT_GetGlobal ::+ (Castable c0 CString) => TROOT -> c0 -> CBool -> IO TGlobal+tROOT_GetGlobal = xform2 c_troot_troot_getglobal -tROOTInitialized :: IO CInt-tROOTInitialized = xformnull c_troot_trootinitialized+tROOT_Initialized :: () => IO CBool+tROOT_Initialized = xformnull c_troot_troot_initialized
src/HROOT/Core/TROOT/Interface.hs view
@@ -4,14 +4,14 @@ TypeSynonymInstances #-} module HROOT.Core.TROOT.Interface where import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr import FFICXX.Runtime.Cast import HROOT.Core.TROOT.RawType-import HROOT.Core.TGlobal.RawType import HROOT.Core.TDirectory.Interface -class ITDirectory a => ITROOT a+class (ITDirectory a) => ITROOT a where upcastTROOT :: forall a . (FPtr a, ITROOT a) => a -> TROOT upcastTROOT h
src/HROOT/Core/TROOT/RawType.hs view
@@ -8,9 +8,9 @@ data RawTROOT newtype TROOT = TROOT (Ptr RawTROOT)- deriving (Eq, Ord, Show)+ deriving (Eq, Ord, Show) -instance FPtr TROOT where+instance () => FPtr (TROOT) where type Raw TROOT = RawTROOT get_fptr (TROOT ptr) = ptr cast_fptr_to_obj = TROOT
src/HROOT/Core/TSeqCollection/Cast.hs view
@@ -8,11 +8,13 @@ import HROOT.Core.TSeqCollection.RawType import HROOT.Core.TSeqCollection.Interface -instance (ITSeqCollection a, FPtr a) => Castable a- (Ptr RawTSeqCollection) where+instance (ITSeqCollection a, FPtr a) =>+ Castable (a) (Ptr RawTSeqCollection)+ where cast x f = f (castPtr (get_fptr x)) uncast x f = f (cast_fptr_to_obj (castPtr x)) -instance Castable TSeqCollection (Ptr RawTSeqCollection) where+instance () => Castable (TSeqCollection) (Ptr RawTSeqCollection)+ where cast x f = f (castPtr (get_fptr x)) uncast x f = f (cast_fptr_to_obj (castPtr x))
src/HROOT/Core/TSeqCollection/FFI.hsc view
@@ -1,47 +1,58 @@-{-# LANGUAGE ForeignFunctionInterface #-}+{-# LANGUAGE ForeignFunctionInterface, InterruptibleFFI #-} module HROOT.Core.TSeqCollection.FFI where+import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr import HROOT.Core.TSeqCollection.RawType+import HROOT.Core.TSeqCollection.RawType import HROOT.Core.TObject.RawType import HROOT.Core.TClass.RawType -foreign import ccall safe+foreign import ccall interruptible+ "HROOTCoreTSeqCollection.h TSeqCollection_Clear"+ c_tseqcollection_clear :: Ptr RawTSeqCollection -> CString -> IO ()++foreign import ccall interruptible "HROOTCoreTSeqCollection.h TSeqCollection_Draw" c_tseqcollection_draw :: Ptr RawTSeqCollection -> CString -> IO () -foreign import ccall safe+foreign import ccall interruptible "HROOTCoreTSeqCollection.h TSeqCollection_FindObject" c_tseqcollection_findobject :: Ptr RawTSeqCollection -> CString -> IO (Ptr RawTObject) -foreign import ccall safe+foreign import ccall interruptible "HROOTCoreTSeqCollection.h TSeqCollection_GetName" c_tseqcollection_getname :: Ptr RawTSeqCollection -> IO CString -foreign import ccall safe+foreign import ccall interruptible "HROOTCoreTSeqCollection.h TSeqCollection_IsA" c_tseqcollection_isa :: Ptr RawTSeqCollection -> IO (Ptr RawTClass) -foreign import ccall safe+foreign import ccall interruptible "HROOTCoreTSeqCollection.h TSeqCollection_Paint" c_tseqcollection_paint :: Ptr RawTSeqCollection -> CString -> IO () -foreign import ccall safe+foreign import ccall interruptible "HROOTCoreTSeqCollection.h TSeqCollection_printObj" c_tseqcollection_printobj :: Ptr RawTSeqCollection -> CString -> IO () -foreign import ccall safe+foreign import ccall interruptible "HROOTCoreTSeqCollection.h TSeqCollection_SaveAs" c_tseqcollection_saveas :: Ptr RawTSeqCollection -> CString -> CString -> IO () -foreign import ccall safe+foreign import ccall interruptible "HROOTCoreTSeqCollection.h TSeqCollection_Write" c_tseqcollection_write :: Ptr RawTSeqCollection -> CString -> CInt -> CInt -> IO CInt -foreign import ccall safe+foreign import ccall interruptible+ "HROOTCoreTSeqCollection.h TSeqCollection_Write_"+ c_tseqcollection_write_ :: Ptr RawTSeqCollection -> IO CInt++foreign import ccall interruptible "HROOTCoreTSeqCollection.h TSeqCollection_delete" c_tseqcollection_delete :: Ptr RawTSeqCollection -> IO ()
src/HROOT/Core/TSeqCollection/Implementation.hs view
@@ -1,17 +1,26 @@ {-# LANGUAGE EmptyDataDecls, FlexibleContexts, FlexibleInstances, ForeignFunctionInterface, IncoherentInstances,- MultiParamTypeClasses, OverlappingInstances, TypeFamilies,- TypeSynonymInstances #-}+ MultiParamTypeClasses, OverlappingInstances, TemplateHaskell,+ TypeFamilies, TypeSynonymInstances #-} module HROOT.Core.TSeqCollection.Implementation where-import FFICXX.Runtime.Cast+import Data.Monoid import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr+import Language.Haskell.TH+import Language.Haskell.TH.Syntax import System.IO.Unsafe+import FFICXX.Runtime.Cast+import FFICXX.Runtime.CodeGen.Cxx+import FFICXX.Runtime.TH import HROOT.Core.TSeqCollection.RawType import HROOT.Core.TSeqCollection.FFI import HROOT.Core.TSeqCollection.Interface import HROOT.Core.TSeqCollection.Cast+import HROOT.Core.TSeqCollection.RawType+import HROOT.Core.TSeqCollection.Cast+import HROOT.Core.TSeqCollection.Interface import HROOT.Core.TClass.RawType import HROOT.Core.TClass.Cast import HROOT.Core.TClass.Interface@@ -21,15 +30,16 @@ 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+import STD.Deletable.RawType+import STD.Deletable.Cast+import STD.Deletable.Interface -instance ITSeqCollection TSeqCollection+instance () => ITSeqCollection (TSeqCollection) where -instance ITCollection TSeqCollection+instance () => ITCollection (TSeqCollection) where -instance ITObject TSeqCollection where+instance () => ITObject (TSeqCollection) where+ clear = xform1 c_tseqcollection_clear draw = xform1 c_tseqcollection_draw findObject = xform1 c_tseqcollection_findobject getName = xform0 c_tseqcollection_getname@@ -38,6 +48,7 @@ printObj = xform1 c_tseqcollection_printobj saveAs = xform2 c_tseqcollection_saveas write = xform3 c_tseqcollection_write+ write_ = xform0 c_tseqcollection_write_ -instance IDeletable TSeqCollection where+instance () => IDeletable (TSeqCollection) where delete = xform0 c_tseqcollection_delete
src/HROOT/Core/TSeqCollection/Interface.hs view
@@ -4,13 +4,14 @@ TypeSynonymInstances #-} module HROOT.Core.TSeqCollection.Interface where import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr import FFICXX.Runtime.Cast import HROOT.Core.TSeqCollection.RawType import HROOT.Core.TCollection.Interface -class ITCollection a => ITSeqCollection a+class (ITCollection a) => ITSeqCollection a where upcastTSeqCollection :: forall a . (FPtr a, ITSeqCollection a) => a -> TSeqCollection
src/HROOT/Core/TSeqCollection/RawType.hs view
@@ -8,9 +8,9 @@ data RawTSeqCollection newtype TSeqCollection = TSeqCollection (Ptr RawTSeqCollection)- deriving (Eq, Ord, Show)+ deriving (Eq, Ord, Show) -instance FPtr TSeqCollection where+instance () => FPtr (TSeqCollection) where type Raw TSeqCollection = RawTSeqCollection get_fptr (TSeqCollection ptr) = ptr cast_fptr_to_obj = TSeqCollection
+ src/HROOT/Core/TStyle.hs view
@@ -0,0 +1,10 @@+module HROOT.Core.TStyle+ (TStyle(..), ITStyle, upcastTStyle, downcastTStyle,+ tStyle_SetCanvasPreferGL, tStyle_SetOptDate, tStyle_SetOptFile,+ tStyle_SetOptFit, tStyle_SetOptLogx, tStyle_SetOptLogy,+ tStyle_SetOptLogz, tStyle_SetOptStat, tStyle_SetOptTitle,+ tStyle_SetPalette)+ where+import HROOT.Core.TStyle.RawType+import HROOT.Core.TStyle.Interface+import HROOT.Core.TStyle.Implementation
+ src/HROOT/Core/TStyle/Cast.hs view
@@ -0,0 +1,17 @@+{-# LANGUAGE FlexibleInstances, FlexibleContexts, TypeFamilies,+ MultiParamTypeClasses, OverlappingInstances, IncoherentInstances+ #-}+module HROOT.Core.TStyle.Cast where+import Foreign.Ptr+import FFICXX.Runtime.Cast+import System.IO.Unsafe+import HROOT.Core.TStyle.RawType+import HROOT.Core.TStyle.Interface++instance (ITStyle a, FPtr a) => Castable (a) (Ptr RawTStyle) where+ cast x f = f (castPtr (get_fptr x))+ uncast x f = f (cast_fptr_to_obj (castPtr x))++instance () => Castable (TStyle) (Ptr RawTStyle) where+ cast x f = f (castPtr (get_fptr x))+ uncast x f = f (cast_fptr_to_obj (castPtr x))
+ src/HROOT/Core/TStyle/FFI.hsc view
@@ -0,0 +1,227 @@+{-# LANGUAGE ForeignFunctionInterface, InterruptibleFFI #-}+module HROOT.Core.TStyle.FFI where+import Data.Word+import Data.Int+import Foreign.C+import Foreign.Ptr+import HROOT.Core.TStyle.RawType+import HROOT.Core.TStyle.RawType+import HROOT.Core.TObject.RawType+import HROOT.Core.TClass.RawType++foreign import ccall interruptible+ "HROOTCoreTStyle.h TStyle_SetName" c_tstyle_setname ::+ Ptr RawTStyle -> CString -> IO ()++foreign import ccall interruptible+ "HROOTCoreTStyle.h TStyle_SetNameTitle" c_tstyle_setnametitle ::+ Ptr RawTStyle -> CString -> CString -> IO ()++foreign import ccall interruptible+ "HROOTCoreTStyle.h TStyle_SetTitle" c_tstyle_settitle ::+ Ptr RawTStyle -> CString -> IO ()++foreign import ccall interruptible+ "HROOTCoreTStyle.h TStyle_GetLineColor" c_tstyle_getlinecolor ::+ Ptr RawTStyle -> IO CShort++foreign import ccall interruptible+ "HROOTCoreTStyle.h TStyle_GetLineStyle" c_tstyle_getlinestyle ::+ Ptr RawTStyle -> IO CShort++foreign import ccall interruptible+ "HROOTCoreTStyle.h TStyle_GetLineWidth" c_tstyle_getlinewidth ::+ Ptr RawTStyle -> IO CShort++foreign import ccall interruptible+ "HROOTCoreTStyle.h TStyle_ResetAttLine" c_tstyle_resetattline ::+ Ptr RawTStyle -> CString -> IO ()++foreign import ccall interruptible+ "HROOTCoreTStyle.h TStyle_SetLineAttributes"+ c_tstyle_setlineattributes :: Ptr RawTStyle -> IO ()++foreign import ccall interruptible+ "HROOTCoreTStyle.h TStyle_SetLineColor" c_tstyle_setlinecolor ::+ Ptr RawTStyle -> CShort -> IO ()++foreign import ccall interruptible+ "HROOTCoreTStyle.h TStyle_SetLineStyle" c_tstyle_setlinestyle ::+ Ptr RawTStyle -> CShort -> IO ()++foreign import ccall interruptible+ "HROOTCoreTStyle.h TStyle_SetLineWidth" c_tstyle_setlinewidth ::+ Ptr RawTStyle -> CShort -> IO ()++foreign import ccall interruptible+ "HROOTCoreTStyle.h TStyle_SetFillColor" c_tstyle_setfillcolor ::+ Ptr RawTStyle -> CInt -> IO ()++foreign import ccall interruptible+ "HROOTCoreTStyle.h TStyle_SetFillStyle" c_tstyle_setfillstyle ::+ Ptr RawTStyle -> CInt -> IO ()++foreign import ccall interruptible+ "HROOTCoreTStyle.h TStyle_GetMarkerColor" c_tstyle_getmarkercolor+ :: Ptr RawTStyle -> IO CShort++foreign import ccall interruptible+ "HROOTCoreTStyle.h TStyle_GetMarkerStyle" c_tstyle_getmarkerstyle+ :: Ptr RawTStyle -> IO CShort++foreign import ccall interruptible+ "HROOTCoreTStyle.h TStyle_GetMarkerSize" c_tstyle_getmarkersize ::+ Ptr RawTStyle -> IO CFloat++foreign import ccall interruptible+ "HROOTCoreTStyle.h TStyle_ResetAttMarker" c_tstyle_resetattmarker+ :: Ptr RawTStyle -> CString -> IO ()++foreign import ccall interruptible+ "HROOTCoreTStyle.h TStyle_SetMarkerAttributes"+ c_tstyle_setmarkerattributes :: Ptr RawTStyle -> IO ()++foreign import ccall interruptible+ "HROOTCoreTStyle.h TStyle_SetMarkerColor" c_tstyle_setmarkercolor+ :: Ptr RawTStyle -> CShort -> IO ()++foreign import ccall interruptible+ "HROOTCoreTStyle.h TStyle_SetMarkerStyle" c_tstyle_setmarkerstyle+ :: Ptr RawTStyle -> CShort -> IO ()++foreign import ccall interruptible+ "HROOTCoreTStyle.h TStyle_SetMarkerSize" c_tstyle_setmarkersize ::+ Ptr RawTStyle -> CShort -> IO ()++foreign import ccall interruptible+ "HROOTCoreTStyle.h TStyle_GetTextAlign" c_tstyle_gettextalign ::+ Ptr RawTStyle -> IO CShort++foreign import ccall interruptible+ "HROOTCoreTStyle.h TStyle_GetTextAngle" c_tstyle_gettextangle ::+ Ptr RawTStyle -> IO CFloat++foreign import ccall interruptible+ "HROOTCoreTStyle.h TStyle_GetTextColor" c_tstyle_gettextcolor ::+ Ptr RawTStyle -> IO CShort++foreign import ccall interruptible+ "HROOTCoreTStyle.h TStyle_GetTextFont" c_tstyle_gettextfont ::+ Ptr RawTStyle -> IO CShort++foreign import ccall interruptible+ "HROOTCoreTStyle.h TStyle_GetTextSize" c_tstyle_gettextsize ::+ Ptr RawTStyle -> IO CFloat++foreign import ccall interruptible+ "HROOTCoreTStyle.h TStyle_ResetAttText" c_tstyle_resetatttext ::+ Ptr RawTStyle -> CString -> IO ()++foreign import ccall interruptible+ "HROOTCoreTStyle.h TStyle_SetTextAttributes"+ c_tstyle_settextattributes :: Ptr RawTStyle -> IO ()++foreign import ccall interruptible+ "HROOTCoreTStyle.h TStyle_SetTextAlign" c_tstyle_settextalign ::+ Ptr RawTStyle -> CShort -> IO ()++foreign import ccall interruptible+ "HROOTCoreTStyle.h TStyle_SetTextAngle" c_tstyle_settextangle ::+ Ptr RawTStyle -> CFloat -> IO ()++foreign import ccall interruptible+ "HROOTCoreTStyle.h TStyle_SetTextColor" c_tstyle_settextcolor ::+ Ptr RawTStyle -> CInt -> IO ()++foreign import ccall interruptible+ "HROOTCoreTStyle.h TStyle_SetTextFont" c_tstyle_settextfont ::+ Ptr RawTStyle -> CShort -> IO ()++foreign import ccall interruptible+ "HROOTCoreTStyle.h TStyle_SetTextSize" c_tstyle_settextsize ::+ Ptr RawTStyle -> CFloat -> IO ()++foreign import ccall interruptible+ "HROOTCoreTStyle.h TStyle_SetTextSizePixels"+ c_tstyle_settextsizepixels :: Ptr RawTStyle -> CInt -> IO ()++foreign import ccall interruptible "HROOTCoreTStyle.h TStyle_Clear"+ c_tstyle_clear :: Ptr RawTStyle -> CString -> IO ()++foreign import ccall interruptible "HROOTCoreTStyle.h TStyle_Draw"+ c_tstyle_draw :: Ptr RawTStyle -> CString -> IO ()++foreign import ccall interruptible+ "HROOTCoreTStyle.h TStyle_FindObject" c_tstyle_findobject ::+ Ptr RawTStyle -> CString -> IO (Ptr RawTObject)++foreign import ccall interruptible+ "HROOTCoreTStyle.h TStyle_GetName" c_tstyle_getname ::+ Ptr RawTStyle -> IO CString++foreign import ccall interruptible "HROOTCoreTStyle.h TStyle_IsA"+ c_tstyle_isa :: Ptr RawTStyle -> IO (Ptr RawTClass)++foreign import ccall interruptible "HROOTCoreTStyle.h TStyle_Paint"+ c_tstyle_paint :: Ptr RawTStyle -> CString -> IO ()++foreign import ccall interruptible+ "HROOTCoreTStyle.h TStyle_printObj" c_tstyle_printobj ::+ Ptr RawTStyle -> CString -> IO ()++foreign import ccall interruptible+ "HROOTCoreTStyle.h TStyle_SaveAs" c_tstyle_saveas ::+ Ptr RawTStyle -> CString -> CString -> IO ()++foreign import ccall interruptible "HROOTCoreTStyle.h TStyle_Write"+ c_tstyle_write ::+ Ptr RawTStyle -> CString -> CInt -> CInt -> IO CInt++foreign import ccall interruptible+ "HROOTCoreTStyle.h TStyle_Write_" c_tstyle_write_ ::+ Ptr RawTStyle -> IO CInt++foreign import ccall interruptible+ "HROOTCoreTStyle.h TStyle_delete" c_tstyle_delete ::+ Ptr RawTStyle -> IO ()++foreign import ccall interruptible+ "HROOTCoreTStyle.h TStyle_tStyle_SetCanvasPreferGL"+ c_tstyle_tstyle_setcanvasprefergl ::+ Ptr RawTStyle -> CBool -> IO ()++foreign import ccall interruptible+ "HROOTCoreTStyle.h TStyle_tStyle_SetOptDate"+ c_tstyle_tstyle_setoptdate :: Ptr RawTStyle -> CInt -> IO ()++foreign import ccall interruptible+ "HROOTCoreTStyle.h TStyle_tStyle_SetOptFile"+ c_tstyle_tstyle_setoptfile :: Ptr RawTStyle -> CInt -> IO ()++foreign import ccall interruptible+ "HROOTCoreTStyle.h TStyle_tStyle_SetOptFit"+ c_tstyle_tstyle_setoptfit :: Ptr RawTStyle -> CInt -> IO ()++foreign import ccall interruptible+ "HROOTCoreTStyle.h TStyle_tStyle_SetOptLogx"+ c_tstyle_tstyle_setoptlogx :: Ptr RawTStyle -> CInt -> IO ()++foreign import ccall interruptible+ "HROOTCoreTStyle.h TStyle_tStyle_SetOptLogy"+ c_tstyle_tstyle_setoptlogy :: Ptr RawTStyle -> CInt -> IO ()++foreign import ccall interruptible+ "HROOTCoreTStyle.h TStyle_tStyle_SetOptLogz"+ c_tstyle_tstyle_setoptlogz :: Ptr RawTStyle -> CInt -> IO ()++foreign import ccall interruptible+ "HROOTCoreTStyle.h TStyle_tStyle_SetOptStat"+ c_tstyle_tstyle_setoptstat :: Ptr RawTStyle -> CInt -> IO ()++foreign import ccall interruptible+ "HROOTCoreTStyle.h TStyle_tStyle_SetOptTitle"+ c_tstyle_tstyle_setopttitle :: Ptr RawTStyle -> CInt -> IO ()++foreign import ccall interruptible+ "HROOTCoreTStyle.h TStyle_tStyle_SetPalette"+ c_tstyle_tstyle_setpalette :: Ptr RawTStyle -> CInt -> IO ()
+ src/HROOT/Core/TStyle/Implementation.hs view
@@ -0,0 +1,138 @@+{-# LANGUAGE EmptyDataDecls, FlexibleContexts, FlexibleInstances,+ ForeignFunctionInterface, IncoherentInstances,+ MultiParamTypeClasses, OverlappingInstances, TemplateHaskell,+ TypeFamilies, TypeSynonymInstances #-}+module HROOT.Core.TStyle.Implementation where+import Data.Monoid+import Data.Word+import Data.Int+import Foreign.C+import Foreign.Ptr+import Language.Haskell.TH+import Language.Haskell.TH.Syntax+import System.IO.Unsafe+import FFICXX.Runtime.Cast+import FFICXX.Runtime.CodeGen.Cxx+import FFICXX.Runtime.TH+import HROOT.Core.TStyle.RawType+import HROOT.Core.TStyle.FFI+import HROOT.Core.TStyle.Interface+import HROOT.Core.TStyle.Cast+import HROOT.Core.TStyle.RawType+import HROOT.Core.TStyle.Cast+import HROOT.Core.TStyle.Interface+import HROOT.Core.TClass.RawType+import HROOT.Core.TClass.Cast+import HROOT.Core.TClass.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.TAttText.RawType+import HROOT.Core.TAttText.Cast+import HROOT.Core.TAttText.Interface+import HROOT.Core.TObject.RawType+import HROOT.Core.TObject.Cast+import HROOT.Core.TObject.Interface+import STD.Deletable.RawType+import STD.Deletable.Cast+import STD.Deletable.Interface++instance () => ITStyle (TStyle) where++instance () => ITNamed (TStyle) where+ setName = xform1 c_tstyle_setname+ setNameTitle = xform2 c_tstyle_setnametitle+ setTitle = xform1 c_tstyle_settitle++instance () => ITAttLine (TStyle) where+ getLineColor = xform0 c_tstyle_getlinecolor+ getLineStyle = xform0 c_tstyle_getlinestyle+ getLineWidth = xform0 c_tstyle_getlinewidth+ resetAttLine = xform1 c_tstyle_resetattline+ setLineAttributes = xform0 c_tstyle_setlineattributes+ setLineColor = xform1 c_tstyle_setlinecolor+ setLineStyle = xform1 c_tstyle_setlinestyle+ setLineWidth = xform1 c_tstyle_setlinewidth++instance () => ITAttFill (TStyle) where+ setFillColor = xform1 c_tstyle_setfillcolor+ setFillStyle = xform1 c_tstyle_setfillstyle++instance () => ITAttMarker (TStyle) where+ getMarkerColor = xform0 c_tstyle_getmarkercolor+ getMarkerStyle = xform0 c_tstyle_getmarkerstyle+ getMarkerSize = xform0 c_tstyle_getmarkersize+ resetAttMarker = xform1 c_tstyle_resetattmarker+ setMarkerAttributes = xform0 c_tstyle_setmarkerattributes+ setMarkerColor = xform1 c_tstyle_setmarkercolor+ setMarkerStyle = xform1 c_tstyle_setmarkerstyle+ setMarkerSize = xform1 c_tstyle_setmarkersize++instance () => ITAttText (TStyle) where+ getTextAlign = xform0 c_tstyle_gettextalign+ getTextAngle = xform0 c_tstyle_gettextangle+ getTextColor = xform0 c_tstyle_gettextcolor+ getTextFont = xform0 c_tstyle_gettextfont+ getTextSize = xform0 c_tstyle_gettextsize+ resetAttText = xform1 c_tstyle_resetatttext+ setTextAttributes = xform0 c_tstyle_settextattributes+ setTextAlign = xform1 c_tstyle_settextalign+ setTextAngle = xform1 c_tstyle_settextangle+ setTextColor = xform1 c_tstyle_settextcolor+ setTextFont = xform1 c_tstyle_settextfont+ setTextSize = xform1 c_tstyle_settextsize+ setTextSizePixels = xform1 c_tstyle_settextsizepixels++instance () => ITObject (TStyle) where+ clear = xform1 c_tstyle_clear+ draw = xform1 c_tstyle_draw+ findObject = xform1 c_tstyle_findobject+ getName = xform0 c_tstyle_getname+ isA = xform0 c_tstyle_isa+ paint = xform1 c_tstyle_paint+ printObj = xform1 c_tstyle_printobj+ saveAs = xform2 c_tstyle_saveas+ write = xform3 c_tstyle_write+ write_ = xform0 c_tstyle_write_++instance () => IDeletable (TStyle) where+ delete = xform0 c_tstyle_delete++tStyle_SetCanvasPreferGL :: () => TStyle -> CBool -> IO ()+tStyle_SetCanvasPreferGL = xform1 c_tstyle_tstyle_setcanvasprefergl++tStyle_SetOptDate :: () => TStyle -> CInt -> IO ()+tStyle_SetOptDate = xform1 c_tstyle_tstyle_setoptdate++tStyle_SetOptFile :: () => TStyle -> CInt -> IO ()+tStyle_SetOptFile = xform1 c_tstyle_tstyle_setoptfile++tStyle_SetOptFit :: () => TStyle -> CInt -> IO ()+tStyle_SetOptFit = xform1 c_tstyle_tstyle_setoptfit++tStyle_SetOptLogx :: () => TStyle -> CInt -> IO ()+tStyle_SetOptLogx = xform1 c_tstyle_tstyle_setoptlogx++tStyle_SetOptLogy :: () => TStyle -> CInt -> IO ()+tStyle_SetOptLogy = xform1 c_tstyle_tstyle_setoptlogy++tStyle_SetOptLogz :: () => TStyle -> CInt -> IO ()+tStyle_SetOptLogz = xform1 c_tstyle_tstyle_setoptlogz++tStyle_SetOptStat :: () => TStyle -> CInt -> IO ()+tStyle_SetOptStat = xform1 c_tstyle_tstyle_setoptstat++tStyle_SetOptTitle :: () => TStyle -> CInt -> IO ()+tStyle_SetOptTitle = xform1 c_tstyle_tstyle_setopttitle++tStyle_SetPalette :: () => TStyle -> CInt -> IO ()+tStyle_SetPalette = xform1 c_tstyle_tstyle_setpalette
+ src/HROOT/Core/TStyle/Interface.hs view
@@ -0,0 +1,32 @@+{-# LANGUAGE EmptyDataDecls, ExistentialQuantification,+ FlexibleContexts, FlexibleInstances, ForeignFunctionInterface,+ MultiParamTypeClasses, ScopedTypeVariables, TypeFamilies,+ TypeSynonymInstances #-}+module HROOT.Core.TStyle.Interface where+import Data.Word+import Data.Int+import Foreign.C+import Foreign.Ptr+import FFICXX.Runtime.Cast+import HROOT.Core.TStyle.RawType+import HROOT.Core.TNamed.Interface+import HROOT.Core.TAttLine.Interface+import HROOT.Core.TAttFill.Interface+import HROOT.Core.TAttMarker.Interface+import HROOT.Core.TAttText.Interface++class (ITNamed a, ITAttLine a, ITAttFill a, ITAttMarker a,+ ITAttText a) =>+ ITStyle a where++upcastTStyle :: forall a . (FPtr a, ITStyle a) => a -> TStyle+upcastTStyle h+ = let fh = get_fptr h+ fh2 :: Ptr RawTStyle = castPtr fh+ in cast_fptr_to_obj fh2++downcastTStyle :: forall a . (FPtr a, ITStyle a) => TStyle -> a+downcastTStyle h+ = let fh = get_fptr h+ fh2 = castPtr fh+ in cast_fptr_to_obj fh2
+ src/HROOT/Core/TStyle/RawType.hs view
@@ -0,0 +1,16 @@+{-# LANGUAGE ForeignFunctionInterface, TypeFamilies,+ MultiParamTypeClasses, FlexibleInstances, TypeSynonymInstances,+ EmptyDataDecls, ExistentialQuantification, ScopedTypeVariables #-}+module HROOT.Core.TStyle.RawType where+import Foreign.Ptr+import FFICXX.Runtime.Cast++data RawTStyle++newtype TStyle = TStyle (Ptr RawTStyle)+ deriving (Eq, Ord, Show)++instance () => FPtr (TStyle) where+ type Raw TStyle = RawTStyle+ get_fptr (TStyle ptr) = ptr+ cast_fptr_to_obj = TStyle
src/HROOT/Core/TSystem/Cast.hs view
@@ -8,10 +8,11 @@ import HROOT.Core.TSystem.RawType import HROOT.Core.TSystem.Interface -instance (ITSystem a, FPtr a) => Castable a (Ptr RawTSystem) where+instance (ITSystem a, FPtr a) => Castable (a) (Ptr RawTSystem)+ where cast x f = f (castPtr (get_fptr x)) uncast x f = f (cast_fptr_to_obj (castPtr x)) -instance Castable TSystem (Ptr RawTSystem) where+instance () => Castable (TSystem) (Ptr RawTSystem) where cast x f = f (castPtr (get_fptr x)) uncast x f = f (cast_fptr_to_obj (castPtr x))
src/HROOT/Core/TSystem/FFI.hsc view
@@ -1,50 +1,69 @@-{-# LANGUAGE ForeignFunctionInterface #-}+{-# LANGUAGE ForeignFunctionInterface, InterruptibleFFI #-} module HROOT.Core.TSystem.FFI where+import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr import HROOT.Core.TSystem.RawType+import HROOT.Core.TSystem.RawType import HROOT.Core.TObject.RawType import HROOT.Core.TClass.RawType -foreign import ccall safe "HROOTCoreTSystem.h TSystem_SetName"- c_tsystem_setname :: Ptr RawTSystem -> CString -> IO ()+foreign import ccall interruptible+ "HROOTCoreTSystem.h TSystem_SetName" c_tsystem_setname ::+ Ptr RawTSystem -> CString -> IO () -foreign import ccall safe "HROOTCoreTSystem.h TSystem_SetNameTitle"- c_tsystem_setnametitle ::+foreign import ccall interruptible+ "HROOTCoreTSystem.h TSystem_SetNameTitle" c_tsystem_setnametitle :: Ptr RawTSystem -> CString -> CString -> IO () -foreign import ccall safe "HROOTCoreTSystem.h TSystem_SetTitle"- c_tsystem_settitle :: Ptr RawTSystem -> CString -> IO ()+foreign import ccall interruptible+ "HROOTCoreTSystem.h TSystem_SetTitle" c_tsystem_settitle ::+ Ptr RawTSystem -> CString -> IO () -foreign import ccall safe "HROOTCoreTSystem.h TSystem_Draw"- c_tsystem_draw :: Ptr RawTSystem -> CString -> IO ()+foreign import ccall interruptible+ "HROOTCoreTSystem.h TSystem_Clear" c_tsystem_clear ::+ Ptr RawTSystem -> CString -> IO () -foreign import ccall safe "HROOTCoreTSystem.h TSystem_FindObject"- c_tsystem_findobject ::+foreign import ccall interruptible+ "HROOTCoreTSystem.h TSystem_Draw" c_tsystem_draw ::+ Ptr RawTSystem -> CString -> IO ()++foreign import ccall interruptible+ "HROOTCoreTSystem.h TSystem_FindObject" c_tsystem_findobject :: Ptr RawTSystem -> CString -> IO (Ptr RawTObject) -foreign import ccall safe "HROOTCoreTSystem.h TSystem_GetName"- c_tsystem_getname :: Ptr RawTSystem -> IO CString+foreign import ccall interruptible+ "HROOTCoreTSystem.h TSystem_GetName" c_tsystem_getname ::+ Ptr RawTSystem -> IO CString -foreign import ccall safe "HROOTCoreTSystem.h TSystem_IsA"+foreign import ccall interruptible "HROOTCoreTSystem.h TSystem_IsA" c_tsystem_isa :: Ptr RawTSystem -> IO (Ptr RawTClass) -foreign import ccall safe "HROOTCoreTSystem.h TSystem_Paint"- c_tsystem_paint :: Ptr RawTSystem -> CString -> IO ()+foreign import ccall interruptible+ "HROOTCoreTSystem.h TSystem_Paint" c_tsystem_paint ::+ Ptr RawTSystem -> CString -> IO () -foreign import ccall safe "HROOTCoreTSystem.h TSystem_printObj"- c_tsystem_printobj :: Ptr RawTSystem -> CString -> IO ()+foreign import ccall interruptible+ "HROOTCoreTSystem.h TSystem_printObj" c_tsystem_printobj ::+ Ptr RawTSystem -> CString -> IO () -foreign import ccall safe "HROOTCoreTSystem.h TSystem_SaveAs"- c_tsystem_saveas :: Ptr RawTSystem -> CString -> CString -> IO ()+foreign import ccall interruptible+ "HROOTCoreTSystem.h TSystem_SaveAs" c_tsystem_saveas ::+ Ptr RawTSystem -> CString -> CString -> IO () -foreign import ccall safe "HROOTCoreTSystem.h TSystem_Write"- c_tsystem_write ::+foreign import ccall interruptible+ "HROOTCoreTSystem.h TSystem_Write" c_tsystem_write :: Ptr RawTSystem -> CString -> CInt -> CInt -> IO CInt -foreign import ccall safe "HROOTCoreTSystem.h TSystem_delete"- c_tsystem_delete :: Ptr RawTSystem -> IO ()+foreign import ccall interruptible+ "HROOTCoreTSystem.h TSystem_Write_" c_tsystem_write_ ::+ Ptr RawTSystem -> IO CInt -foreign import ccall safe+foreign import ccall interruptible+ "HROOTCoreTSystem.h TSystem_delete" c_tsystem_delete ::+ Ptr RawTSystem -> IO ()++foreign import ccall interruptible "HROOTCoreTSystem.h TSystem_ProcessEvents" c_tsystem_processevents- :: Ptr RawTSystem -> IO CInt+ :: Ptr RawTSystem -> IO CBool
src/HROOT/Core/TSystem/Implementation.hs view
@@ -1,17 +1,26 @@ {-# LANGUAGE EmptyDataDecls, FlexibleContexts, FlexibleInstances, ForeignFunctionInterface, IncoherentInstances,- MultiParamTypeClasses, OverlappingInstances, TypeFamilies,- TypeSynonymInstances #-}+ MultiParamTypeClasses, OverlappingInstances, TemplateHaskell,+ TypeFamilies, TypeSynonymInstances #-} module HROOT.Core.TSystem.Implementation where-import FFICXX.Runtime.Cast+import Data.Monoid import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr+import Language.Haskell.TH+import Language.Haskell.TH.Syntax import System.IO.Unsafe+import FFICXX.Runtime.Cast+import FFICXX.Runtime.CodeGen.Cxx+import FFICXX.Runtime.TH import HROOT.Core.TSystem.RawType import HROOT.Core.TSystem.FFI import HROOT.Core.TSystem.Interface import HROOT.Core.TSystem.Cast+import HROOT.Core.TSystem.RawType+import HROOT.Core.TSystem.Cast+import HROOT.Core.TSystem.Interface import HROOT.Core.TClass.RawType import HROOT.Core.TClass.Cast import HROOT.Core.TClass.Interface@@ -21,19 +30,20 @@ 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+import STD.Deletable.RawType+import STD.Deletable.Cast+import STD.Deletable.Interface -instance ITSystem TSystem where+instance () => ITSystem (TSystem) where processEvents = xform0 c_tsystem_processevents -instance ITNamed TSystem where+instance () => ITNamed (TSystem) where setName = xform1 c_tsystem_setname setNameTitle = xform2 c_tsystem_setnametitle setTitle = xform1 c_tsystem_settitle -instance ITObject TSystem where+instance () => ITObject (TSystem) where+ clear = xform1 c_tsystem_clear draw = xform1 c_tsystem_draw findObject = xform1 c_tsystem_findobject getName = xform0 c_tsystem_getname@@ -42,6 +52,7 @@ printObj = xform1 c_tsystem_printobj saveAs = xform2 c_tsystem_saveas write = xform3 c_tsystem_write+ write_ = xform0 c_tsystem_write_ -instance IDeletable TSystem where+instance () => IDeletable (TSystem) where delete = xform0 c_tsystem_delete
src/HROOT/Core/TSystem/Interface.hs view
@@ -4,14 +4,15 @@ TypeSynonymInstances #-} module HROOT.Core.TSystem.Interface where import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr import FFICXX.Runtime.Cast import HROOT.Core.TSystem.RawType import HROOT.Core.TNamed.Interface -class ITNamed a => ITSystem a where- processEvents :: a -> IO CInt+class (ITNamed a) => ITSystem a where+ processEvents :: () => a -> IO CBool upcastTSystem :: forall a . (FPtr a, ITSystem a) => a -> TSystem upcastTSystem h
src/HROOT/Core/TSystem/RawType.hs view
@@ -8,9 +8,9 @@ data RawTSystem newtype TSystem = TSystem (Ptr RawTSystem)- deriving (Eq, Ord, Show)+ deriving (Eq, Ord, Show) -instance FPtr TSystem where+instance () => FPtr (TSystem) where type Raw TSystem = RawTSystem get_fptr (TSystem ptr) = ptr cast_fptr_to_obj = TSystem
+ src/HROOT/Core/TVirtualMutex.hs view
@@ -0,0 +1,4 @@+module HROOT.Core.TVirtualMutex (ITVirtualMutex(..)) where+import HROOT.Core.TVirtualMutex.RawType+import HROOT.Core.TVirtualMutex.Interface+import HROOT.Core.TVirtualMutex.Implementation
+ src/HROOT/Core/TVirtualMutex/Cast.hs view
@@ -0,0 +1,9 @@+{-# LANGUAGE FlexibleInstances, FlexibleContexts, TypeFamilies,+ MultiParamTypeClasses, OverlappingInstances, IncoherentInstances+ #-}+module HROOT.Core.TVirtualMutex.Cast where+import Foreign.Ptr+import FFICXX.Runtime.Cast+import System.IO.Unsafe+import HROOT.Core.TVirtualMutex.RawType+import HROOT.Core.TVirtualMutex.Interface
+ src/HROOT/Core/TVirtualMutex/FFI.hsc view
@@ -0,0 +1,8 @@+{-# LANGUAGE ForeignFunctionInterface, InterruptibleFFI #-}+module HROOT.Core.TVirtualMutex.FFI where+import Data.Word+import Data.Int+import Foreign.C+import Foreign.Ptr+import HROOT.Core.TVirtualMutex.RawType+import HROOT.Core.TVirtualMutex.RawType
+ src/HROOT/Core/TVirtualMutex/Implementation.hs view
@@ -0,0 +1,26 @@+{-# LANGUAGE EmptyDataDecls, FlexibleContexts, FlexibleInstances,+ ForeignFunctionInterface, IncoherentInstances,+ MultiParamTypeClasses, OverlappingInstances, TemplateHaskell,+ TypeFamilies, TypeSynonymInstances #-}+module HROOT.Core.TVirtualMutex.Implementation where+import Data.Monoid+import Data.Word+import Data.Int+import Foreign.C+import Foreign.Ptr+import Language.Haskell.TH+import Language.Haskell.TH.Syntax+import System.IO.Unsafe+import FFICXX.Runtime.Cast+import FFICXX.Runtime.CodeGen.Cxx+import FFICXX.Runtime.TH+import HROOT.Core.TVirtualMutex.RawType+import HROOT.Core.TVirtualMutex.FFI+import HROOT.Core.TVirtualMutex.Interface+import HROOT.Core.TVirtualMutex.Cast+import HROOT.Core.TVirtualMutex.RawType+import HROOT.Core.TVirtualMutex.Cast+import HROOT.Core.TVirtualMutex.Interface+import STD.Deletable.RawType+import STD.Deletable.Cast+import STD.Deletable.Interface
+ src/HROOT/Core/TVirtualMutex/Interface.hs view
@@ -0,0 +1,23 @@+{-# LANGUAGE EmptyDataDecls, ExistentialQuantification,+ FlexibleContexts, FlexibleInstances, ForeignFunctionInterface,+ MultiParamTypeClasses, ScopedTypeVariables, TypeFamilies,+ TypeSynonymInstances #-}+module HROOT.Core.TVirtualMutex.Interface where+import Data.Word+import Data.Int+import Foreign.C+import Foreign.Ptr+import FFICXX.Runtime.Cast+import HROOT.Core.TVirtualMutex.RawType+import STD.Deletable.Interface++class (IDeletable a) => ITVirtualMutex a where+ cleanUp :: () => a -> IO CInt+ + factory :: () => a -> CBool -> IO a+ + lock :: () => a -> IO CInt+ + tryLock :: () => a -> IO CInt+ + unLock :: () => a -> IO CInt
+ src/HROOT/Core/TVirtualMutex/RawType.hs view
@@ -0,0 +1,6 @@+{-# LANGUAGE ForeignFunctionInterface, TypeFamilies,+ MultiParamTypeClasses, FlexibleInstances, TypeSynonymInstances,+ EmptyDataDecls, ExistentialQuantification, ScopedTypeVariables #-}+module HROOT.Core.TVirtualMutex.RawType where+import Foreign.Ptr+import FFICXX.Runtime.Cast
src/HROOT/Core/TVirtualPad/Cast.hs view
@@ -8,11 +8,12 @@ import HROOT.Core.TVirtualPad.RawType import HROOT.Core.TVirtualPad.Interface -instance (ITVirtualPad a, FPtr a) => Castable a- (Ptr RawTVirtualPad) where+instance (ITVirtualPad a, FPtr a) =>+ Castable (a) (Ptr RawTVirtualPad)+ where cast x f = f (castPtr (get_fptr x)) uncast x f = f (cast_fptr_to_obj (castPtr x)) -instance Castable TVirtualPad (Ptr RawTVirtualPad) where+instance () => Castable (TVirtualPad) (Ptr RawTVirtualPad) where cast x f = f (castPtr (get_fptr x)) uncast x f = f (cast_fptr_to_obj (castPtr x))
src/HROOT/Core/TVirtualPad/FFI.hsc view
@@ -1,64 +1,183 @@-{-# LANGUAGE ForeignFunctionInterface #-}+{-# LANGUAGE ForeignFunctionInterface, InterruptibleFFI #-} module HROOT.Core.TVirtualPad.FFI where+import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr import HROOT.Core.TVirtualPad.RawType+import HROOT.Core.TVirtualPad.RawType import HROOT.Core.TObject.RawType import HROOT.Core.TClass.RawType -foreign import ccall safe "HROOTCoreTVirtualPad.h TVirtualPad_Draw"- c_tvirtualpad_draw :: Ptr RawTVirtualPad -> CString -> IO ()+foreign import ccall interruptible+ "HROOTCoreTVirtualPad.h TVirtualPad_Clear" c_tvirtualpad_clear ::+ Ptr RawTVirtualPad -> CString -> IO () -foreign import ccall safe+foreign import ccall interruptible+ "HROOTCoreTVirtualPad.h TVirtualPad_Draw" c_tvirtualpad_draw ::+ Ptr RawTVirtualPad -> CString -> IO ()++foreign import ccall interruptible "HROOTCoreTVirtualPad.h TVirtualPad_FindObject" c_tvirtualpad_findobject :: Ptr RawTVirtualPad -> CString -> IO (Ptr RawTObject) -foreign import ccall safe+foreign import ccall interruptible "HROOTCoreTVirtualPad.h TVirtualPad_GetName" c_tvirtualpad_getname :: Ptr RawTVirtualPad -> IO CString -foreign import ccall safe "HROOTCoreTVirtualPad.h TVirtualPad_IsA"- c_tvirtualpad_isa :: Ptr RawTVirtualPad -> IO (Ptr RawTClass)+foreign import ccall interruptible+ "HROOTCoreTVirtualPad.h TVirtualPad_IsA" c_tvirtualpad_isa ::+ Ptr RawTVirtualPad -> IO (Ptr RawTClass) -foreign import ccall safe+foreign import ccall interruptible "HROOTCoreTVirtualPad.h TVirtualPad_Paint" c_tvirtualpad_paint :: Ptr RawTVirtualPad -> CString -> IO () -foreign import ccall safe+foreign import ccall interruptible "HROOTCoreTVirtualPad.h TVirtualPad_printObj" c_tvirtualpad_printobj :: Ptr RawTVirtualPad -> CString -> IO () -foreign import ccall safe+foreign import ccall interruptible "HROOTCoreTVirtualPad.h TVirtualPad_SaveAs" c_tvirtualpad_saveas :: Ptr RawTVirtualPad -> CString -> CString -> IO () -foreign import ccall safe+foreign import ccall interruptible "HROOTCoreTVirtualPad.h TVirtualPad_Write" c_tvirtualpad_write :: Ptr RawTVirtualPad -> CString -> CInt -> CInt -> IO CInt -foreign import ccall safe+foreign import ccall interruptible+ "HROOTCoreTVirtualPad.h TVirtualPad_Write_" c_tvirtualpad_write_ ::+ Ptr RawTVirtualPad -> IO CInt++foreign import ccall interruptible+ "HROOTCoreTVirtualPad.h TVirtualPad_GetLineColor"+ c_tvirtualpad_getlinecolor :: Ptr RawTVirtualPad -> IO CShort++foreign import ccall interruptible+ "HROOTCoreTVirtualPad.h TVirtualPad_GetLineStyle"+ c_tvirtualpad_getlinestyle :: Ptr RawTVirtualPad -> IO CShort++foreign import ccall interruptible+ "HROOTCoreTVirtualPad.h TVirtualPad_GetLineWidth"+ c_tvirtualpad_getlinewidth :: Ptr RawTVirtualPad -> IO CShort++foreign import ccall interruptible+ "HROOTCoreTVirtualPad.h TVirtualPad_ResetAttLine"+ c_tvirtualpad_resetattline ::+ Ptr RawTVirtualPad -> CString -> IO ()++foreign import ccall interruptible+ "HROOTCoreTVirtualPad.h TVirtualPad_SetLineAttributes"+ c_tvirtualpad_setlineattributes :: Ptr RawTVirtualPad -> IO ()++foreign import ccall interruptible+ "HROOTCoreTVirtualPad.h TVirtualPad_SetLineColor"+ c_tvirtualpad_setlinecolor :: Ptr RawTVirtualPad -> CShort -> IO ()++foreign import ccall interruptible+ "HROOTCoreTVirtualPad.h TVirtualPad_SetLineStyle"+ c_tvirtualpad_setlinestyle :: Ptr RawTVirtualPad -> CShort -> IO ()++foreign import ccall interruptible+ "HROOTCoreTVirtualPad.h TVirtualPad_SetLineWidth"+ c_tvirtualpad_setlinewidth :: Ptr RawTVirtualPad -> CShort -> IO ()++foreign import ccall interruptible+ "HROOTCoreTVirtualPad.h TVirtualPad_SetFillColor"+ c_tvirtualpad_setfillcolor :: Ptr RawTVirtualPad -> CInt -> IO ()++foreign import ccall interruptible+ "HROOTCoreTVirtualPad.h TVirtualPad_SetFillStyle"+ c_tvirtualpad_setfillstyle :: Ptr RawTVirtualPad -> CInt -> IO ()++foreign import ccall interruptible+ "HROOTCoreTVirtualPad.h TVirtualPad_ResetAttPad"+ c_tvirtualpad_resetattpad :: Ptr RawTVirtualPad -> CString -> IO ()++foreign import ccall interruptible+ "HROOTCoreTVirtualPad.h TVirtualPad_SetBottomMargin"+ c_tvirtualpad_setbottommargin ::+ Ptr RawTVirtualPad -> CFloat -> IO ()++foreign import ccall interruptible+ "HROOTCoreTVirtualPad.h TVirtualPad_SetLeftMargin"+ c_tvirtualpad_setleftmargin ::+ Ptr RawTVirtualPad -> CFloat -> IO ()++foreign import ccall interruptible+ "HROOTCoreTVirtualPad.h TVirtualPad_SetRightMargin"+ c_tvirtualpad_setrightmargin ::+ Ptr RawTVirtualPad -> CFloat -> IO ()++foreign import ccall interruptible+ "HROOTCoreTVirtualPad.h TVirtualPad_SetTopMargin"+ c_tvirtualpad_settopmargin :: Ptr RawTVirtualPad -> CFloat -> IO ()++foreign import ccall interruptible+ "HROOTCoreTVirtualPad.h TVirtualPad_SetMargin"+ c_tvirtualpad_setmargin ::+ Ptr RawTVirtualPad -> CFloat -> CFloat -> CFloat -> CFloat -> IO ()++foreign import ccall interruptible+ "HROOTCoreTVirtualPad.h TVirtualPad_SetAfile"+ c_tvirtualpad_setafile :: Ptr RawTVirtualPad -> CFloat -> IO ()++foreign import ccall interruptible+ "HROOTCoreTVirtualPad.h TVirtualPad_SetXfile"+ c_tvirtualpad_setxfile :: Ptr RawTVirtualPad -> CFloat -> IO ()++foreign import ccall interruptible+ "HROOTCoreTVirtualPad.h TVirtualPad_SetYfile"+ c_tvirtualpad_setyfile :: Ptr RawTVirtualPad -> CFloat -> IO ()++foreign import ccall interruptible+ "HROOTCoreTVirtualPad.h TVirtualPad_SetAstat"+ c_tvirtualpad_setastat :: Ptr RawTVirtualPad -> CFloat -> IO ()++foreign import ccall interruptible+ "HROOTCoreTVirtualPad.h TVirtualPad_SetXstat"+ c_tvirtualpad_setxstat :: Ptr RawTVirtualPad -> CFloat -> IO ()++foreign import ccall interruptible+ "HROOTCoreTVirtualPad.h TVirtualPad_SetYstat"+ c_tvirtualpad_setystat :: Ptr RawTVirtualPad -> CFloat -> IO ()++foreign import ccall interruptible "HROOTCoreTVirtualPad.h TVirtualPad_delete" c_tvirtualpad_delete :: Ptr RawTVirtualPad -> IO () -foreign import ccall safe "HROOTCoreTVirtualPad.h TVirtualPad_cd"- c_tvirtualpad_cd ::+foreign import ccall interruptible+ "HROOTCoreTVirtualPad.h TVirtualPad_cd" c_tvirtualpad_cd :: Ptr RawTVirtualPad -> CInt -> IO (Ptr RawTVirtualPad) -foreign import ccall safe+foreign import ccall interruptible "HROOTCoreTVirtualPad.h TVirtualPad_divide_tvirtualpad" c_tvirtualpad_divide_tvirtualpad :: Ptr RawTVirtualPad ->- CInt -> CInt -> CDouble -> CDouble -> CInt -> IO ()+ CInt -> CInt -> CFloat -> CFloat -> CInt -> IO () -foreign import ccall safe+foreign import ccall interruptible+ "HROOTCoreTVirtualPad.h TVirtualPad_Modified"+ c_tvirtualpad_modified :: Ptr RawTVirtualPad -> CBool -> IO ()++foreign import ccall interruptible+ "HROOTCoreTVirtualPad.h TVirtualPad_Range" c_tvirtualpad_range ::+ Ptr RawTVirtualPad ->+ CDouble -> CDouble -> CDouble -> CDouble -> IO ()++foreign import ccall interruptible "HROOTCoreTVirtualPad.h TVirtualPad_SetLogx" c_tvirtualpad_setlogx :: Ptr RawTVirtualPad -> CInt -> IO () -foreign import ccall safe+foreign import ccall interruptible "HROOTCoreTVirtualPad.h TVirtualPad_SetLogy" c_tvirtualpad_setlogy :: Ptr RawTVirtualPad -> CInt -> IO () -foreign import ccall safe+foreign import ccall interruptible "HROOTCoreTVirtualPad.h TVirtualPad_SetLogz" c_tvirtualpad_setlogz :: Ptr RawTVirtualPad -> CInt -> IO ()++foreign import ccall interruptible+ "HROOTCoreTVirtualPad.h TVirtualPad_Update" c_tvirtualpad_update ::+ Ptr RawTVirtualPad -> IO ()
src/HROOT/Core/TVirtualPad/Implementation.hs view
@@ -1,35 +1,60 @@ {-# LANGUAGE EmptyDataDecls, FlexibleContexts, FlexibleInstances, ForeignFunctionInterface, IncoherentInstances,- MultiParamTypeClasses, OverlappingInstances, TypeFamilies,- TypeSynonymInstances #-}+ MultiParamTypeClasses, OverlappingInstances, TemplateHaskell,+ TypeFamilies, TypeSynonymInstances #-} module HROOT.Core.TVirtualPad.Implementation where-import FFICXX.Runtime.Cast+import Data.Monoid import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr+import Language.Haskell.TH+import Language.Haskell.TH.Syntax import System.IO.Unsafe+import FFICXX.Runtime.Cast+import FFICXX.Runtime.CodeGen.Cxx+import FFICXX.Runtime.TH import HROOT.Core.TVirtualPad.RawType import HROOT.Core.TVirtualPad.FFI import HROOT.Core.TVirtualPad.Interface import HROOT.Core.TVirtualPad.Cast+import HROOT.Core.TVirtualPad.RawType+import HROOT.Core.TVirtualPad.Cast+import HROOT.Core.TVirtualPad.Interface import HROOT.Core.TClass.RawType import HROOT.Core.TClass.Cast import HROOT.Core.TClass.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+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.TAttPad.RawType+import HROOT.Core.TAttPad.Cast+import HROOT.Core.TAttPad.Interface+import HROOT.Core.TQObject.RawType+import HROOT.Core.TQObject.Cast+import HROOT.Core.TQObject.Interface+import STD.Deletable.RawType+import STD.Deletable.Cast+import STD.Deletable.Interface -instance ITVirtualPad TVirtualPad where+instance () => ITVirtualPad (TVirtualPad) where cd = xform1 c_tvirtualpad_cd divide_tvirtualpad = xform5 c_tvirtualpad_divide_tvirtualpad+ modified = xform1 c_tvirtualpad_modified+ range = xform4 c_tvirtualpad_range setLogx = xform1 c_tvirtualpad_setlogx setLogy = xform1 c_tvirtualpad_setlogy setLogz = xform1 c_tvirtualpad_setlogz+ update = xform0 c_tvirtualpad_update -instance ITObject TVirtualPad where+instance () => ITObject (TVirtualPad) where+ clear = xform1 c_tvirtualpad_clear draw = xform1 c_tvirtualpad_draw findObject = xform1 c_tvirtualpad_findobject getName = xform0 c_tvirtualpad_getname@@ -38,6 +63,37 @@ printObj = xform1 c_tvirtualpad_printobj saveAs = xform2 c_tvirtualpad_saveas write = xform3 c_tvirtualpad_write+ write_ = xform0 c_tvirtualpad_write_ -instance IDeletable TVirtualPad where+instance () => ITAttLine (TVirtualPad) where+ getLineColor = xform0 c_tvirtualpad_getlinecolor+ getLineStyle = xform0 c_tvirtualpad_getlinestyle+ getLineWidth = xform0 c_tvirtualpad_getlinewidth+ resetAttLine = xform1 c_tvirtualpad_resetattline+ setLineAttributes = xform0 c_tvirtualpad_setlineattributes+ setLineColor = xform1 c_tvirtualpad_setlinecolor+ setLineStyle = xform1 c_tvirtualpad_setlinestyle+ setLineWidth = xform1 c_tvirtualpad_setlinewidth++instance () => ITAttFill (TVirtualPad) where+ setFillColor = xform1 c_tvirtualpad_setfillcolor+ setFillStyle = xform1 c_tvirtualpad_setfillstyle++instance () => ITAttPad (TVirtualPad) where+ resetAttPad = xform1 c_tvirtualpad_resetattpad+ setBottomMargin = xform1 c_tvirtualpad_setbottommargin+ setLeftMargin = xform1 c_tvirtualpad_setleftmargin+ setRightMargin = xform1 c_tvirtualpad_setrightmargin+ setTopMargin = xform1 c_tvirtualpad_settopmargin+ setMargin = xform4 c_tvirtualpad_setmargin+ setAfile = xform1 c_tvirtualpad_setafile+ setXfile = xform1 c_tvirtualpad_setxfile+ setYfile = xform1 c_tvirtualpad_setyfile+ setAstat = xform1 c_tvirtualpad_setastat+ setXstat = xform1 c_tvirtualpad_setxstat+ setYstat = xform1 c_tvirtualpad_setystat++instance () => ITQObject (TVirtualPad) where++instance () => IDeletable (TVirtualPad) where delete = xform0 c_tvirtualpad_delete
src/HROOT/Core/TVirtualPad/Interface.hs view
@@ -4,23 +4,37 @@ TypeSynonymInstances #-} module HROOT.Core.TVirtualPad.Interface where import Data.Word+import Data.Int import Foreign.C import Foreign.Ptr import FFICXX.Runtime.Cast import HROOT.Core.TVirtualPad.RawType import HROOT.Core.TObject.Interface+import HROOT.Core.TAttLine.Interface+import HROOT.Core.TAttFill.Interface+import HROOT.Core.TAttPad.Interface+import HROOT.Core.TQObject.Interface -class ITObject a => ITVirtualPad a where- cd :: a -> CInt -> IO a+class (ITObject a, ITAttLine a, ITAttFill a, ITAttPad a,+ ITQObject a) =>+ ITVirtualPad a where+ cd :: () => a -> CInt -> IO a divide_tvirtualpad ::- a -> CInt -> CInt -> CDouble -> CDouble -> CInt -> IO ()+ () => a -> CInt -> CInt -> CFloat -> CFloat -> CInt -> IO () - setLogx :: a -> CInt -> IO ()+ modified :: () => a -> CBool -> IO () - setLogy :: a -> CInt -> IO ()+ range ::+ () => a -> CDouble -> CDouble -> CDouble -> CDouble -> IO () - setLogz :: a -> CInt -> IO ()+ setLogx :: () => a -> CInt -> IO ()+ + setLogy :: () => a -> CInt -> IO ()+ + setLogz :: () => a -> CInt -> IO ()+ + update :: () => a -> IO () upcastTVirtualPad :: forall a . (FPtr a, ITVirtualPad a) => a -> TVirtualPad
src/HROOT/Core/TVirtualPad/RawType.hs view
@@ -8,9 +8,9 @@ data RawTVirtualPad newtype TVirtualPad = TVirtualPad (Ptr RawTVirtualPad)- deriving (Eq, Ord, Show)+ deriving (Eq, Ord, Show) -instance FPtr TVirtualPad where+instance () => FPtr (TVirtualPad) where type Raw TVirtualPad = RawTVirtualPad get_fptr (TVirtualPad ptr) = ptr cast_fptr_to_obj = TVirtualPad
+ src/HROOT/Core/Template.hs view
@@ -0,0 +1,7 @@+{-# LANGUAGE EmptyDataDecls, FlexibleInstances,+ ForeignFunctionInterface, InterruptibleFFI, MultiParamTypeClasses,+ TypeFamilies #-}+module HROOT.Core.Template () where+import Foreign.C.Types+import Foreign.Ptr+import FFICXX.Runtime.Cast