Changes in / [9cf88c:82b71a]


Ignore:
Files:
20 added
23 edited

Legend:

Unmodified
Added
Removed
  • configure.ac

    r9cf88c r82b71a  
    3434#AX_BOOST_PROGRAM_OPTIONS
    3535#AX_BOOST_SERIALIZATION
     36
     37#QT4 libraries
     38gw_CHECK_QT4
     39AX_CHECK_GLU
     40AC_MSG_NOTICE(["GLU_CFLAGS: $GLU_CFLAGS, GLU_CXXFLAGS: $GLU_CXXFLAGS, GLU_LDFLAGS: $GLU_LDFLAGS, GLU_LIBS: $GLU_LIBS"])
     41
    3642
    3743# Checks for header files.
  • doc/class structure.uxf

    r9cf88c r82b71a  
    2121
    2222
    23 // This text will be stored with each diagram;  use it for notes.</help_text><zoom_level>7</zoom_level><element><type>com.umlet.element.base.Class</type><coordinates><x>1855</x><y>294</y><w>147</w><h>70</h></coordinates><panel_attributes>AtomInfo
     23// This text will be stored with each diagram;  use it for notes.</help_text><zoom_level>7</zoom_level><element><type>com.umlet.element.base.Class</type><coordinates><x>1855</x><y>210</y><w>147</w><h>70</h></coordinates><panel_attributes>AtomInfo
    2424--
    2525-x,v,F: Vector
     
    2828#AtomInfo();
    2929#~AtomInfo();
    30 </panel_attributes><additional_attributes></additional_attributes></element><element><type>com.umlet.element.base.Relation</type><coordinates><x>1645</x><y>315</y><w>223</w><h>34</h></coordinates><panel_attributes>lt=&lt;&lt;&lt;&lt;-</panel_attributes><additional_attributes>210;21;21;21</additional_attributes></element><element><type>com.umlet.element.base.Class</type><coordinates><x>1274</x><y>147</y><w>392</w><h>259</h></coordinates><panel_attributes>Element
     30</panel_attributes><additional_attributes></additional_attributes></element><element><type>com.umlet.element.base.Relation</type><coordinates><x>1645</x><y>231</y><w>223</w><h>34</h></coordinates><panel_attributes>lt=&lt;&lt;&lt;&lt;-</panel_attributes><additional_attributes>210;21;21;21</additional_attributes></element><element><type>com.umlet.element.base.Class</type><coordinates><x>1274</x><y>63</y><w>392</w><h>259</h></coordinates><panel_attributes>Element
    3131--
    3232mass: double
     
    4949#~element();
    5050#Output(ofstream * const out) const: bool
    51 #Checkout(ofstream * const out, const int No, const int NoOfAtoms) const: bool</panel_attributes><additional_attributes></additional_attributes></element><element><type>com.umlet.element.base.Class</type><coordinates><x>1960</x><y>532</y><w>280</w><h>161</h></coordinates><panel_attributes>BondedParticle
     51#Checkout(ofstream * const out, const int No, const int NoOfAtoms) const: bool</panel_attributes><additional_attributes></additional_attributes></element><element><type>com.umlet.element.base.Class</type><coordinates><x>1960</x><y>448</y><w>280</w><h>161</h></coordinates><panel_attributes>BondedParticle
    5252--
    5353--
     
    6363#OutputBondOfAtom() const
    6464#OutputAdjacency(ofstream *AdjacencyFile) const
    65 #OutputOrder(ofstream *file) const</panel_attributes><additional_attributes></additional_attributes></element><element><type>com.umlet.element.base.Relation</type><coordinates><x>2184</x><y>343</y><w>258</w><h>202</h></coordinates><panel_attributes>lt=&lt;&lt;-</panel_attributes><additional_attributes>245;21;245;154;21;154;21;189</additional_attributes></element><element><type>com.umlet.element.base.Relation</type><coordinates><x>1925</x><y>343</y><w>293</w><h>202</h></coordinates><panel_attributes>lt=&lt;&lt;-
    66 </panel_attributes><additional_attributes>21;21;21;154;280;154;280;189</additional_attributes></element><element><type>com.umlet.element.base.Relation</type><coordinates><x>2184</x><y>343</y><w>34</w><h>202</h></coordinates><panel_attributes>lt=&lt;&lt;-</panel_attributes><additional_attributes>21;21;21;189</additional_attributes></element><element><type>com.umlet.element.base.Class</type><coordinates><x>2359</x><y>294</y><w>147</w><h>70</h></coordinates><panel_attributes>BondedParticleInfo
     65#OutputOrder(ofstream *file) const</panel_attributes><additional_attributes></additional_attributes></element><element><type>com.umlet.element.base.Relation</type><coordinates><x>2184</x><y>259</y><w>258</w><h>202</h></coordinates><panel_attributes>lt=&lt;&lt;-</panel_attributes><additional_attributes>245;21;245;154;21;154;21;189</additional_attributes></element><element><type>com.umlet.element.base.Relation</type><coordinates><x>1925</x><y>259</y><w>293</w><h>202</h></coordinates><panel_attributes>lt=&lt;&lt;-
     66</panel_attributes><additional_attributes>21;21;21;154;280;154;280;189</additional_attributes></element><element><type>com.umlet.element.base.Relation</type><coordinates><x>2184</x><y>259</y><w>34</w><h>202</h></coordinates><panel_attributes>lt=&lt;&lt;-</panel_attributes><additional_attributes>21;21;21;189</additional_attributes></element><element><type>com.umlet.element.base.Class</type><coordinates><x>2359</x><y>210</y><w>147</w><h>70</h></coordinates><panel_attributes>BondedParticleInfo
    6767--
    6868AdaptiveOrder: unsigned char
     
    7171#BondedParticleInfo()
    7272#~BondedParticleInfo()
    73 </panel_attributes><additional_attributes></additional_attributes></element><element><type>com.umlet.element.base.Class</type><coordinates><x>2079</x><y>280</y><w>217</w><h>84</h></coordinates><panel_attributes>ParticleInfo
     73</panel_attributes><additional_attributes></additional_attributes></element><element><type>com.umlet.element.base.Class</type><coordinates><x>2079</x><y>196</y><w>217</w><h>84</h></coordinates><panel_attributes>ParticleInfo
    7474--
    7575nr: int
     
    7979#~ParticleInfo()
    8080#ostream &amp; operator &lt;&lt; (ostream &amp;ost) const
    81 </panel_attributes><additional_attributes></additional_attributes></element><element><type>com.umlet.element.base.Relation</type><coordinates><x>2485</x><y>315</y><w>174</w><h>34</h></coordinates><panel_attributes>lt=&lt;&lt;&lt;&lt;-</panel_attributes><additional_attributes>21;21;161;21</additional_attributes></element><element><type>com.umlet.element.base.Class</type><coordinates><x>2646</x><y>245</y><w>147</w><h>133</h></coordinates><panel_attributes>BondList
     81</panel_attributes><additional_attributes></additional_attributes></element><element><type>com.umlet.element.base.Relation</type><coordinates><x>2485</x><y>231</y><w>174</w><h>34</h></coordinates><panel_attributes>lt=&lt;&lt;&lt;&lt;-</panel_attributes><additional_attributes>21;21;161;21</additional_attributes></element><element><type>com.umlet.element.base.Class</type><coordinates><x>2646</x><y>161</y><w>147</w><h>133</h></coordinates><panel_attributes>BondList
    8282{Some Properties}
    8383--
     
    9090Responsibilities
    9191-- Resp1
    92 *-- Resp2*</panel_attributes><additional_attributes></additional_attributes></element><element><type>com.umlet.element.base.Class</type><coordinates><x>1372</x><y>427</y><w>147</w><h>105</h></coordinates><panel_attributes>GraphNodeInfo
     92*-- Resp2*</panel_attributes><additional_attributes></additional_attributes></element><element><type>com.umlet.element.base.Class</type><coordinates><x>1372</x><y>343</y><w>147</w><h>105</h></coordinates><panel_attributes>GraphNodeInfo
    9393--
    9494--
     
    102102#GraphNodeInfo()
    103103#~GraphNodeInfo()
    104 </panel_attributes><additional_attributes></additional_attributes></element><element><type>com.umlet.element.base.Class</type><coordinates><x>1484</x><y>609</y><w>126</w><h>70</h></coordinates><panel_attributes>GraphNode
     104</panel_attributes><additional_attributes></additional_attributes></element><element><type>com.umlet.element.base.Class</type><coordinates><x>1484</x><y>525</y><w>126</w><h>70</h></coordinates><panel_attributes>GraphNode
    105105--
    106106--
     
    109109#OutputGraphInfo() const
    110110#OutputComponentNumber() const
    111 </panel_attributes><additional_attributes></additional_attributes></element><element><type>com.umlet.element.base.Relation</type><coordinates><x>1484</x><y>343</y><w>748</w><h>279</h></coordinates><panel_attributes>lt=&lt;&lt;-</panel_attributes><additional_attributes>735;21;735;70;217;70;217;210;21;210;21;266</additional_attributes></element><element><type>com.umlet.element.base.Relation</type><coordinates><x>1484</x><y>511</y><w>34</w><h>111</h></coordinates><panel_attributes>lt=&lt;&lt;-</panel_attributes><additional_attributes>21;21;21;98</additional_attributes></element><element><type>com.umlet.element.base.Class</type><coordinates><x>1288</x><y>756</y><w>588</w><h>245</h></coordinates><panel_attributes>Atom
     111</panel_attributes><additional_attributes></additional_attributes></element><element><type>com.umlet.element.base.Relation</type><coordinates><x>1484</x><y>259</y><w>748</w><h>279</h></coordinates><panel_attributes>lt=&lt;&lt;-</panel_attributes><additional_attributes>735;21;735;70;217;70;217;210;21;210;21;266</additional_attributes></element><element><type>com.umlet.element.base.Relation</type><coordinates><x>1484</x><y>427</y><w>34</w><h>111</h></coordinates><panel_attributes>lt=&lt;&lt;-</panel_attributes><additional_attributes>21;21;21;98</additional_attributes></element><element><type>com.umlet.element.base.Class</type><coordinates><x>1288</x><y>672</y><w>588</w><h>245</h></coordinates><panel_attributes>Atom
    112112--
    113113sort: int*
     
    129129#DistanceToVector(const Vector &amp;origin) const: double
    130130#DistanceSquaredToVector(const Vector &amp;origin) const: double
    131 #IsInParallelepiped(const Vector offset, const double *parallelepiped) const: bool</panel_attributes><additional_attributes></additional_attributes></element><element><type>com.umlet.element.base.Relation</type><coordinates><x>1379</x><y>511</y><w>83</w><h>258</h></coordinates><panel_attributes>lt=&lt;&lt;&lt;&lt;-</panel_attributes><additional_attributes>21;21;21;182;70;182;70;245</additional_attributes></element><element><type>com.umlet.element.base.Class</type><coordinates><x>2226</x><y>749</y><w>504</w><h>210</h></coordinates><panel_attributes>TrajectoryParticle
     131#IsInParallelepiped(const Vector offset, const double *parallelepiped) const: bool</panel_attributes><additional_attributes></additional_attributes></element><element><type>com.umlet.element.base.Relation</type><coordinates><x>1379</x><y>427</y><w>83</w><h>258</h></coordinates><panel_attributes>lt=&lt;&lt;&lt;&lt;-</panel_attributes><additional_attributes>21;21;21;182;70;182;70;245</additional_attributes></element><element><type>com.umlet.element.base.Class</type><coordinates><x>2226</x><y>665</y><w>504</w><h>210</h></coordinates><panel_attributes>TrajectoryParticle
    132132--
    133133--
     
    147147#Thermostat_Berendsen(int Step, double ScaleTempFactor, double *ekin, config *configuration)
    148148#Thermostat_NoseHoover_init(int Step, double *delta_alpha)
    149 #Thermostat_NoseHoover_scale(int Step, double *ekin, config *configuration)</panel_attributes><additional_attributes></additional_attributes></element><element><type>com.umlet.element.base.Relation</type><coordinates><x>2149</x><y>343</y><w>209</w><h>419</h></coordinates><panel_attributes>lt=&lt;&lt;-</panel_attributes><additional_attributes>21;21;21;112;196;112;196;406</additional_attributes></element><element><type>com.umlet.element.base.Relation</type><coordinates><x>1967</x><y>343</y><w>391</w><h>419</h></coordinates><panel_attributes>lt=&lt;&lt;-</panel_attributes><additional_attributes>21;21;21;112;378;112;378;406</additional_attributes></element><element><type>com.umlet.element.base.Class</type><coordinates><x>1617</x><y>574</y><w>203</w><h>70</h></coordinates><panel_attributes>TrajectoryParticleInfo
     149#Thermostat_NoseHoover_scale(int Step, double *ekin, config *configuration)</panel_attributes><additional_attributes></additional_attributes></element><element><type>com.umlet.element.base.Relation</type><coordinates><x>2149</x><y>259</y><w>209</w><h>419</h></coordinates><panel_attributes>lt=&lt;&lt;-</panel_attributes><additional_attributes>21;21;21;112;196;112;196;406</additional_attributes></element><element><type>com.umlet.element.base.Relation</type><coordinates><x>1967</x><y>259</y><w>391</w><h>419</h></coordinates><panel_attributes>lt=&lt;&lt;-</panel_attributes><additional_attributes>21;21;21;112;378;112;378;406</additional_attributes></element><element><type>com.umlet.element.base.Class</type><coordinates><x>1617</x><y>490</y><w>203</w><h>70</h></coordinates><panel_attributes>TrajectoryParticleInfo
    150150--
    151151Trajectory: struct {vector&lt;Vector&gt; R,U,V}
     
    153153--
    154154#TrajectoryParticleInfo()
    155 #~TrajectoryParticleInfo()</panel_attributes><additional_attributes></additional_attributes></element><element><type>com.umlet.element.base.Relation</type><coordinates><x>1757</x><y>623</y><w>601</w><h>139</h></coordinates><panel_attributes>lt=&lt;&lt;-</panel_attributes><additional_attributes>21;21;21;105;588;105;588;126</additional_attributes></element><element><type>com.umlet.element.base.Relation</type><coordinates><x>1729</x><y>623</y><w>34</w><h>146</h></coordinates><panel_attributes>lt=&lt;&lt;-</panel_attributes><additional_attributes>21;21;21;133</additional_attributes></element><element><type>com.umlet.element.base.Relation</type><coordinates><x>1519</x><y>658</y><w>244</w><h>111</h></coordinates><panel_attributes>lt=&lt;&lt;-</panel_attributes><additional_attributes>21;21;21;56;231;56;231;98</additional_attributes></element><element><type>com.umlet.element.base.Class</type><coordinates><x>1736</x><y>448</y><w>147</w><h>112</h></coordinates><panel_attributes>TesselPoint
     155#~TrajectoryParticleInfo()</panel_attributes><additional_attributes></additional_attributes></element><element><type>com.umlet.element.base.Relation</type><coordinates><x>1757</x><y>539</y><w>601</w><h>139</h></coordinates><panel_attributes>lt=&lt;&lt;-</panel_attributes><additional_attributes>21;21;21;105;588;105;588;126</additional_attributes></element><element><type>com.umlet.element.base.Relation</type><coordinates><x>1729</x><y>539</y><w>34</w><h>146</h></coordinates><panel_attributes>lt=&lt;&lt;-</panel_attributes><additional_attributes>21;21;21;133</additional_attributes></element><element><type>com.umlet.element.base.Relation</type><coordinates><x>1519</x><y>574</y><w>244</w><h>111</h></coordinates><panel_attributes>lt=&lt;&lt;-</panel_attributes><additional_attributes>21;21;21;56;231;56;231;98</additional_attributes></element><element><type>com.umlet.element.base.Class</type><coordinates><x>1736</x><y>364</y><w>147</w><h>112</h></coordinates><panel_attributes>TesselPoint
    156156--
    157157-id: Long
     
    163163Responsibilities
    164164-- Resp1
    165 *-- Resp2*</panel_attributes><additional_attributes></additional_attributes></element><element><type>com.umlet.element.base.Relation</type><coordinates><x>1729</x><y>539</y><w>146</w><h>230</h></coordinates><panel_attributes>lt=&lt;&lt;-</panel_attributes><additional_attributes>133;21;133;175;21;175;21;217</additional_attributes></element><element><type>com.umlet.element.base.Relation</type><coordinates><x>1729</x><y>672</y><w>398</w><h>97</h></coordinates><panel_attributes>lt=&lt;&lt;-</panel_attributes><additional_attributes>385;21;385;42;21;42;21;84</additional_attributes></element><element><type>com.umlet.element.base.Relation</type><coordinates><x>1729</x><y>343</y><w>398</w><h>426</h></coordinates><panel_attributes>lt=&lt;&lt;-</panel_attributes><additional_attributes>385;21;385;168;196;168;196;371;21;371;21;413</additional_attributes></element><element><type>com.umlet.element.base.Relation</type><coordinates><x>1729</x><y>343</y><w>209</w><h>426</h></coordinates><panel_attributes>lt=&lt;&lt;-</panel_attributes><additional_attributes>196;21;196;371;21;371;21;413</additional_attributes></element><element><type>com.umlet.element.base.Class</type><coordinates><x>833</x><y>854</y><w>357</w><h>224</h></coordinates><panel_attributes>Bond
     165*-- Resp2*</panel_attributes><additional_attributes></additional_attributes></element><element><type>com.umlet.element.base.Relation</type><coordinates><x>1729</x><y>455</y><w>146</w><h>230</h></coordinates><panel_attributes>lt=&lt;&lt;-</panel_attributes><additional_attributes>133;21;133;175;21;175;21;217</additional_attributes></element><element><type>com.umlet.element.base.Relation</type><coordinates><x>1729</x><y>588</y><w>398</w><h>97</h></coordinates><panel_attributes>lt=&lt;&lt;-</panel_attributes><additional_attributes>385;21;385;42;21;42;21;84</additional_attributes></element><element><type>com.umlet.element.base.Relation</type><coordinates><x>1729</x><y>259</y><w>398</w><h>426</h></coordinates><panel_attributes>lt=&lt;&lt;-</panel_attributes><additional_attributes>385;21;385;168;196;168;196;371;21;371;21;413</additional_attributes></element><element><type>com.umlet.element.base.Relation</type><coordinates><x>1729</x><y>259</y><w>209</w><h>426</h></coordinates><panel_attributes>lt=&lt;&lt;-</panel_attributes><additional_attributes>196;21;196;371;21;371;21;413</additional_attributes></element><element><type>com.umlet.element.base.Class</type><coordinates><x>833</x><y>770</y><w>357</w><h>224</h></coordinates><panel_attributes>Bond
    166166--
    167167HydrogenBond: int
     
    182182#bond()
    183183#bond(atom *left, atom *right, const int degree=1, const int number=0)
    184 #~bond()</panel_attributes><additional_attributes></additional_attributes></element><element><type>com.umlet.element.base.Relation</type><coordinates><x>1834</x><y>707</y><w>107</w><h>125</h></coordinates><panel_attributes>lt=&lt;&lt;&lt;&lt;-
    185 3</panel_attributes><additional_attributes>42;112;91;112;91;35;21;35;21;49</additional_attributes></element><element><type>com.umlet.element.base.Relation</type><coordinates><x>1169</x><y>896</y><w>132</w><h>49</h></coordinates><panel_attributes>lt=&lt;&lt;&lt;&lt;-
    186 2</panel_attributes><additional_attributes>21;35;119;35</additional_attributes></element><element><type>com.umlet.element.base.Relation</type><coordinates><x>770</x><y>742</y><w>111</w><h>167</h></coordinates><panel_attributes>lt=&lt;&lt;&lt;&lt;-
    187 2</panel_attributes><additional_attributes>63;154;28;154;28;35;98;35;98;112</additional_attributes></element><element><type>com.umlet.element.base.Class</type><coordinates><x>1113</x><y>1330</y><w>504</w><h>168</h></coordinates><panel_attributes>BondGraph
     184#~bond()</panel_attributes><additional_attributes></additional_attributes></element><element><type>com.umlet.element.base.Relation</type><coordinates><x>1834</x><y>623</y><w>107</w><h>125</h></coordinates><panel_attributes>lt=&lt;&lt;&lt;&lt;-
     1853</panel_attributes><additional_attributes>42;112;91;112;91;35;21;35;21;49</additional_attributes></element><element><type>com.umlet.element.base.Relation</type><coordinates><x>1169</x><y>812</y><w>132</w><h>49</h></coordinates><panel_attributes>lt=&lt;&lt;&lt;&lt;-
     1862</panel_attributes><additional_attributes>21;35;119;35</additional_attributes></element><element><type>com.umlet.element.base.Relation</type><coordinates><x>770</x><y>658</y><w>111</w><h>167</h></coordinates><panel_attributes>lt=&lt;&lt;&lt;&lt;-
     1872</panel_attributes><additional_attributes>63;154;28;154;28;35;98;35;98;112</additional_attributes></element><element><type>com.umlet.element.base.Class</type><coordinates><x>1113</x><y>1246</y><w>504</w><h>168</h></coordinates><panel_attributes>BondGraph
    188188--
    189189max_distance: double
     
    199199                                                        double &amp;MinDistance, double &amp;MaxDistance, bool IsAngstroem)
    200200#CovalentMinMaxDistance(BondedParticle * const Walker, BondedParticle * const OtherWalker,
    201                                           double &amp;MinDistance, double &amp;MaxDistance, bool IsAngstroem)</panel_attributes><additional_attributes></additional_attributes></element><element><type>com.umlet.element.base.Relation</type><coordinates><x>1596</x><y>1407</y><w>167</w><h>34</h></coordinates><panel_attributes>lt=&lt;&lt;&lt;&lt;-</panel_attributes><additional_attributes>21;21;154;21</additional_attributes></element><element><type>com.umlet.element.base.Class</type><coordinates><x>1750</x><y>1365</y><w>147</w><h>133</h></coordinates><panel_attributes>MatrixContainer
     201                                          double &amp;MinDistance, double &amp;MaxDistance, bool IsAngstroem)</panel_attributes><additional_attributes></additional_attributes></element><element><type>com.umlet.element.base.Relation</type><coordinates><x>1596</x><y>1323</y><w>167</w><h>34</h></coordinates><panel_attributes>lt=&lt;&lt;&lt;&lt;-</panel_attributes><additional_attributes>21;21;154;21</additional_attributes></element><element><type>com.umlet.element.base.Class</type><coordinates><x>1750</x><y>1281</y><w>147</w><h>133</h></coordinates><panel_attributes>MatrixContainer
    202202--
    203203-id: Long
     
    209209Responsibilities
    210210-- Resp1
    211 *-- Resp2*</panel_attributes><additional_attributes></additional_attributes></element><element><type>com.umlet.element.base.Class</type><coordinates><x>0</x><y>539</y><w>511</w><h>1050</h></coordinates><panel_attributes>config
     211*-- Resp2*</panel_attributes><additional_attributes></additional_attributes></element><element><type>com.umlet.element.base.Class</type><coordinates><x>0</x><y>455</y><w>511</w><h>1050</h></coordinates><panel_attributes>config
    212212--
    213213PsiType: int
     
    297297#SetDefaultPath(const char * const path);
    298298#InitThermostats();
    299 #ParseThermostats(class ConfigFileBuffer * const fb);</panel_attributes><additional_attributes></additional_attributes></element><element><type>com.umlet.element.base.Relation</type><coordinates><x>490</x><y>1428</y><w>636</w><h>34</h></coordinates><panel_attributes>lt=&lt;&lt;&lt;&lt;-</panel_attributes><additional_attributes>21;21;623;21</additional_attributes></element><element><type>com.umlet.element.base.Relation</type><coordinates><x>1596</x><y>84</y><w>121</w><h>139</h></coordinates><panel_attributes>lt=&lt;&lt;&lt;&lt;-
    300 2</panel_attributes><additional_attributes>70;126;105;126;105;35;21;35;21;63</additional_attributes></element><element><type>com.umlet.element.base.Class</type><coordinates><x>2520</x><y>980</y><w>224</w><h>140</h></coordinates><panel_attributes>&lt;&lt;Singleton&gt;&gt;
     299#ParseThermostats(class ConfigFileBuffer * const fb);</panel_attributes><additional_attributes></additional_attributes></element><element><type>com.umlet.element.base.Relation</type><coordinates><x>490</x><y>1344</y><w>636</w><h>34</h></coordinates><panel_attributes>lt=&lt;&lt;&lt;&lt;-</panel_attributes><additional_attributes>21;21;623;21</additional_attributes></element><element><type>com.umlet.element.base.Relation</type><coordinates><x>1596</x><y>0</y><w>121</w><h>139</h></coordinates><panel_attributes>lt=&lt;&lt;&lt;&lt;-
     3002</panel_attributes><additional_attributes>70;126;105;126;105;35;21;35;21;63</additional_attributes></element><element><type>com.umlet.element.base.Class</type><coordinates><x>2520</x><y>896</y><w>224</w><h>140</h></coordinates><panel_attributes>&lt;&lt;Singleton&gt;&gt;
    301301errorLogger
    302302--
     
    310310#static setVerbosity(int verbosityLevel);
    311311#protected errorLogger()
    312 #protected ~errorLogger()</panel_attributes><additional_attributes></additional_attributes></element><element><type>com.umlet.element.base.Class</type><coordinates><x>2093</x><y>1064</y><w>364</w><h>35</h></coordinates><panel_attributes>KeyCompare
     312#protected ~errorLogger()</panel_attributes><additional_attributes></additional_attributes></element><element><type>com.umlet.element.base.Class</type><coordinates><x>2093</x><y>980</y><w>364</w><h>35</h></coordinates><panel_attributes>KeyCompare
    313313--
    314314--
    315315#operator() (const KeySet SubgraphA, const KeySet SubgraphB) const: bool
    316 </panel_attributes><additional_attributes></additional_attributes></element><element><type>com.umlet.element.base.Class</type><coordinates><x>1169</x><y>1218</y><w>147</w><h>105</h></coordinates><panel_attributes>UniqueFragments
     316</panel_attributes><additional_attributes></additional_attributes></element><element><type>com.umlet.element.base.Class</type><coordinates><x>1169</x><y>1134</y><w>147</w><h>105</h></coordinates><panel_attributes>UniqueFragments
    317317--
    318318ANOVAOrder: int
     
    322322ShortestPathList: int *
    323323UsedList: bool **
    324 BondsPerSPCount: int *</panel_attributes><additional_attributes></additional_attributes></element><element><type>com.umlet.element.base.Relation</type><coordinates><x>490</x><y>1253</y><w>692</w><h>34</h></coordinates><panel_attributes>lt=&lt;&lt;&lt;&lt;-</panel_attributes><additional_attributes>679;21;21;21</additional_attributes></element><element><type>com.umlet.element.base.Relation</type><coordinates><x>1120</x><y>980</y><w>251</w><h>307</h></coordinates><panel_attributes>lt=&lt;&lt;&lt;&lt;-</panel_attributes><additional_attributes>49;294;21;294;21;224;238;224;238;21</additional_attributes></element><element><type>com.umlet.element.base.Class</type><coordinates><x>840</x><y>1127</y><w>245</w><h>28</h></coordinates><panel_attributes>Graph
     324BondsPerSPCount: int *</panel_attributes><additional_attributes></additional_attributes></element><element><type>com.umlet.element.base.Relation</type><coordinates><x>490</x><y>1169</y><w>692</w><h>34</h></coordinates><panel_attributes>lt=&lt;&lt;&lt;&lt;-</panel_attributes><additional_attributes>679;21;21;21</additional_attributes></element><element><type>com.umlet.element.base.Relation</type><coordinates><x>1120</x><y>896</y><w>251</w><h>307</h></coordinates><panel_attributes>lt=&lt;&lt;&lt;&lt;-</panel_attributes><additional_attributes>49;294;21;294;21;224;238;224;238;21</additional_attributes></element><element><type>com.umlet.element.base.Class</type><coordinates><x>840</x><y>1043</y><w>245</w><h>28</h></coordinates><panel_attributes>Graph
    325325{map &lt;KeySet, NumberValuePair, KeyCompare&gt;}
    326 </panel_attributes><additional_attributes></additional_attributes></element><element><type>com.umlet.element.base.Relation</type><coordinates><x>861</x><y>1134</y><w>321</w><h>153</h></coordinates><panel_attributes>lt=&lt;&lt;&lt;&lt;-</panel_attributes><additional_attributes>308;140;21;140;21;21</additional_attributes></element><element><type>com.umlet.element.base.Class</type><coordinates><x>945</x><y>1190</y><w>56</w><h>28</h></coordinates><panel_attributes>KeySet
    327 {set&lt;int&gt;}</panel_attributes><additional_attributes></additional_attributes></element><element><type>com.umlet.element.base.Relation</type><coordinates><x>945</x><y>1197</y><w>237</w><h>90</h></coordinates><panel_attributes>lt=&lt;&lt;&lt;&lt;-</panel_attributes><additional_attributes>224;77;21;77;21;21</additional_attributes></element><element><type>com.umlet.element.base.Relation</type><coordinates><x>1085</x><y>1057</y><w>99</w><h>230</h></coordinates><panel_attributes>lt=&lt;&lt;&lt;&lt;-
    328 0...N X 0...N</panel_attributes><additional_attributes>84;217;56;217;56;112;21;112;21;21</additional_attributes></element><element><type>com.umlet.element.base.Class</type><coordinates><x>1736</x><y>2282</y><w>147</w><h>42</h></coordinates><panel_attributes>LSQ_params
     326</panel_attributes><additional_attributes></additional_attributes></element><element><type>com.umlet.element.base.Relation</type><coordinates><x>861</x><y>1050</y><w>321</w><h>153</h></coordinates><panel_attributes>lt=&lt;&lt;&lt;&lt;-</panel_attributes><additional_attributes>308;140;21;140;21;21</additional_attributes></element><element><type>com.umlet.element.base.Class</type><coordinates><x>945</x><y>1106</y><w>56</w><h>28</h></coordinates><panel_attributes>KeySet
     327{set&lt;int&gt;}</panel_attributes><additional_attributes></additional_attributes></element><element><type>com.umlet.element.base.Relation</type><coordinates><x>945</x><y>1113</y><w>237</w><h>90</h></coordinates><panel_attributes>lt=&lt;&lt;&lt;&lt;-</panel_attributes><additional_attributes>224;77;21;77;21;21</additional_attributes></element><element><type>com.umlet.element.base.Relation</type><coordinates><x>1085</x><y>973</y><w>99</w><h>230</h></coordinates><panel_attributes>lt=&lt;&lt;&lt;&lt;-
     3280...N X 0...N</panel_attributes><additional_attributes>84;217;56;217;56;112;21;112;21;21</additional_attributes></element><element><type>com.umlet.element.base.Class</type><coordinates><x>1736</x><y>2198</y><w>147</w><h>42</h></coordinates><panel_attributes>LSQ_params
    329329--
    330330vectors: const Vector **
    331331num: int
    332 </panel_attributes><additional_attributes></additional_attributes></element><element><type>com.umlet.element.base.Class</type><coordinates><x>1043</x><y>266</y><w>147</w><h>35</h></coordinates><panel_attributes>lsq_params
    333 --
    334 x: gsl_vector *</panel_attributes><additional_attributes></additional_attributes></element><element><type>com.umlet.element.base.Relation</type><coordinates><x>1169</x><y>266</y><w>118</w><h>34</h></coordinates><panel_attributes>lt=&lt;&lt;&lt;&lt;-</panel_attributes><additional_attributes>21;21;105;21</additional_attributes></element></umlet_diagram>
     332</panel_attributes><additional_attributes></additional_attributes></element><element><type>com.umlet.element.base.Class</type><coordinates><x>1043</x><y>182</y><w>147</w><h>35</h></coordinates><panel_attributes>lsq_params
     333--
     334x: gsl_vector *</panel_attributes><additional_attributes></additional_attributes></element><element><type>com.umlet.element.base.Relation</type><coordinates><x>1169</x><y>182</y><w>118</w><h>34</h></coordinates><panel_attributes>lt=&lt;&lt;&lt;&lt;-</panel_attributes><additional_attributes>21;21;105;21</additional_attributes></element></umlet_diagram>
  • src/Actions/Action.cpp

    r9cf88c r82b71a  
    3434
    3535void Action::call(){
     36  if(!isActive()){
     37    return;
     38  }
    3639  // forward to private virtual
    3740  state_ptr state = performCall();
  • src/Actions/Action.hpp

    r9cf88c r82b71a  
    1818
    1919/**
     20 * @file
     21 * <H1> Action Howto </H1>
     22 *
     23 * <H2> Introduction </H2>
     24 *
     25 * Actions are used in object oriented design as a replacement for callback functions.
     26 * In most ways Actions can be used in the same way that callbacks were used in non
     27 * OO-Systems, but can contain support for several extra mechanism such as undo/redo
     28 * or progress indicators.
     29 *
     30 * The main purpose of an action class is to contain small procedures, that can be repeatedly
     31 * called. These procedures can also be stored, passed around, so that the execution of an
     32 * action can happen quite far away from the place of creation. For a detailed description of
     33 * the Action pattern see GOF:1996.
     34 *
     35 * <H3> How to use an action </H3>
     36 *
     37 * The process of using an action is as easy as calling the call() method of the action. The
     38 * action will then do whatever it is supposed to do. If it is an action that can be undone, it
     39 * will also register itself in the history to make itself available for undo. To undo the last
     40 * action, you can either use the undoLast() method inside the ActionHistory class or call the
     41 * UndoAction also provided by the ActionHistory. If an action was undone it will be available for
     42 * redo, using the redoLast() method of the ActionHistory or the RedoAction also provided by this
     43 * class. To check whether undo/redo is available at any moment you can use the hasUndo() or
     44 * hasRedo() method respectively.
     45 *
     46 * Actions can be set to be active or inactive. If an action is set to inactive it is signaling, that
     47 * some condition necessary for this action to be executed is not currently met. For example the
     48 * UndoAction will set itself to inactive, when there is no action at that time that can be undone.
     49 * Using call() on an inactive Action results in a no-op. You can query the state of an action using
     50 * the isActive() method.
     51 *
     52 * The undo capabilities of actions come in three types as signaled by two boolean flags (one
     53 * combination of these flags is left empty as can be seen later).
     54 * <ul>
     55 * <li/> The first flag indicates if the undo mechanism for this action should be considered at all, i.e.
     56 *   if the state of the application changes in a way that needs to be reverted. Actions that should
     57 *   consider the undo mechanism are for example adding a molecule, moving atoms, changing
     58 *   the name of a molecule etc. Changing the View-Area on the other hand should be an action that
     59 *   does not consider the undo mechanism. This flag can be queried using the shouldUndo() method.
     60 *
     61 * <li/> The second flag indicates whether the changes can be undo for this action. If this flag is true
     62 *   the action will be made available for undo using the ActionHistory class and the actions of this
     63 *   class. If this flag is false while the shoudlUndo() flag is true this means that this action
     64 *   changes the state of the application changes in a way that cannot be undone, but might cause
     65 *   the undo of previous actions to fail. In this case the whole History is cleared, as to keep
     66 *   the state of the application intact by avoiding dangerous undos. This flag can be queried
     67 *   using the canUndo() method.
     68 *</ul>
     69 *
     70 * Each action has a name, that can be used to identify it throughout the run of the application.
     71 * This name can be retrieved using the getName() method. Most actions also register themselves with
     72 * a global structure, called the ActionRegistry. Actions that register themselves need to have a
     73 * unique name for the whole application. If the name is known these actions can be retrieved from
     74 * the registry by their name and then be used as normal.
     75 *
     76 * <H2> Building your own actions </H2>
     77 *
     78 * Building actions is fairly easy. Simply derive from the abstract Action base class and implement
     79 * the virtual methods. The main code that needs to be executed upon call() should be implemented in
     80 * the performCall() method. You should also indicate whether the action supports undo by implementing
     81 * the shouldUndo() and canUndo() methods to return the appropriate flags.
     82 *
     83 * The constructor of your derived class also needs to call the Base constructor, passing it the
     84 * name of the Action and a flag indicating whether this action should be made available in the
     85 * registry. WARNING: Do not use the virtual getName() method of the derived action to provide the
     86 * constructor with the name, even if you overloaded this method to return a constant. Doing this
     87 * will most likely not do what you think it does (see: http://www.parashift.com/c++-faq-lite/strange-inheritance.html#faq-23.5
     88 * if you want to know why this wont work)
     89 *
     90 * <H3> Interfacing your Action with the Undo mechanism </H3>
     91 *
     92 * The performX() methods need to comply to a simple standard to allow for undo and redo. The first
     93 * convention in this standard concerns the return type. All methods that handle calling, undoing
     94 * or redoing return an object of Action::state_ptr. This is a smart pointer to a State object, that
     95 * can be used to store state information that is needed by your action for later redo. A rename
     96 * Action for example would need to store which object has been renamed and what the old name was.
     97 * A move Action on the other hand would need to store the object that has been moved as well as the
     98 * old position. If your Action does not need to store any kind of information for redo you can
     99 * simply return Action::success and skip the rest of this paragraph. If your action has been
     100 * abborted you can return Action::failure, which indicates to the history mechanism that this
     101 * action should not be stored.
     102 *
     103 * If your Action needs any kind of information to undo its execution, you need to store this
     104 * information in the state that is returned by the performCall() method. Since no assumptions
     105 * can be made on the type or amount of information the ActionState base class is left empty.
     106 * To use this class you need to derive a YourActionState class from the ActionState base class
     107 * adding your data fields and accessor functions. Upon undo the ActionState object produced
     108 * by the corresponding performCall() is then passed to the performUndo() method which should
     109 * typecast the ActionState to the appropriate sub class, undo all the changes and produce
     110 * a State object that can be used to redo the action if neccessary. This new state object is
     111 * then used if the redo mechanism is invoked and passed to the performRedo() function, which
     112 * again produces a State that can be used for performUndo().
     113 *
     114 * <H3> Outline of the implementation of Actions </H3>
     115 *
     116 * To sum up the actions necessary to build actions here is a brief outline of things methioned
     117 * in the last paragraphs:
     118 *
     119 * <H4> Basics </H4>
     120 *
     121 * <ul>
     122 *  <li/> derive YourAction from Action
     123 *  <li/> pass name and flag for registry to the base constructor
     124 *  <li/> implement performCall(), performUndo(), performRedo()
     125 *  <li/> implement the functions that return the flags for the undo mechanism
     126 *  <li/> Derive YourActionState from ActionState as necessary
     127 * </ul>
     128 *
     129 * <H4> Implementing performX() methods </H4>
     130 *
     131 * <ul>
     132 *  <li/> performCall():
     133 *  <ul>
     134 *   <li/> do whatever is needed to make the action work
     135 *   <li/> if the action was abborted return Action::failure
     136 *   <li/> if the action needs to save a state return a custom state object
     137 *   <li/> otherwise return Action::success
     138 *  </ul>
     139 *  <li/> performUndo():
     140 *  <ul>
     141 *   <li/> typecast the ActionState pointer to a Pointer to YourActionState if necessary
     142 *   <li/> undo the action using the information from the state
     143 *   <li/> produce a new state that can be used for redoing and return it
     144 *  </ul>
     145 *  <li/> performRedo():
     146 *  <ul>
     147 *   <li/> take the ActionState produced by performUndo and typecast it to a pointer to YourActionState if necessary
     148 *   <li/> redo the undone action using the information from the state
     149 *   <li/> produce a new state that can be used by performUndo() and return it
     150 *  </ul>
     151 * </ul>
     152 *
     153 * <H2> Advanced techniques </H2>
     154 *
     155 * <H3> Predefined Actions </H3>
     156 *
     157 * To make construction of actions easy there are some predefined actions. Namely these are
     158 * the MethodAction and the ErrorAction.
     159 *
     160 * The method action can be used to turn any function with empty arguments and return type void
     161 * into an action (also works for functors with those types). Simply pass the constructor for the
     162 * MethodAction a name to use for this action, the function to call inside the performCall()
     163 * method and a flag indicating if this action should be made retrievable inside the registry
     164 * (default is true). MethodActions always report themselves as changing the state of the
     165 * application but cannot be undone. i.e. calling MethodActions will always cause the ActionHistory
     166 * to be cleared.
     167 *
     168 * ErrorActions can be used to produce a short message using the Log() << Verbose() mechanism of
     169 * the molecuilder. Simply pass the constructor a name for the action, the message to show upon
     170 * calling this action and the flag for the registry (default is again true). Error action
     171 * report that they do not change the state of the application and are therefore not considered
     172 * for undo.
     173 *
     174 * <H3> Sequences of Actions and MakroActions </H3>
     175 *
     176 * <H4> Building sequences of Actions </H4>
     177 *
     178 * Actions can be chained to sequences using the ActionSequence class. Once an ActionSequence is
     179 * constructed it will be initially empty. Any Actions can then be added to the sequence using the
     180 * addAction() method of the ActionSequence class. The last added action can be removed using the
     181 * removeLastAction() method. If the construction of the sequence is done, you can use the
     182 * callAll() method. Each action called this way will register itself with the History to allow
     183 * separate undo of all actions in the sequence.
     184 *
     185 * <H4> Building larger Actions from simple ones </H4>
     186 *
     187 * Using the pre-defined class MakroAction it is possible to construct bigger actions from a sequence
     188 * of smaller ones. For this you first have to build a sequence of the actions using the ActionSequence
     189 * as described above. Then you can construct a MakroAction passing it a name, the sequence to use
     190 * and as usual a flag for the registry. You can then simply call the complete action-sequence through
     191 * this makro action using the normal interface. Other than with the direct use of the action sequence
     192 * only the complete MakroAction is registered inside the history, i.e. the complete sequence can be
     193 * undone at once. Also there are a few caveats you have to take care of when using the MakroAction:
     194 * <ul>
     195 *  <li/> All Actions as well as the sequence should exclusively belong to the MakroAction. This
     196 *        especially means, that the destruction of these objects should be handled by the MakroAction.
     197 *  <li/> none of the Actions inside the MakroAction should be registered with the registry, since the
     198 *        registry also assumes sole ownership of the actions.
     199 *  <li/> Do not remove or add actions from the sequence once the MakroAction has been constructed, since this
     200 *        might brake important assumptions for the undo/redo mechanism
     201 * </ul>
     202 *
     203 * <H3> Special kinds of Actions </H3>
     204 *
     205 * To make the usage of Actions more versatile there are two special kinds of actions defined,
     206 * that contain special mechanisms. These are defined inside the class Process, for actions that
     207 * take some time and indicate their own progress, and in the class Calculations for actions that
     208 * have a retrievable result.
     209 *
     210 * <H4> Processes </H4>
     211 *
     212 * Processes are Actions that might take some time and therefore contain special mechanisms
     213 * to indicate their progress to the user. If you want to implement a process you can follow the
     214 * guidelines for implementing actions. In addition to the normal Action constructor parameters,
     215 * you also need to define the number of steps the process takes to finish (use 0 if that number is
     216 * not known upon construction). At the beginning of your process you then simply call start() to
     217 * indicate that the process is taking up its work. You might also want to set the number of steps it
     218 * needs to finish, if it has changed since the last invocation/construction. You can use the
     219 * setMaxSteps() method for this. Then after each finished step of calulation simply call step(),
     220 * to let the indicators know that it should update itself. If the number of steps is not known
     221 * at the time of calculation, you should make sure the maxSteps field is set to 0, either through
     222 * the constructor or by using setMaxSteps(0). Indicators are required to handle both processes that
     223 * know the number of steps needed as well as processes that cannot predict when they will be finished.
     224 * Once your calculation is done call stop() to let every indicator know that the process is done with
     225 * the work and to let the user know.
     226 *
     227 * Indicators that want to know about processes need to implement the Observer class with all the
     228 * methods defined there. They can then globally sign on to all processes using the static
     229 * Process::AddObserver() method and remove themselves using the Process::RemoveObserver()
     230 * methods. When a process starts it will take care that the notification for this process
     231 * is invoked at the right time. Indicators should not try to observe a single process, but rather
     232 * be ready to observe the status of any kind of process using the methods described here.
     233 *
     234 * <H4> Calculations </H4>
     235 *
     236 * Calculations are special Actions that also return a result when called. Calculations are
     237 * always derived from Process, so that the progress of a calculation can be shown. Also
     238 * Calculations should not contain side-effects and not consider the undo mechanism.
     239 * When a Calculation is called using the Action mechanism this will cause it to calculate
     240 * the result and make it available using the getResult() method. Another way to have a Calculation
     241 * produce a result is by using the function-call operator. When this operator is used, the Calculation
     242 * will try to return a previously calculated and cached result and only do any actuall calculations
     243 * when no such result is available. You can delete the cached result using the reset() method.
     244 */
     245
     246/**
    20247 * Base class for all actions.
    21248 *
    22249 * Actions describe something that has to be done.
    23250 * Actions can be passed around, stored, performed and undone (Command-Pattern).
    24  *
    25  * TODO: Add queues of actions that have been performed to allow easy implementation of multiple-step undo
    26251 */
    27252class Action
    28253{
    29254friend class ActionSequence;
     255friend class ActionHistory;
    30256public:
    31257
     
    38264  // actuall action is passed on to a private virtual
    39265  void call();
     266
     267  virtual bool canUndo()=0;
     268  virtual bool shouldUndo()=0;
     269
     270  virtual bool isActive();
     271
     272  virtual const std::string getName();
     273
     274protected:
    40275  state_ptr undo(state_ptr);
    41276  state_ptr redo(state_ptr);
    42277
    43   virtual bool canUndo()=0;
    44   virtual bool shouldUndo()=0;
    45 
    46   virtual bool isActive();
    47 
    48   virtual const std::string getName();
    49 
    50 protected:
    51278  static state_ptr success;
    52279  static state_ptr failure;
  • src/Actions/ActionHistory.cpp

    r9cf88c r82b71a  
    4545
    4646void ActionHistory::addElement(Action* action,Action::state_ptr state){
    47   cout << "Adding action to end of history" << endl;
    4847  yrotsih.clear();
    4948  history.push_back(HistoryElement(action,state));
     
    5150
    5251void ActionHistory::clear(){
    53   cout << "History cleared" << endl;
    5452  history.clear();
    5553  yrotsih.clear();
  • src/Actions/ActionSequence.cpp

    r9cf88c r82b71a  
    3636}
    3737
    38 ActionSequence::stateSet ActionSequence::callAll(){
     38// this method is used outside the ActionModule
     39// Each action registers itself with the history
     40void ActionSequence::callAll(){
     41  for(actionSet::iterator it=actions.begin(); it!=actions.end(); it++){
     42    // we want to have a global bookkeeping for all actions in the sequence, so
     43    // we bypass the normal call
     44    (*it)->call();
     45  }
     46}
     47
     48// This method is used internally when MakroActions are constructed.
     49// In this case only the makro Action should be registered and
     50// handle the states
     51ActionSequence::stateSet ActionSequence::callAll(bool){
    3952  stateSet states;
    4053  for(actionSet::iterator it=actions.begin(); it!=actions.end(); it++){
  • src/Actions/ActionSequence.hpp

    r9cf88c r82b71a  
    1818class ActionSequence
    1919{
     20  friend class MakroAction;
    2021public:
    2122  typedef std::deque<Action*> actionSet;
     
    2829  Action* removeLastAction();
    2930
    30   stateSet callAll();
    31   stateSet undoAll(stateSet);
    32   stateSet redoAll(stateSet);
     31  void callAll();
    3332
    3433  bool canUndo();
    3534  bool shouldUndo();
    3635
     36protected:
     37  stateSet callAll(bool); // Dummy parameter to allow overloading
     38  stateSet undoAll(stateSet);
     39  stateSet redoAll(stateSet);
    3740private:
    3841  actionSet actions;
  • src/Actions/MakroAction.cpp

    r9cf88c r82b71a  
    4444
    4545Action::state_ptr MakroAction::performCall(){
    46   ActionSequence::stateSet states = actions->callAll();
     46  ActionSequence::stateSet states = actions->callAll(true);
    4747  return Action::state_ptr(new MakroActionState(states));
    4848}
  • src/Actions/Process.cpp

    r9cf88c r82b71a  
    2525
    2626
    27 bool Process::isActive(){
     27bool Process::isRunning(){
    2828  return active;
    2929}
     
    3838
    3939int Process::getCurrStep(){
    40   OBSERVE;
    4140  return currStep;
    4241}
    4342
    4443void Process::setCurrStep(int _currStep){
     44  OBSERVE;
    4545  currStep = _currStep;
    4646}
     
    5252    return 0;
    5353}
    54 
    5554int Process::getMaxSteps(){
    5655  return maxSteps;
  • src/Actions/Process.hpp

    r9cf88c r82b71a  
    4343  virtual ~Process();
    4444
    45   bool  isActive();
     45  bool  isRunning();
    4646  bool  doesStart();
    4747  bool  doesStop();
  • src/Actions/small_actions.hpp

    r9cf88c r82b71a  
    2727};
    2828
    29 
    3029#endif // _SMALL_ACTIONS_HPP
  • src/Makefile.am

    r9cf88c r82b71a  
    1212                                Actions/ActionRegistry.cpp \
    1313                                Actions/ActionSequence.cpp \
    14                                 Actions/ErrorAction.cpp \
    1514                                Actions/MakroAction.cpp \
    1615                                Actions/ManipulateAtomsProcess.cpp \
    1716                                Actions/MethodAction.cpp \
    18                 Actions/Process.cpp \
    19                 Actions/small_actions.cpp
    20                
     17                Actions/Process.cpp
    2118                 
    2219ACTIONSHEADER = Actions/Action.hpp \
     
    2623                            Actions/Calculation.hpp \
    2724                            Actions/Calculation_impl.hpp \
    28                             Actions/ErrorAction.hpp \
    2925                            Actions/MakroAction.hpp \
    3026                            Actions/ManipulateAtomsProcess.hpp \
    3127                            Actions/MethodAction.hpp \
    32                             Actions/Process.hpp \
    33                             Actions/small_actions.hpp
     28                            Actions/Process.hpp
    3429                           
    3530                           
     31# All actions that need user interaction go here
     32MENUACTIONSSOURCE = Actions/ErrorAction.cpp Actions/small_actions.cpp
     33MENUACTIONSHEADER = Actions/ErrorAction.hpp Actions/small_actions.hpp
    3634
    3735PATTERNSOURCE = Patterns/Observer.cpp
     
    4644MENUHEADER = Menu/Menu.hpp Menu/TextMenu.hpp Menu/MenuItem.hpp Menu/SubMenuItem.hpp Menu/ActionMenuItem.hpp Menu/SeperatorItem.hpp Menu/DisplayMenuItem.hpp
    4745
    48 UISOURCE = ${ACTIONSSOURCE} ${VIEWSOURCE} ${MENUSOURCE} UIElements/UIFactory.cpp UIElements/TextUIFactory.cpp UIElements/MainWindow.cpp UIElements/TextWindow.cpp UIElements/TextStatusIndicator.cpp UIElements/Dialog.cpp UIElements/TextDialog.cpp
    49 UIHEADER = ${ACTIONSHEADER} ${VIEWHEADER} ${MENUHEADER} UIElements/UIFactory.hpp UIElements/TextUIFactory.hpp UIElements/MainWindow.hpp UIElements/TextWindow.hpp UIElements/TextStatusIndicator.hpp UIElements/Dialog.hpp UIElements/TextDialog.hpp
     46UISOURCE = ${MENUACTIONSSOURCE} ${VIEWSOURCE} ${MENUSOURCE} UIElements/UIFactory.cpp UIElements/TextUIFactory.cpp UIElements/MainWindow.cpp UIElements/TextWindow.cpp UIElements/Dialog.cpp UIElements/TextDialog.cpp UIElements/TextStatusIndicator.cpp
     47UIHEADER = ${MENUACTIONSHEADER} ${VIEWHEADER} ${MENUHEADER} UIElements/UIFactory.hpp UIElements/TextUIFactory.hpp UIElements/MainWindow.hpp UIElements/TextWindow.hpp UIElements/Dialog.hpp UIElements/TextDialog.hpp UIElements/TextStatusIndicator.hpp
    5048
    5149# all these files are only used for legacy reasons while the transition is in progress
     
    5452LEGACYSOURCE = Legacy/oldmenu.cpp
    5553LEGACYHEADER = Legacy/oldmenu.hpp
     54
     55QTUIMOC_HEADER = UIElements/QT4/QTDialog.hpp \
     56                                 UIElements/QT4/QTMainWindow.hpp \
     57                                 Menu/QT4/QTMenu.hpp \
     58                                 Views/QT4/QTWorldView.hpp \
     59                                 Views/QT4/GLMoleculeView.hpp \
     60                                 Views/QT4/QTMoleculeView.hpp \
     61                                 Views/QT4/QTStatusBar.hpp
     62 
     63QTUIMOC_TARGETS = QTMainWindow.moc.cpp \
     64                      QTMenu.moc.cpp\
     65                      QTDialog.moc.cpp \
     66                      QTWorldView.moc.cpp \
     67                      GLMoleculeView.moc.cpp \
     68                      QTMoleculeView.moc.cpp \
     69                      QTStatusBar.moc.cpp
    5670
    5771DESCRIPTORSOURCE = Descriptors/AtomDescriptor.cpp \
     
    7084
    7185
     86QTUISOURCE = ${QTUIMOC_TARGETS} \
     87             UIElements/QT4/QTMainWindow.cpp \
     88             UIElements/QT4/QTDialog.cpp \
     89             UIElements/QT4/QTUIFactory.cpp \
     90             Menu/QT4/QTMenu.cpp \
     91             Views/QT4/QTWorldView.cpp \
     92             Views/QT4/GLMoleculeView.cpp \
     93             Views/QT4/QTMoleculeView.cpp \
     94             Views/QT4/QTStatusBar.cpp
     95             
     96QTUIHEADER = ${QTUIMOC_HEADER} UIElements/QT4/QTUIFactory.hpp
     97
     98QTUI_DEFS =
     99
    72100SOURCE = ${ANALYSISSOURCE} \
    73101                 ${ATOMSOURCE} \
    74102                 ${PATTERNSOURCE} \
    75                  ${UISOURCE} \
     103                 ${ACTIONSSOURCE} \
    76104                 ${DESCRIPTORSOURCE} \
    77105                 ${LEGACYSOURCE} \
     
    107135                 verbose.cpp \
    108136                 World.cpp
    109 HEADER = ${ANALYSISHEADER} ${ATOMHEADER} ${PATTERNHEADER} ${UIHEADER} ${DESCRIPTORHEADER} ${LEGACYHEADER} bond.hpp bondgraph.hpp boundary.hpp config.hpp defs.hpp element.hpp ellipsoid.hpp errorlogger.hpp graph.hpp helpers.hpp info.hpp leastsquaremin.hpp linkedcell.hpp lists.hpp log.hpp logger.hpp memoryallocator.hpp memoryusageobserver.hpp molecule.hpp molecule_template.hpp parser.hpp periodentafel.hpp stackclass.hpp tesselation.hpp tesselationhelpers.hpp vector.hpp verbose.hpp World.hpp
     137
     138HEADER = ${ANALYSISHEADER}\
     139         ${ATOMHEADER} \
     140         ${PATTERNHEADER} \
     141         ${DESCRIPTORHEADER} \
     142         ${LEGACYHEADER} \
     143         bond.hpp \
     144         bondgraph.hpp \
     145         boundary.hpp \
     146         config.hpp \
     147         defs.hpp \
     148         element.hpp \
     149         ellipsoid.hpp \
     150         errorlogger.hpp \
     151         graph.hpp \
     152         helpers.hpp \
     153         info.hpp \
     154         leastsquaremin.hpp \
     155         linkedcell.hpp \
     156         lists.hpp \
     157         log.hpp \
     158         logger.hpp \
     159         memoryallocator.hpp \
     160         memoryusageobserver.hpp \
     161         molecule.hpp \
     162         molecule_template.hpp \
     163         parser.hpp \
     164         periodentafel.hpp \
     165         stackclass.hpp \
     166         tesselation.hpp \
     167         tesselationhelpers.hpp \
     168         vector.hpp \
     169         verbose.hpp \
     170         World.hpp
    110171
    111172BOOST_LIB = $(BOOST_LDFLAGS) $(BOOST_MPL_LIB)
     173GUI_LIBS = ${QT_LDADD} ${QT_LIB_GUI} -lQtOpenGL ${GLU_LIBS}
    112174INCLUDES = -I$(top_srcdir)/src/unittests
    113175
    114 noinst_LIBRARIES = libmolecuilder.a libgslwrapper.a
    115 bin_PROGRAMS = molecuilder joiner analyzer
     176noinst_LIBRARIES = libmolecuilder.a libgslwrapper.a libmenu.a
     177bin_PROGRAMS = molecuilder molecuildergui joiner analyzer
    116178molecuilderdir = ${bindir}
     179
    117180libmolecuilder_a_SOURCES = ${SOURCE} ${HEADER}
     181
     182libmenu_a_SOURCES = ${UISOURCE} ${UIHEADER}
     183
    118184libgslwrapper_a_SOURCES = ${LINALGSOURCE} ${LINALGHEADER}
     185
    119186molecuilder_DATA = elements.db valence.db orbitals.db Hbonddistance.db Hbondangle.db
    120 molecuilder_LDFLAGS = $(BOOST_LDFLAGS)
    121 molecuilder_SOURCES = builder.cpp
    122 molecuilder_LDADD = libmolecuilder.a libgslwrapper.a $(BOOST_LIB) ${BOOST_THREAD_LIB}
     187
     188molecuilder_CXXFLAGS = $(BOOST_CPPFLAGS)
     189#molecuilder_CXXFLAGS += -DNO_CACHING
     190molecuilder_LDFLAGS = $(BOOST_LIB)
     191molecuilder_SOURCES = ${LEGACYSOURCE} builder.cpp
     192molecuilder_SOURCES += $(srcdir)/version.c
     193molecuilder_LDADD = libmolecuilder.a libgslwrapper.a libmenu.a ${BOOST_THREAD_LIB}
     194
     195#Stuff for building the GUI using QT
     196molecuildergui_SOURCES = ${QTUISOURCE} ${LEGACYSOURCE} builder.cpp
     197molecuildergui_SOURCES += $(srcdir)/version.c
     198molecuildergui_CXXFLAGS = ${QT_CXXFLAGS} ${GLU_CXXFLAGS} -DUSE_GUI_QT
     199molecuildergui_LDFLAGS = $(BOOST_LIB) ${QT_LDFLAGS} ${GLU_LDFLAGS}
     200molecuildergui_LDADD = libmolecuilder.a libgslwrapper.a libmenu.a ${BOOST_THREAD_LIB} ${GUI_LIBS}
     201
    123202joiner_SOURCES = joiner.cpp datacreator.cpp parser.cpp datacreator.hpp helpers.hpp parser.hpp periodentafel.hpp
    124203joiner_LDADD = libmolecuilder.a $(BOOST_LIB) ${BOOST_THREAD_LIB}
     204
    125205analyzer_SOURCES = analyzer.cpp datacreator.cpp parser.cpp helpers.hpp periodentafel.hpp parser.hpp datacreator.hpp
    126206analyzer_LDADD = libmolecuilder.a $(BOOST_LIB) ${BOOST_THREAD_LIB}
    127207
     208#Rules needed for QT4
     209# UI-Files are scattered throughout several subdirectories
     210# Therfore `%'-rules do not seem to work
     211#Quick fix to get it done otherwise
     212${QTUIMOC_TARGETS}: ${QTUIMOC_HEADER}
     213        list='$(QTUIMOC_HEADER)'; for header in $$list; do \
     214        echo "Making mocfile for $$header"; \
     215        target=`basename $$header | sed "s/\(.*\)\..*/\1.moc.cpp/"`;\
     216        $(MOC) $(srcdir)/$$header -o $$target \
     217        || eval $$failcom; \
     218        done;
     219
     220MOSTLYCLEANFILES = ${QTUIMOC_TARGETS}
     221       
    128222#EXTRA_DIST = ${molecuilder_DATA}
    129223
     
    142236        echo "const char *ESPACKVersion = \"$(PACKAGE_NAME) -- git version: "`cat $(srcdir)/.git-version`"\";" > $@
    143237
    144 molecuilder_SOURCES += $(srcdir)/version.c
     238
  • src/UIElements/Dialog.cpp

    r9cf88c r82b71a  
    3131
    3232bool Dialog::display(){
     33  if(checkAll()){
     34    setAll();
     35    return true;
     36  }
     37  else{
     38    return false;
     39  }
     40}
     41
     42bool Dialog::checkAll(){
    3343  list<Query*>::iterator iter;
    3444  bool retval = true;
     
    3949      break;
    4050  }
    41   if (retval){
    42     // if all queries succeeded we can set the targets to appropriate values
    43     for(iter=queries.begin(); iter!=queries.end(); iter++) {
    44       (*iter)->setResult();
    45     }
     51  return retval;
     52}
     53
     54void Dialog::setAll(){
     55  list<Query*>::iterator iter;
     56  for(iter=queries.begin(); iter!=queries.end(); iter++) {
     57    (*iter)->setResult();
    4658  }
    47   return retval;
    4859}
    4960
     
    7687
    7788Dialog::StringQuery::StringQuery(string title,string *_target) :
    78     Query(title), target(_target)
     89    Query(title),
     90    target(_target),
     91    tmp("")
    7992{}
    8093
  • src/UIElements/Dialog.hpp

    r9cf88c r82b71a  
    3131
    3232  virtual bool display();
     33
     34  virtual bool checkAll();
     35  virtual void setAll();
    3336
    3437protected:
  • src/UIElements/TextUIFactory.hpp

    r9cf88c r82b71a  
    1313class TextUIFactory : public UIFactory
    1414{
    15 friend class UIFactory;
     15  friend class UIFactory;
    1616
    1717public:
  • src/UIElements/UIFactory.hpp

    r9cf88c r82b71a  
    3535  friend class Singleton<UIFactory,false>;
    3636public:
     37
    3738  /**
    3839   * Produce some kind of main window, of whichever type was chosen when the factory was created
  • src/builder.cpp

    r9cf88c r82b71a  
    7171#include "UIElements/UIFactory.hpp"
    7272#include "UIElements/TextUIFactory.hpp"
     73#ifdef USE_GUI_QT
     74#include "UIElements/QT4/QTUIFactory.hpp"
     75#endif
    7376#include "UIElements/MainWindow.hpp"
    7477#include "UIElements/Dialog.hpp"
     
    453456  mol->Mirror((const Vector *)&n);
    454457};
     458>>>>>>> MenuRefactoring:molecuilder/src/builder.cpp
    455459
    456460/** Submenu for removing the atoms from the molecule.
     
    22102214        mol = World::getInstance().createMolecule();
    22112215        World::getInstance().getMolecules()->insert(mol);
    2212         cout << "Molecule created" << endl;
    22132216        if(mol->cell_size[0] == 0.){
    22142217            Log() << Verbose(0) << "enter lower tridiagonal form of basis matrix" << endl << endl;
     
    22222225
    22232226    {
    2224       cout << ESPACKVersion << endl;
    2225 
    22262227      setVerbosity(0);
    22272228
     
    22302231
    22312232      UIFactory::registerFactory(new TextUIFactory::description());
     2233#ifdef USE_GUI_QT
     2234      UIFactory::registerFactory(new QTUIFactory::description());
     2235      UIFactory::makeUserInterface("QT4");
     2236#else
     2237      cout << ESPACKVersion << endl;
    22322238      UIFactory::makeUserInterface("Text");
     2239#endif
     2240
     2241
    22332242      MainWindow *mainWindow = UIFactory::getInstance().makeMainWindow(populaters,World::getInstance().getMolecules(), configuration, World::getInstance().getPeriode(), ConfigFileName);
    22342243      mainWindow->display();
     2244
    22352245      delete mainWindow;
    22362246    }
  • src/defs.hpp

    r9cf88c r82b71a  
    8383#define STD_SEPERATOR_SPACER '-'
    8484
     85#define MOLECUILDER_NAME "Molecuilder"
     86
    8587#endif /*DEFS_HPP_*/
  • src/molecule.hpp

    r9cf88c r82b71a  
    2929#include <string>
    3030
    31 #include "defs.hpp"
     31#include "types.hpp"
    3232#include "graph.hpp"
    3333#include "stackclass.hpp"
  • src/unittests/ActionSequenceTest.cpp

    r9cf88c r82b71a  
    1313#include "Actions/Action.hpp"
    1414#include "Actions/ActionSequence.hpp"
     15#include "Actions/MakroAction.hpp"
     16#include "Actions/ActionHistory.hpp"
     17#include "Actions/ActionRegistry.hpp"
    1518
    1619#ifdef HAVE_TESTRUNNER
     
    2225// Registers the fixture into the 'registry'
    2326CPPUNIT_TEST_SUITE_REGISTRATION( ActionSequenceTest );
    24 
    25 void setUp();
    26 void tearDown();
    27 
    28 void canUndoTest();
    2927
    3028/* some neccessary stubs for tests */
     
    110108
    111109void ActionSequenceTest::setUp(){
     110  ActionHistory::init();
    112111  // create some necessary stubs used in this test
    113112  positive1 = new canUndoActionStub();
     
    134133  delete shouldNotCall2;
    135134
     135  ActionHistory::purgeInstance();
     136  ActionRegistry::purgeInstance();
    136137}
    137138
     
    209210void ActionSequenceTest::doesUndoTest(){
    210211  ActionSequence *sequence = new ActionSequence();
    211   sequence->addAction(shouldNotCall1);
    212   sequence->addAction(shouldNotCall2);
    213   sequence->addAction(shouldCall1);
    214   sequence->addAction(shouldCall2);
    215 
    216   ActionSequence::stateSet states = sequence->callAll();
    217 
    218   sequence->removeLastAction();
    219   sequence->removeLastAction();
    220 
    221   sequence->undoAll(states);
    222 
    223   CPPUNIT_ASSERT_EQUAL(true,shouldCall1->wasCalled());
    224   CPPUNIT_ASSERT_EQUAL(true,shouldCall2->wasCalled());
    225   CPPUNIT_ASSERT_EQUAL(false,shouldNotCall1->wasCalled());
    226   CPPUNIT_ASSERT_EQUAL(false,shouldNotCall2->wasCalled());
    227 
    228   delete sequence;
    229 }
    230 
    231 
     212  wasCalledActionStub *wasCalled1 = new wasCalledActionStub();
     213  wasCalledActionStub *wasCalled2 = new wasCalledActionStub();
     214  sequence->addAction(wasCalled1);
     215  sequence->addAction(wasCalled2);
     216
     217  MakroAction act("Test MakroAction",sequence,false);
     218
     219  act.call();
     220
     221  CPPUNIT_ASSERT_EQUAL(true,wasCalled1->wasCalled());
     222  CPPUNIT_ASSERT_EQUAL(true,wasCalled1->wasCalled());
     223
     224  ActionHistory::getInstance().undoLast();
     225
     226  CPPUNIT_ASSERT_EQUAL(false,wasCalled1->wasCalled());
     227  CPPUNIT_ASSERT_EQUAL(false,wasCalled1->wasCalled());
     228
     229}
     230
     231
  • src/unittests/Makefile.am

    r9cf88c r82b71a  
    44AM_CXXFLAGS = $(CPPUNIT_CFLAGS)
    55
    6 MENUTESTS = ActionSequenceTest
     6MENUTESTS = ActionSequenceTest
     7
    78
    89TESTS = \
     
    3637  ${MENUTESTS}
    3738 
    38 
    39      
    40  
     39 
    4140check_PROGRAMS = $(TESTS)
    4241noinst_PROGRAMS = $(TESTS) TestRunner
  • src/vector.cpp

    r9cf88c r82b71a  
    2020#include <gsl/gsl_permutation.h>
    2121#include <gsl/gsl_vector.h>
     22
     23#include <cassert>
    2224
    2325/************************************ Functions for class vector ************************************/
     
    659661  return x;
    660662};
     663
     664Vector& Vector::operator=(const Vector& src) {
     665  CopyVector(src);
     666  return *this;
     667}
     668
     669double& Vector::operator[](int i){
     670  assert(i<NDIM && "Invalid Vector dimension requested");
     671  return x[i];
     672}
    661673
    662674/** Prints a 3dim vector.
  • src/vector.hpp

    r9cf88c r82b71a  
    8080  void WrapPeriodically(const double * const M, const double * const Minv);
    8181
     82  Vector& operator=(const Vector &src);
     83  double& operator[](int i);
     84
    8285};
    8386
Note: See TracChangeset for help on using the changeset viewer.