packages feed

HROOT-hist-0.8: csrc/HROOTHistTH1K.cpp

#include <MacroPatternMatch.h>

#include "HROOTHistTH1.h"
#include "HROOTCoreTArrayF.h"
#include "TH1K.h"
#include "HROOTHistTH1K.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>) )


TH1_DEF_VIRT(TH1K)
TARRAYF_DEF_VIRT(TH1K)
TOBJECT_DEF_VIRT(TH1K)
TATTLINE_DEF_VIRT(TH1K)
TATTFILL_DEF_VIRT(TH1K)
TATTMARKER_DEF_VIRT(TH1K)
DELETABLE_DEF_VIRT(TH1K)
TARRAY_DEF_VIRT(TH1K)

TH1K_DEF_VIRT(TH1K)

TH1K_DEF_NONVIRT(TH1K)