void hollerith::copyobject_to(base &x) { #ifdef HOLLERITH_COPY_VERBOSE cout << "in hollerith::copyobject_to()\n"; #endif x.freeself(); hollerith & xx = x.change_to_hollerith(); if (s() == NULL) return; xx.init(s()); }
void base::copyobject_to(base &x) { kind k = s_kind(); OBJECTSELF s = self; if (k != BASE) { cout << "error: base::copyobject_to() for object of kind " << kind_ascii(k) << endl; exit(1); } cout << "warning: base::copyobject_to() for object: " << *this << "\n"; x.freeself(); x.c_kind(k); x.self = s; }