1 // $Id: ui_vars.h,v 1.15 2011/03/07 06:08:53 bobgian Exp $ 2 3 /* 4 * Copyright 2004 Peter Beerli, Mary Kuhner, Jon Yamato and Joseph Felsenstein 5 * 6 * This software is distributed free of charge for non-commercial use 7 * and is copyrighted. Of course, we do not guarantee that the software 8 * works, and are not responsible for any damage you may cause or have. 9 * 10 */ 11 12 #ifndef UI_VARS_H 13 #define UI_VARS_H 14 15 #include "ui_interface.h" 16 #include "ui_vars_chainparams.h" 17 #include "ui_vars_datamodel.h" 18 #include "ui_vars_forces.h" 19 #include "ui_vars_userparams.h" 20 #include "ui_vars_datapackplus.h" 21 #include "ui_vars_traitmodels.h" 22 23 class DataPack; 24 25 using std::string; 26 27 // EWFIX.P5 ENHANCEMENT -- all of the aggregate members of this class have 28 // a variety of Set methods for setting values. However, we're not 29 // actually checking that those are good values in most cases. 30 // we need to create a specialized exception that the menu can 31 // catch and query the user to try again 32 33 // variables that can be changed by the user 34 class UIVars 35 { 36 private: 37 UIVars(); // undefined 38 UIVars& operator=(const UIVars& vars); // undefined 39 UIInterface* ui; 40 41 public: 42 // one might argue that the constructors should have 43 // restricted access since only the UndoRedoChain should 44 // be creating these puppies. 45 UIVars(DataPack& datapack,string fileName,UIInterface* myui); 46 UIVars(const UIVars& vars); 47 virtual ~UIVars(); 48 virtual string GetParamNameWithConstraint(force_type ftpye, long pindex, 49 bool doLongName=true) const; GetUI()50 virtual UIInterface* GetUI() const {return ui;} 51 52 // public members because we want direct access to their 53 // public methods 54 UIVarsChainParameters chains; 55 UIVarsUserParameters userparams; 56 UIVarsDataPackPlus datapackplus; 57 UIVarsDataModels datamodel; 58 UIVarsTraitModels traitmodels; 59 UIVarsForces forces; 60 }; 61 62 #endif // UI_VARS_H 63 64 //____________________________________________________________________________________ 65