/* * Project: MoleCuilder * Description: creates and alters molecular systems * Copyright (C) 2010 University of Bonn. All rights reserved. * Please see the LICENSE file or "Copyright notice" in builder.cpp for details. */ /** * \file actions.dox * * Created on: Oct 28, 2011 * Author: heber */ /** \page actions Actions * * Actions are Command patterns (http://en.wikipedia.org/wiki/Command_pattern) * to allow for undoing and redoing. Each specific Action derives from this * class to implement a certain functionality. There is a lot of preprocessor * magic implemented for making this as easy as possible. In effect you only * have to create three files of which only one actually contains more than a * few lines, namely the code of the Action itself. * * Each Action has thus three types of functionalty: do, undo, and redo. * * The ActionRegistry contains a prototype of each Action under its token * such that an instance can be retrieved by knowing this token. * * Each Action obtains its parameter from a central ValueStorage such that * they are independent of where the parameter originated from: a command line * parameter, a value entered in a graphical dialog or given via the keyboard * in a terminal. That's why each begins with a function call to * getParametersfromValueStorage() to fill its internal Action::params * structure. * * Also there is a regression test (\ref regression-test) for each Action to * check that it always behaves the same no matter how much the code * implementing actually has changed. * * \section actions-add To add a new action ... * * The following steps have to be done for adding a new action: * -# Create three new files .cpp, .def, and .hpp * -# Add the files to \b src/Actions/Makefile.am. * -# Add the name of the Action to \b src/Actions/GlobalListOfActions.hpp * such that the ActionRegistry knows about it and can instantiate a * prototype. * * * \date 2011-10-31 * */