Changeset ef81b0
- Timestamp:
- Dec 16, 2009, 2:40:09 PM (15 years ago)
- Branches:
- Action_Thermostats, Add_AtomRandomPerturbation, Add_FitFragmentPartialChargesAction, Add_RotateAroundBondAction, Add_SelectAtomByNameAction, Added_ParseSaveFragmentResults, AddingActions_SaveParseParticleParameters, Adding_Graph_to_ChangeBondActions, Adding_MD_integration_tests, Adding_ParticleName_to_Atom, Adding_StructOpt_integration_tests, AtomFragments, Automaking_mpqc_open, AutomationFragmentation_failures, Candidate_v1.5.4, Candidate_v1.6.0, Candidate_v1.6.1, ChangeBugEmailaddress, ChangingTestPorts, ChemicalSpaceEvaluator, CombiningParticlePotentialParsing, Combining_Subpackages, Debian_Package_split, Debian_package_split_molecuildergui_only, Disabling_MemDebug, Docu_Python_wait, EmpiricalPotential_contain_HomologyGraph, EmpiricalPotential_contain_HomologyGraph_documentation, Enable_parallel_make_install, Enhance_userguide, Enhanced_StructuralOptimization, Enhanced_StructuralOptimization_continued, Example_ManyWaysToTranslateAtom, Exclude_Hydrogens_annealWithBondGraph, FitPartialCharges_GlobalError, Fix_BoundInBox_CenterInBox_MoleculeActions, Fix_ChargeSampling_PBC, Fix_ChronosMutex, Fix_FitPartialCharges, Fix_FitPotential_needs_atomicnumbers, Fix_ForceAnnealing, Fix_IndependentFragmentGrids, Fix_ParseParticles, Fix_ParseParticles_split_forward_backward_Actions, Fix_PopActions, Fix_QtFragmentList_sorted_selection, Fix_Restrictedkeyset_FragmentMolecule, Fix_StatusMsg, Fix_StepWorldTime_single_argument, Fix_Verbose_Codepatterns, Fix_fitting_potentials, Fixes, ForceAnnealing_goodresults, ForceAnnealing_oldresults, ForceAnnealing_tocheck, ForceAnnealing_with_BondGraph, ForceAnnealing_with_BondGraph_continued, ForceAnnealing_with_BondGraph_continued_betteresults, ForceAnnealing_with_BondGraph_contraction-expansion, FragmentAction_writes_AtomFragments, FragmentMolecule_checks_bonddegrees, GeometryObjects, Gui_Fixes, Gui_displays_atomic_force_velocity, ImplicitCharges, IndependentFragmentGrids, IndependentFragmentGrids_IndividualZeroInstances, IndependentFragmentGrids_IntegrationTest, IndependentFragmentGrids_Sole_NN_Calculation, JobMarket_RobustOnKillsSegFaults, JobMarket_StableWorkerPool, JobMarket_unresolvable_hostname_fix, MoreRobust_FragmentAutomation, ODR_violation_mpqc_open, PartialCharges_OrthogonalSummation, PdbParser_setsAtomName, PythonUI_with_named_parameters, QtGui_reactivate_TimeChanged_changes, Recreated_GuiChecks, Rewrite_FitPartialCharges, RotateToPrincipalAxisSystem_UndoRedo, SaturateAtoms_findBestMatching, SaturateAtoms_singleDegree, StoppableMakroAction, Subpackage_CodePatterns, Subpackage_JobMarket, Subpackage_LinearAlgebra, Subpackage_levmar, Subpackage_mpqc_open, Subpackage_vmg, Switchable_LogView, ThirdParty_MPQC_rebuilt_buildsystem, TrajectoryDependenant_MaxOrder, TremoloParser_IncreasedPrecision, TremoloParser_MultipleTimesteps, TremoloParser_setsAtomName, Ubuntu_1604_changes, stable
- Children:
- 68c50b
- Parents:
- f82ac4e
- Location:
- src
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Actions/Action.cpp
rf82ac4e ref81b0 9 9 10 10 Action::Action() 11 { 12 // TODO Auto-generated constructor stub 13 14 } 11 {} 15 12 16 13 Action::~Action() 17 { 18 // TODO Auto-generated destructor stub 19 } 14 {} -
src/Actions/Action.hpp
rf82ac4e ref81b0 9 9 #define ACTION_H_ 10 10 11 /** 12 * Base class for all actions. 13 * 14 * Actions describe something that has to be done. 15 * Actions can be passed around, stored, performed and undone (Command-Pattern). 16 * 17 * TODO: Add queues of actions that have been performed to allow easy implementation of multiple-step undo 18 */ 11 19 class Action 12 20 { -
src/Actions/MethodAction.hpp
rf82ac4e ref81b0 13 13 #include "Actions/Action.hpp" 14 14 15 /** 16 * Wrapper class that allows the construction of Actions from any kind of Method 17 */ 15 18 class MethodAction : public Action 16 19 { … … 23 26 virtual bool canUndo(); 24 27 25 boost::function<void()> executeMethod; 28 boost::function<void()> executeMethod; //!< this stores the method to be called 26 29 27 30 -
src/Menu/ActionMenuItem.hpp
rf82ac4e ref81b0 15 15 class Action; 16 16 17 /** 18 * Produce MenuItems that take an appropriate action when called. 19 */ 17 20 class ActionMenuItem : public MenuItem 18 21 { … … 24 27 25 28 private: 26 Action* action; 29 Action* action; //!< this action will be called when the trigger matches 27 30 }; 28 31 -
src/Menu/DisplayMenuItem.hpp
rf82ac4e ref81b0 14 14 class StringView; 15 15 16 /** 17 * Display any kind of StringView within a Menu 18 * 19 * Any trigger are ignored for this type of Item 20 */ 16 21 class DisplayMenuItem : public MenuItem 17 22 { -
src/Menu/Menu.hpp
rf82ac4e ref81b0 13 13 class MenuItem; 14 14 15 /** 16 * Base class for all Types of menus 17 * contains basic abstract functionality to add Items, remove Items and display the menu 18 * 19 * TODO: Make sure all items are only added once. 20 */ 15 21 class Menu 16 22 { … … 19 25 virtual ~Menu(); 20 26 27 28 /** 29 * Adding and removing should be handled by the items. 30 */ 21 31 virtual void addItem(MenuItem*)=0; 32 /** 33 * Adding and removing should be handled by the items. 34 */ 22 35 virtual void removeItem(MenuItem*)=0; 23 36 virtual void display()=0; -
src/Menu/MenuItem.cpp
rf82ac4e ref81b0 13 13 #include <iostream> 14 14 15 /** 16 * produce a new MenuItem using with a description and a trigger. 17 * The MenuItem is then added to the menu passed to it. 18 */ 15 19 MenuItem::MenuItem(char _trigger, const char* _description,Menu* menu) : 16 20 trigger(_trigger), … … 26 30 } 27 31 32 /** 33 * check if the trigger matches and call doTrigger if it does. 34 */ 28 35 void MenuItem::checkTrigger(char key) { 29 36 if(key == trigger) … … 39 46 } 40 47 48 /** 49 * Produce a formated output of this item containing trigger and description 50 * Normal format is: "<trigger> - <description>" 51 */ 41 52 const string MenuItem::formatEntry(){ 42 53 stringstream s; … … 46 57 } 47 58 59 60 /** 61 * check if this item is within a menu and add to menu if it is not yet contained anywhere 62 * 63 * TODO: include funtionality to move Items from one menu to another 64 */ 48 65 void MenuItem::add_to_menu(Menu* menu) { 49 66 if(!wasAdded()) { -
src/Menu/MenuItem.hpp
rf82ac4e ref81b0 15 15 class Menu; 16 16 17 /** 18 * Base class for all kinds of MenuItems 19 * 20 * This class takes care of checking the triggers and performing appropriate actions. 21 */ 17 22 class MenuItem { 18 23 private: -
src/Menu/SeperatorItem.hpp
rf82ac4e ref81b0 11 11 #include "Menu/MenuItem.hpp" 12 12 13 /** 14 * Produce a Seperator within a Menu. 15 * 16 * All triggers are ignored for this Item. 17 */ 13 18 class SeperatorItem : public MenuItem 14 19 { -
src/Menu/TextMenu.cpp
rf82ac4e ref81b0 9 9 #include <iostream> 10 10 #include <cmath> 11 #include "defs.hpp"12 11 #include "Menu/TextMenu.hpp" 13 12 #include "Menu/MenuItem.hpp" 14 13 14 15 /** 16 * produce a text menu with a given title. 17 * The text will later be displayed using the stream passed to the constructor. 18 */ 15 19 TextMenu::TextMenu(ostream& _outputter, string _title, char _spacer,int _length) : 16 20 outputter(_outputter), … … 18 22 spacer(_spacer), 19 23 length(_length), 20 quit(false)21 {22 }23 24 TextMenu::TextMenu(ostream& _outputter, string _title) :25 outputter(_outputter),26 title(_title),27 spacer(STD_MENU_TITLE_SPACER),28 length(STD_MENU_LENGTH),29 24 quit(false) 30 25 { -
src/Menu/TextMenu.hpp
rf82ac4e ref81b0 14 14 15 15 #include "Menu/Menu.hpp" 16 #include "defs.hpp" 16 17 17 18 class MenuItem; 18 19 20 /** 21 * Used to produce any kind of text menu 22 * 23 * All Items are displayed and user is prompted for a key. The item corresponding to that key is then activated. 24 */ 19 25 class TextMenu : public Menu 20 26 { 21 27 public: 22 TextMenu(ostream&,string,char,int); 23 TextMenu(ostream&,string); 28 TextMenu(ostream& _outputter, string _title, char _spacer=STD_MENU_TITLE_SPACER,int _length=STD_MENU_LENGTH); 24 29 virtual ~TextMenu(); 25 30 … … 28 33 virtual void display(); 29 34 35 /** 36 * Call doQuit if you want to return from this menu. 37 */ 30 38 virtual void doQuit(); 39 /** 40 * Check wether someone has chosen to quit 41 */ 31 42 virtual bool hasQuit(); 32 43 -
src/Views/MethodStringView.hpp
rf82ac4e ref81b0 13 13 #include "Views/StringView.hpp" 14 14 15 /** 16 * Wrapper to produce a StringView from any method that returns a String. 17 */ 15 18 class MethodStringView : public StringView 16 19 { -
src/Views/StreamStringView.hpp
rf82ac4e ref81b0 13 13 #include "Views/StringView.hpp" 14 14 15 /** 16 * Wrapper to produce a StringView from any method that uses a stream to display something. 17 * 18 * The function is called with a stringstream which then is turned into a string later. 19 * 20 * Caveat: Make sure the stream passed to the method is actually used. Some methods seem to use a stream parameter for 21 * legacy reasons. These methods internally use the "Log() << Verbose()" mechanism instead of the stream. 22 */ 15 23 class StreamStringView : public StringView 16 24 { -
src/Views/StringView.hpp
rf82ac4e ref81b0 14 14 using namespace std; 15 15 16 /** 17 * View to show something as a string 18 * 19 * This View is used by calling the toString method. 20 * This View does *not* use the observer pattern. 21 */ 16 22 class StringView : public View 17 23 { -
src/Views/View.hpp
rf82ac4e ref81b0 9 9 #define VIEW_H_ 10 10 11 /** 12 * Base class for all Views 13 * 14 * TODO: is this really needed or helpfull at all? 15 */ 11 16 class View 12 17 {
Note:
See TracChangeset
for help on using the changeset viewer.