packages feed

HROOT-io-0.8: csrc/HROOTIOTDirectoryFile.cpp

#include <MacroPatternMatch.h>

#include "HROOTCoreTDirectory.h"
#include "TDirectoryFile.h"
#include "HROOTIOTDirectoryFile.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>) )


TDIRECTORY_DEF_VIRT(TDirectoryFile)
TNAMED_DEF_VIRT(TDirectoryFile)
TOBJECT_DEF_VIRT(TDirectoryFile)
DELETABLE_DEF_VIRT(TDirectoryFile)

TDIRECTORYFILE_DEF_VIRT(TDirectoryFile)

TDIRECTORYFILE_DEF_NONVIRT(TDirectoryFile)