Changes between Version 3 and Version 4 of ExampleSpatialTranslation


Ignore:
Timestamp:
Oct 14, 2010, 9:09:03 AM (14 years ago)
Author:
FrederikHeber
Comment:

MapOfActions file linked

Legend:

Unmodified
Added
Removed
Modified
  • ExampleSpatialTranslation

    v3 v4  
    2929
    3030 1. Now, there is an action class called [source:src/Actions/MoleculeAction/TranslateAction.cpp MoleculeTranslateAction]. It has a unique(!) '''NAME'''. An Action is nothing but a class containing some data and a performCall() member function wherein the specific doing of the action is coded.
    31  1. All actions are instantiated in the so-called !MapOfActions by its member function [source:src/Actions/MapOfActions.cpp populateActions()], hence also the !MoleculeTranslateAction(). Thereby, its '''NAME''' and the pointer to its instance is placed in an [source:src/Actions/ActionRegistry.cpp ActionRegistry], which is a singleton, can be called from anywhere and asked for the instance of a specific action when knowing its name. In this registry the instantiated actions are simply sitting there and waiting to be called forth to do something.
     31 1. All actions are instantiated in the so-called [source:src/Actions/MapOfActions.cpp MapOfActions] by its member function [source:src/Actions/MapOfActions.cpp populateActions()], hence also the !MoleculeTranslateAction(). Thereby, its '''NAME''' and the pointer to its instance is placed in an [source:src/Actions/ActionRegistry.cpp ActionRegistry], which is a singleton, can be called from anywhere and asked for the instance of a specific action when knowing its name. In this registry the instantiated actions are simply sitting there and waiting to be called forth to do something.
    3232 1. Moreover, the !MapOfActions has lists about which Action belongs to which menu, a short description, what the short form for the command-option is (the long form is always --NAME), what type its parameter has (if any) and also default values (also if any). This information is used by the [source:src/CommandLineParser.cpp CommandLineParser] to fill in the [[http://www.boost.org/doc/libs/1_43_0/doc/html/program_options.html boost::program_options]] with the necessary details to parse all command line arguments into a map for later retrieval.
    3333 1. See the [source:src/builder.cpp main() function] for an overview what has happened so far and happens now: The !CommandLineParser was set, it has parsed all command line arguments and has also noted down their specific ordering on the command line in CommandLineParser::!SequenceOfActions. Now, the !MainWindow is called. This is the central instance of any user interface (whether textmenu, commandline or graphical) to wait for user interaction.