packages feed

HROOT-hist-0.8: csrc/HROOTHistTH3I.cpp

#include <MacroPatternMatch.h>

#include "HROOTHistTH3.h"
#include "HROOTCoreTArrayI.h"
#include "TH3I.h"
#include "HROOTHistTH3I.h"

using namespace std;


template<class ToType, class FromType>
const ToType* to_const(const FromType* x) {
  return reinterpret_cast<const ToType*>(x);
}

template<class ToType, class FromType>
ToType* to_nonconst(FromType* x) {
  return reinterpret_cast<ToType*>(x);
}

template<class ToType, class FromType>
const ToType& to_constref(const FromType& x) {
  return reinterpret_cast<const ToType&>(x);
}

template<class ToType, class FromType>
ToType& to_nonconstref(FromType& x) {
  return reinterpret_cast<ToType&>(x);
}


#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>) )

#define IS_TH3I_fill1_PROTECTED ()
#define IS_TH3I_fill1w_PROTECTED ()

TH3_DEF_VIRT(TH3I)
TARRAYI_DEF_VIRT(TH3I)
TH1_DEF_VIRT(TH3I)
TATT3D_DEF_VIRT(TH3I)
TOBJECT_DEF_VIRT(TH3I)
TATTLINE_DEF_VIRT(TH3I)
TATTFILL_DEF_VIRT(TH3I)
TATTMARKER_DEF_VIRT(TH3I)
DELETABLE_DEF_VIRT(TH3I)
TARRAY_DEF_VIRT(TH3I)

TH3I_DEF_VIRT(TH3I)

TH3I_DEF_NONVIRT(TH3I)