This mini-package provides a simple template class, ValuePtr, that can serve as a pointer to an object, with the property that when the ValuePtr is copied, it creates its own copy of the object pointed to as well.
This copy is made using the object's virtual
if such a method exists, or using the copy constructor if not. That
mkae it possible for a ValuePtr that is declared to point to some
base class B but actually is used to point to a derived class D
to make a clone of the full D object rather than its B slice.
Complete documentation may be found at
In the origianl article, this concept was called HolderPtr. We have changed the name to ValuePtr, which is the name now used in Boost and elsewhere.
This package may be obtained from the following sources:
fsgi02.fnal.gov), in directories rooted at /afs/fnal.gov/files/reports/working-groups/fpcltf/ZMtools.
Walter Brown, Module Coordinator
Fermilab Physics Class Library Task Force
Comments, questions about getting started, feature needs, and bug/annoyance reports may be sent to email@example.com or firstname.lastname@example.org.
This class was adapted from an idea presented by H.P. Sutter on the Guru of the Week Solution number 62. It was presented by Marc Paterno. Walter Brown edited the result for conformance to Zoom standards.