- Implementing a history
- Posted by Bryan Ray on May 13th, 2004
Hi,
Does anyone have any URLs that would help me out implementing a
history. Specificaly I am intrested in making a full history for a
collection of properties in an object - so that the object can be taken
back x modifications or back to a specific time. The properties would be
optional (can be removed).
My ideas so far are to have an action object that stores the time of the
modification, and the modification type (addition, removal,
modification). The addition action stores the property. All the actions
are held in a collection in the object.
Can anyone recommend a better approach? Cheers
Bry
- Posted by goose on May 14th, 2004
Bryan Ray wrote:
The easiest is to use a stack of some sort. C++ has readymade
templates for this.
cheers
goose,
- Posted by David on May 14th, 2004
On Thu, 13 May 2004 17:23:30 UTC, Bryan Ray <bryan@nospam.com> wrote:
I have a couple products at work that have rather involved configurations.
Multiple things are changed at once and it was required to find a way to
back out changes at times. The configuration abstraction already had
load/save operations. We implemented named load/save to operate on files
in addition to the usual configuration. The product is shipped with
several predefined configurations ranging from minimal operation and
failsafe (oldest) to recommended (current). If sales engineering was
involved several additional customizations are made. Classes are then
taught for the new users and admins. Its easy to see back out changes
when desired. Automated backups occur when changes are made. These
are dated and could have a customized description if so desired.
We've also added debug configurations that can be activated and
removed as needed. It generally works well for the customer and
our support teams.
David