#ifdef __cplusplus extern "C" { #endif #pragma once #include "HROOT-treeType.h" #include "HROOTCoreTNamed.h" #include "HROOTCoreTAttLine.h" #include "HROOTCoreTAttFill.h" #include "HROOTCoreTAttMarker.h" #include "HROOTCoreTObject.h" #include "STDDeletable.h" #include "HROOT-coreType.h" #define TTREE_DECL_VIRT(Type) \ int Type##_Branch ( Type##_p p, const char* folder, int bufsize, int splitlevel );\ TBranch_p Type##_branch1 ( Type##_p p, const char* name, void* address, const char* leaflist, int bufsize );\ int Type##_fillTree ( Type##_p p ); #define TTREE_DECL_NONVIRT(Type) \ Type##_p Type##_newTTree ( const char* name, const char* title, int splitlevel ); #define TTREE_DECL_ACCESSOR(Type) \ #define TTREE_DEF_VIRT(Type) \ int Type##_Branch ( Type##_p p, const char* folder, int bufsize, int splitlevel ) {\ return ((TYPECASTMETHOD(Type, Branch, TTree))(p))->Branch(folder, bufsize, splitlevel);\ }\ \ TBranch_p Type##_branch1 ( Type##_p p, const char* name, void* address, const char* leaflist, int bufsize ) {\ return from_nonconst_to_nonconst((TBranch*)((TYPECASTMETHOD(Type, branch1, TTree))(p))->Branch(name, address, leaflist, bufsize));\ }\ \ int Type##_fillTree ( Type##_p p ) {\ return ((TYPECASTMETHOD(Type, fillTree, TTree))(p))->Fill();\ } #define TTREE_DEF_NONVIRT(Type) \ Type##_p Type##_newTTree ( const char* name, const char* title, int splitlevel ) {\ Type* newp=new Type(name, title, splitlevel);return from_nonconst_to_nonconst(newp);\ } #define TTREE_DEF_ACCESSOR(Type) \ TNAMED_DECL_VIRT(TTree) TATTLINE_DECL_VIRT(TTree) TATTFILL_DECL_VIRT(TTree) TATTMARKER_DECL_VIRT(TTree) TOBJECT_DECL_VIRT(TTree) DELETABLE_DECL_VIRT(TTree) TTREE_DECL_VIRT(TTree) TTREE_DECL_NONVIRT(TTree) TTREE_DECL_ACCESSOR(TTree) #ifdef __cplusplus } #endif