43#include "CLHEP/Matrix/defs.h"
63 destroy(stack[bottom]);
65 delete [] stack[bottom];
71 HepPile(
void (*
f)(T)=0): top(0), bottom(0) { destroy_fun =
f;}
81 destroy(stack[bottom]);
83 delete [] stack[bottom];
88 bool is_empty()
const {
return top == bottom ?true :
false;}
93 std::cerr <<
"Attempt to pop empty pile.\n--- Exiting to system."
105 void (*destroy_fun)(T);
106 void next(
int *n)
const {
if (++(*n) >= sz+1) *n = 0;}
107 void previous(
int *n)
const {
if (--(*n) < 0) *
n = sz;}
108 void destroy(T t) {
if (destroy_fun) (*destroy_fun)(t); }
113#ifdef ENABLE_BACKWARDS_COMPATIBILITY
115using namespace CLHEP;
void set_destroy(void(*f)(T))