#ifdef __cplusplus extern "C" { #endif #pragma once #include "HROOT-histType.h" #include "HROOTCoreTNamed.h" #include "HROOTCoreTAttAxis.h" #include "HROOTCoreTObject.h" #include "STDDeletable.h" #include "HROOT-coreType.h" #define TAXIS_DECL_VIRT(Type) \ int Type##_findBinTAxis ( Type##_p p, double x );\ int Type##_findFixBinTAxis ( Type##_p p, double x );\ double Type##_getBinCenterTAxis ( Type##_p p, int bin );\ double Type##_GetBinCenterLog ( Type##_p p, int bin );\ double Type##_GetBinUpEdge ( Type##_p p, int bin );\ void Type##_SetLimits ( Type##_p p, double xmin, double xmax );\ void Type##_SetTimeDisplay ( Type##_p p, int value );\ void Type##_SetTimeFormat ( Type##_p p, const char* format );\ void Type##_SetTimeOffset ( Type##_p p, double toffset, const char* option ); #define TAXIS_DECL_NONVIRT(Type) \ Type##_p Type##_newTAxis ( int nbins, double xmin, double xmax );\ bool Type##_tAxis_GetCenterLabels ( Type##_p p );\ bool Type##_tAxis_GetCenterTitle ( Type##_p p );\ int Type##_tAxis_GetFirst ( Type##_p p );\ int Type##_tAxis_GetLast ( Type##_p p );\ int Type##_tAxis_GetNbins ( Type##_p p );\ TArrayD_p Type##_tAxis_GetXbins ( Type##_p p );\ double Type##_tAxis_GetXmax ( Type##_p p );\ double Type##_tAxis_GetXmin ( Type##_p p ); #define TAXIS_DECL_ACCESSOR(Type) \ #define TAXIS_DEF_VIRT(Type) \ int Type##_findBinTAxis ( Type##_p p, double x ) {\ return ((TYPECASTMETHOD(Type, findBinTAxis, TAxis))(p))->FindBin(x);\ }\ \ int Type##_findFixBinTAxis ( Type##_p p, double x ) {\ return ((TYPECASTMETHOD(Type, findFixBinTAxis, TAxis))(p))->FindFixBin(x);\ }\ \ double Type##_getBinCenterTAxis ( Type##_p p, int bin ) {\ return ((TYPECASTMETHOD(Type, getBinCenterTAxis, TAxis))(p))->GetBinCenter(bin);\ }\ \ double Type##_GetBinCenterLog ( Type##_p p, int bin ) {\ return ((TYPECASTMETHOD(Type, GetBinCenterLog, TAxis))(p))->GetBinCenterLog(bin);\ }\ \ double Type##_GetBinUpEdge ( Type##_p p, int bin ) {\ return ((TYPECASTMETHOD(Type, GetBinUpEdge, TAxis))(p))->GetBinUpEdge(bin);\ }\ \ void Type##_SetLimits ( Type##_p p, double xmin, double xmax ) {\ ((TYPECASTMETHOD(Type, SetLimits, TAxis))(p))->SetLimits(xmin, xmax);\ }\ \ void Type##_SetTimeDisplay ( Type##_p p, int value ) {\ ((TYPECASTMETHOD(Type, SetTimeDisplay, TAxis))(p))->SetTimeDisplay(value);\ }\ \ void Type##_SetTimeFormat ( Type##_p p, const char* format ) {\ ((TYPECASTMETHOD(Type, SetTimeFormat, TAxis))(p))->SetTimeFormat(format);\ }\ \ void Type##_SetTimeOffset ( Type##_p p, double toffset, const char* option ) {\ ((TYPECASTMETHOD(Type, SetTimeOffset, TAxis))(p))->SetTimeOffset(toffset, option);\ } #define TAXIS_DEF_NONVIRT(Type) \ Type##_p Type##_newTAxis ( int nbins, double xmin, double xmax ) {\ Type* newp=new Type(nbins, xmin, xmax);return from_nonconst_to_nonconst(newp);\ }\ \ bool Type##_tAxis_GetCenterLabels ( Type##_p p ) {\ return ((TYPECASTMETHOD(Type, tAxis_GetCenterLabels, TAxis))(p))->GetCenterLabels();\ }\ \ bool Type##_tAxis_GetCenterTitle ( Type##_p p ) {\ return ((TYPECASTMETHOD(Type, tAxis_GetCenterTitle, TAxis))(p))->GetCenterTitle();\ }\ \ int Type##_tAxis_GetFirst ( Type##_p p ) {\ return ((TYPECASTMETHOD(Type, tAxis_GetFirst, TAxis))(p))->GetFirst();\ }\ \ int Type##_tAxis_GetLast ( Type##_p p ) {\ return ((TYPECASTMETHOD(Type, tAxis_GetLast, TAxis))(p))->GetLast();\ }\ \ int Type##_tAxis_GetNbins ( Type##_p p ) {\ return ((TYPECASTMETHOD(Type, tAxis_GetNbins, TAxis))(p))->GetNbins();\ }\ \ TArrayD_p Type##_tAxis_GetXbins ( Type##_p p ) {\ return from_nonconst_to_nonconst((TArrayD*)((TYPECASTMETHOD(Type, tAxis_GetXbins, TAxis))(p))->GetXbins());\ }\ \ double Type##_tAxis_GetXmax ( Type##_p p ) {\ return ((TYPECASTMETHOD(Type, tAxis_GetXmax, TAxis))(p))->GetXmax();\ }\ \ double Type##_tAxis_GetXmin ( Type##_p p ) {\ return ((TYPECASTMETHOD(Type, tAxis_GetXmin, TAxis))(p))->GetXmin();\ } #define TAXIS_DEF_ACCESSOR(Type) \ TNAMED_DECL_VIRT(TAxis) TATTAXIS_DECL_VIRT(TAxis) TOBJECT_DECL_VIRT(TAxis) DELETABLE_DECL_VIRT(TAxis) TAXIS_DECL_VIRT(TAxis) TAXIS_DECL_NONVIRT(TAxis) TAXIS_DECL_ACCESSOR(TAxis) #ifdef __cplusplus } #endif