source: src/UIElements/Qt4/InstanceBoard/QtObservedAtom.cpp@ 59eabc

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 Candidate_v1.7.0 Candidate_v1.7.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
Last change on this file since 59eabc was 59eabc, checked in by Frederik Heber <heber@…>, 10 years ago

Introduced unique and permanent ObservedValue_Index_t.

  • this is currently the address of the observable which is not perfectly secure but might work for the moment.
  • QtObservedInstanceBoard uses the index internally and only has an additional map to serve instances on request for the their atomId_t, moleculeId_t, .... However, this id should nowhere else be used because it may change during the lifetime of the object.
  • this should prevent the hazzle with the possibly changing atomId_t, moleculeId_t, ... in all classes that work with QtObserved... instances.
  • Property mode set to 100644
File size: 15.1 KB
RevLine 
[0070aa]1/*
2 * Project: MoleCuilder
3 * Description: creates and alters molecular systems
4 * Copyright (C) 2015 Frederik Heber. All rights reserved.
5 *
6 *
7 * This file is part of MoleCuilder.
8 *
9 * MoleCuilder is free software: you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation, either version 2 of the License, or
12 * (at your option) any later version.
13 *
14 * MoleCuilder is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with MoleCuilder. If not, see <http://www.gnu.org/licenses/>.
21 */
22
23/*
24 * QtObservedAtom.cpp
25 *
26 * Created on: Oct 28, 2015
27 * Author: heber
28 */
29
30
31// include config.h
32#ifdef HAVE_CONFIG_H
33#include <config.h>
34#endif
35
36#include "QtObservedAtom.hpp"
37
[65c323]38#include "UIElements/Qt4/InstanceBoard/QtObservedInstanceBoard.hpp"
39
[0070aa]40#include "CodePatterns/MemDebug.hpp"
41
[65c323]42#include <boost/assign.hpp>
43
44#include "Atom/atom.hpp"
45#include "Bond/bond.hpp"
46#include "Descriptors/AtomIdDescriptor.hpp"
47#include "Element/element.hpp"
48#include "World.hpp"
49
[494478]50#include "UIElements/Qt4/InstanceBoard/ObservedValue_wCallback.hpp"
[65c323]51
52using namespace boost::assign;
53
54static const Observable::channels_t getAtomBondsChannels()
55{
56 Observable::channels_t channels;
57 channels += AtomObservable::BondsAdded, AtomObservable::BondsRemoved;
58 return channels;
59}
60
61static const Observable::channels_t getAllObservedChannels()
62{
63 Observable::channels_t channels;
64 channels +=
65 AtomObservable::IndexChanged,
66 AtomObservable::BondsAdded,
[fe493f]67 AtomObservable::BondsRemoved,
68 AtomObservable::MoleculeChanged,
69 AtomObservable::NameChanged,
70 AtomObservable::ElementChanged,
[9e9100]71 AtomObservable::PositionChanged,
72 AtomObservable::SelectionChanged;
[65c323]73 return channels;
74}
75
76// static entities
77const Observable::channels_t
78QtObservedAtom::AtomIndexChannels(1, AtomObservable::IndexChanged);
79const Observable::channels_t
[fe493f]80QtObservedAtom::AtomBondsChannels(getAtomBondsChannels());
[65c323]81const Observable::channels_t
82QtObservedAtom::AtomElementChannels(1, AtomObservable::ElementChanged);
83const Observable::channels_t
[1187c5]84QtObservedAtom::AtomMoleculeChannels(1, AtomObservable::MoleculeChanged);
[fe493f]85const Observable::channels_t
86QtObservedAtom::AtomNameChannels(1, AtomObservable::NameChanged);
87const Observable::channels_t
88QtObservedAtom::AtomPositionChannels(1, AtomObservable::PositionChanged);
[9e9100]89const Observable::channels_t
90QtObservedAtom::AtomSelectedChannels(1, AtomObservable::SelectionChanged);
[65c323]91
[98c35c]92QtObservedAtom::QtObservedAtom(
[62a0ee]93 const atomId_t _id,
94 const atom * const _atom,
[65c323]95 QtObservedInstanceBoard &_board,
[98c35c]96 QWidget * _parent) :
[0070aa]97 QWidget(_parent),
[98c35c]98 Observer("QtObservedAtom"),
[65c323]99 subjectKilledCount(0),
100 AllsignedOnChannels(getAllObservedChannels().size()),
101 signedOffChannels(0),
102 owner(NULL),
[1c0961]103 oldId(_id),
[65c323]104 board(_board),
[04c3a3]105 BoardIsGone(false),
[62a0ee]106 ObservedValues(QtObservedAtom::MAX_ObservedTypes)
[65c323]107{
[62a0ee]108 boost::function<void (const atomId_t)> atomSubjectKilled(
109 boost::bind(&QtObservedAtom::countValuesSubjectKilled,
110 boost::ref(*this),
111 _1));
112 initObservedValues( ObservedValues, _id, _atom, atomSubjectKilled);
113
114 // activating Observer is done by ObservedValueContainer when it's inserted
[65c323]115}
[0070aa]116
117QtObservedAtom::~QtObservedAtom()
[65c323]118{
[04c3a3]119 boost::any_cast<ObservedValue_wCallback<atomId_t> *>(ObservedValues[AtomIndex])->noteCallBackIsGone();
120 boost::any_cast<ObservedValue_wCallback<ListOfBonds_t, atomId_t> *>(ObservedValues[AtomBonds])->noteCallBackIsGone();
121 boost::any_cast<ObservedValue_wCallback<atomicNumber_t, atomId_t> *>(ObservedValues[AtomElement])->noteCallBackIsGone();
[1187c5]122 boost::any_cast<ObservedValue_wCallback<QtObservedMolecule*, atomId_t> *>(ObservedValues[AtomMolecule])->noteCallBackIsGone();
[04c3a3]123 boost::any_cast<ObservedValue_wCallback<std::string, atomId_t> *>(ObservedValues[AtomName])->noteCallBackIsGone();
124 boost::any_cast<ObservedValue_wCallback<Vector, atomId_t> *>(ObservedValues[AtomPosition])->noteCallBackIsGone();
[9e9100]125 boost::any_cast<ObservedValue_wCallback<bool, atomId_t> *>(ObservedValues[AtomSelected])->noteCallBackIsGone();
[04c3a3]126
[65c323]127 deactivateObserver();
[c44763]128
129 destroyObservedValues(ObservedValues);
[65c323]130}
131
132const atom * const QtObservedAtom::getAtomConst(const atomId_t _id)
133{
134 const atom * const _atom = const_cast<const World &>(World::getInstance()).
135 getAtom(AtomById(_id));
136 return _atom;
137}
138
139atom * const QtObservedAtom::getAtom(const atomId_t _id)
140{
141 atom * const _atom = World::getInstance().getAtom(AtomById(_id));
142 return _atom;
143}
144
[f35f7e]145#ifdef HAVE_INLINE
146inline
147#endif
148atomId_t QtObservedAtom::updateIndex(const atom &_atomref)
[65c323]149{
[f35f7e]150 return _atomref.getId();
[65c323]151}
152
[fe493f]153QtObservedAtom::ListOfBonds_t QtObservedAtom::updateBonds(
[f35f7e]154 const atom &_atom)
[65c323]155{
[fe493f]156 ListOfBonds_t ListOfBonds;
[f35f7e]157 // make sure bonds is up-to-date
158 const BondList ListBonds = _atom.getListOfBonds();
159 for (BondList::const_iterator iter = ListBonds.begin();
160 iter != ListBonds.end();
161 ++iter)
162 ListOfBonds.insert( ListOfBonds.end(), std::make_pair(
163 (*iter)->leftatom->getId(),
164 (*iter)->rightatom->getId()) );
[fe493f]165 return ListOfBonds;
[65c323]166}
167
[f35f7e]168#ifdef HAVE_INLINE
169inline
170#endif
[65c323]171atomicNumber_t QtObservedAtom::updateElement(
[f35f7e]172 const atom &_atom)
[65c323]173{
[f35f7e]174 return _atom.getElementNo();
[65c323]175}
176
[f35f7e]177#ifdef HAVE_INLINE
178inline
179#endif
[1187c5]180QtObservedMolecule* QtObservedAtom::updateMoleculeIndex(
[f35f7e]181 const atom &_atom)
[fe493f]182{
[f35f7e]183 if (_atom.getMolecule() != NULL) {
184 const moleculeId_t molid = _atom.getMolecule()->getId();
[1187c5]185 QtObservedMolecule* mol = board.getObservedMolecule(molid).get();
186 if (mol != NULL)
187 return mol;
188 else
189 return (QtObservedMolecule*)NULL;
[fe493f]190 } else {
[1187c5]191 return (QtObservedMolecule*)NULL;
[fe493f]192 }
193}
194
[f35f7e]195#ifdef HAVE_INLINE
196inline
197#endif
[fe493f]198std::string QtObservedAtom::updateName(
[f35f7e]199 const atom &_atom)
[65c323]200{
[f35f7e]201 return _atom.getName();
[fe493f]202}
203
[f35f7e]204#ifdef HAVE_INLINE
205inline
206#endif
[fe493f]207Vector QtObservedAtom::updatePosition(
[f35f7e]208 const atom &_atom)
[fe493f]209{
[f35f7e]210 return _atom.getPosition();
[65c323]211}
[98c35c]212
[f35f7e]213#ifdef HAVE_INLINE
214inline
215#endif
[9e9100]216bool QtObservedAtom::updateSelected(
[f35f7e]217 const atom &_atom)
[9e9100]218{
[f35f7e]219 return _atom.getSelected();
[9e9100]220}
221
[98c35c]222void QtObservedAtom::update(Observable *publisher)
[65c323]223{
224 ASSERT(0, "QtObservedAtom::update() - we are not signed on for global updates.");
225}
[98c35c]226
227void QtObservedAtom::subjectKilled(Observable *publisher)
[65c323]228{
229 ++signedOffChannels;
230
[62a0ee]231 checkForRemoval();
232}
233
234void QtObservedAtom::countValuesSubjectKilled(const atomId_t _id)
235{
236 ASSERT( _id == getAtomIndex(),
237 "QtObservedAtom::countValuesSubjectKilled() - atom "+toString(getAtomIndex())
238 +" received countValuesSubjectKilled for atom id "+toString(_id)+".");
239
240 ++subjectKilledCount;
241
242 checkForRemoval();
243}
244
245#ifdef HAVE_INLINE
246inline
247#endif
248void QtObservedAtom::checkForRemoval()
249{
250 if ((signedOffChannels == AllsignedOnChannels) && (subjectKilledCount == MAX_ObservedTypes)) {
[65c323]251 // remove owner: no more signOff needed
252 owner = NULL;
253
[fe493f]254 emit atomRemoved();
[4e6ffe]255
256 if (!BoardIsGone) {
[59eabc]257 board.markObservedAtomAsDisconnected(getIndex());
258 board.markObservedAtomForErase(getIndex());
[4e6ffe]259 }
[65c323]260 }
261}
[98c35c]262
263void QtObservedAtom::recieveNotification(Observable *publisher, Notification_ptr notification)
[65c323]264{
265 // ObservedValues have been updated before, hence convert updates to Qt's signals
266 switch (notification->getChannelNo()) {
267 case AtomObservable::IndexChanged:
[1c0961]268 {
269 const atomId_t newId = getAtomIndex();
270 emit indexChanged(oldId, newId);
271 oldId = newId;
[65c323]272 break;
[1c0961]273 }
[fe493f]274 case AtomObservable::BondsAdded:
275 case AtomObservable::BondsRemoved:
276 emit bondsChanged();
[65c323]277 break;
278 case AtomObservable::ElementChanged:
279 emit elementChanged();
280 break;
[fe493f]281 case AtomObservable::MoleculeChanged:
[1187c5]282 emit moleculeChanged();
[fe493f]283 break;
284 case AtomObservable::NameChanged:
285 emit nameChanged();
286 break;
287 case AtomObservable::PositionChanged:
288 emit positionChanged();
[65c323]289 break;
[9e9100]290 case AtomObservable::SelectionChanged:
291 emit selectedChanged();
292 break;
[65c323]293 default:
294 ASSERT(0, "QtObservedAtom::recieveNotification() - we are not signed on to channel "
295 +toString(notification->getChannelNo())+" of the atom.");
296 break;
297 }
298}
299
300void QtObservedAtom::activateObserver()
301{
302 atom * atomref = getAtom(getAtomIndex());
303 if (atomref != NULL) {
304 Observable::channels_t channels = getAllObservedChannels();
305 owner = static_cast<const Observable *>(atomref);
306 for (Observable::channels_t::const_iterator iter = channels.begin();
307 iter != channels.end(); ++iter)
308 owner->signOn(this, *iter);
[04c3a3]309 if (!BoardIsGone)
[59eabc]310 board.markObservedAtomAsConnected(getIndex());
[65c323]311 } else
[04c3a3]312 signedOffChannels = AllsignedOnChannels;
[65c323]313}
314
315void QtObservedAtom::deactivateObserver()
316{
317 // sign Off
318 if (owner != NULL) {
319 Observable::channels_t channels = getAllObservedChannels();
320 for (Observable::channels_t::const_iterator iter = channels.begin();
321 iter != channels.end(); ++iter)
322 owner->signOff(this, *iter);
323 owner = NULL;
324 signedOffChannels = AllsignedOnChannels;
[04c3a3]325 if (!BoardIsGone)
[59eabc]326 board.markObservedAtomAsDisconnected(getIndex());
[65c323]327 }
328}
329
330void QtObservedAtom::initObservedValues(
331 ObservedValues_t &_ObservedValues,
332 const atomId_t _id,
333 const atom * const _atomref,
334 const boost::function<void(const atomId_t)> &_subjectKilled)
335{
336 /* This is an old note from when the code was still part of cstor's initializer body.
337 * TODO: Probably does not apply anymore but has not yet been tested.
338 *
339 * We must not use boost::cref(this) as "this" has not been properly constructed and seemingly
340 * boost::cref tries to do some magic to grasp the inheritance hierarchy which fails because
341 * the class has not been fully constructed yet. "This" itself seems to be working fine.
342 */
343
344 ASSERT( _ObservedValues.size() == MAX_ObservedTypes,
345 "QtObservedAtom::initObservedValues() - given ObservedValues has not correct size.");
346
347 // fill ObservedValues: index first
348 const boost::function<atomId_t ()> AtomIndexUpdater(
[f35f7e]349 boost::bind(&QtObservedAtom::updateIndex, boost::cref(*_atomref)));
[65c323]350
351 ObservedValue_wCallback<atomId_t> * const IndexObservable =
352 new ObservedValue_wCallback<atomId_t>(
353 _atomref,
[f35f7e]354 AtomIndexUpdater,
[65c323]355 "AtomIndex_"+toString(_id),
356 _id,
357 AtomIndexChannels,
358 _subjectKilled);
359 _ObservedValues[AtomIndex] = IndexObservable;
360
361 const boost::function<const atomId_t ()> AtomIndexGetter =
362 boost::bind(&ObservedValue_wCallback<atomId_t>::get,
363 IndexObservable);
364
365 // fill ObservedValues: then all the other that need index
366 const boost::function<ListOfBonds_t ()> AtomBondsUpdater(
[f35f7e]367 boost::bind(&QtObservedAtom::updateBonds, boost::cref(*_atomref)));
[fe493f]368 const boost::function<atomicNumber_t ()> AtomElementUpdater(
[f35f7e]369 boost::bind(&QtObservedAtom::updateElement, boost::cref(*_atomref)));
[1187c5]370 const boost::function<QtObservedMolecule* ()> AtomMoleculeUpdater(
[f35f7e]371 boost::bind(&QtObservedAtom::updateMoleculeIndex, this, boost::cref(*_atomref)));
[fe493f]372 const boost::function<std::string ()> AtomNameUpdater(
[f35f7e]373 boost::bind(&QtObservedAtom::updateName, boost::cref(*_atomref)));
[fe493f]374 const boost::function<Vector ()> AtomPositionUpdater(
[f35f7e]375 boost::bind(&QtObservedAtom::updatePosition, boost::cref(*_atomref)));
[9e9100]376 const boost::function<bool ()> AtomSelectedUpdater(
[f35f7e]377 boost::bind(&QtObservedAtom::updateSelected, boost::cref(*_atomref)));
[65c323]378
[fe493f]379 _ObservedValues[AtomBonds] = new ObservedValue_wCallback<ListOfBonds_t, atomId_t>(
[65c323]380 _atomref,
[fe493f]381 AtomBondsUpdater,
382 "AtomBonds_"+toString(_id),
383 AtomBondsUpdater(),
384 AtomBondsChannels,
[65c323]385 _subjectKilled,
386 AtomIndexGetter);
387 _ObservedValues[AtomElement] = new ObservedValue_wCallback<atomicNumber_t, atomId_t>(
388 _atomref,
389 AtomElementUpdater,
390 "AtomElement"+toString(_id),
391 AtomElementUpdater(),
392 AtomElementChannels,
393 _subjectKilled,
394 AtomIndexGetter);
[1187c5]395 _ObservedValues[AtomMolecule] = new ObservedValue_wCallback<QtObservedMolecule*, atomId_t>(
[65c323]396 _atomref,
[1187c5]397 AtomMoleculeUpdater,
398 "AtomMolecule"+toString(_id),
399 AtomMoleculeUpdater(),
400 AtomMoleculeChannels,
[fe493f]401 _subjectKilled,
402 AtomIndexGetter);
403 _ObservedValues[AtomName] = new ObservedValue_wCallback<std::string, atomId_t>(
404 _atomref,
405 AtomNameUpdater,
406 "AtomName"+toString(_id),
407 AtomNameUpdater(),
408 AtomNameChannels,
409 _subjectKilled,
410 AtomIndexGetter);
411 _ObservedValues[AtomPosition] = new ObservedValue_wCallback<Vector, atomId_t>(
412 _atomref,
413 AtomPositionUpdater,
414 "AtomPosition_"+toString(_id),
415 AtomPositionUpdater(),
416 AtomPositionChannels,
[65c323]417 _subjectKilled,
418 AtomIndexGetter);
[9e9100]419 _ObservedValues[AtomSelected] = new ObservedValue_wCallback<bool, atomId_t>(
420 _atomref,
421 AtomSelectedUpdater,
422 "AtomSelected_"+toString(_id),
423 AtomSelectedUpdater(),
424 AtomSelectedChannels,
425 _subjectKilled,
426 AtomIndexGetter);
[65c323]427}
428
429void QtObservedAtom::destroyObservedValues(
430 std::vector<boost::any> &_ObservedValues)
431{
432 delete boost::any_cast<ObservedValue_wCallback<atomId_t> *>(_ObservedValues[AtomIndex]);
433 delete boost::any_cast<ObservedValue_wCallback<ListOfBonds_t, atomId_t> *>(_ObservedValues[AtomBonds]);
[fe493f]434 delete boost::any_cast<ObservedValue_wCallback<atomicNumber_t, atomId_t> *>(_ObservedValues[AtomElement]);
[1187c5]435 delete boost::any_cast<ObservedValue_wCallback<QtObservedMolecule*, atomId_t> *>(_ObservedValues[AtomMolecule]);
[fe493f]436 delete boost::any_cast<ObservedValue_wCallback<std::string, atomId_t> *>(_ObservedValues[AtomName]);
437 delete boost::any_cast<ObservedValue_wCallback<Vector, atomId_t> *>(_ObservedValues[AtomPosition]);
[9e9100]438 delete boost::any_cast<ObservedValue_wCallback<bool, atomId_t> *>(_ObservedValues[AtomSelected]);
[65c323]439 _ObservedValues.clear();
440}
441
[59eabc]442ObservedValue_Index_t QtObservedAtom::getIndex() const
443{
444 ASSERT( owner != NULL,
445 "QtObservedAtom::getIndex() - index is NULL");
446 return owner;
447}
448
[3b9aa1]449const atomId_t& QtObservedAtom::getAtomIndex() const
[65c323]450{
451 return boost::any_cast<ObservedValue_wCallback<atomId_t> *>(ObservedValues[AtomIndex])->get();
452}
453
[3b9aa1]454const QtObservedAtom::ListOfBonds_t& QtObservedAtom::getAtomBonds() const
[65c323]455{
[fe493f]456 return boost::any_cast<ObservedValue_wCallback<ListOfBonds_t, atomId_t> *>(ObservedValues[AtomBonds])->get();
[65c323]457}
458
[3b9aa1]459const atomicNumber_t& QtObservedAtom::getAtomElement() const
[65c323]460{
461 return boost::any_cast<ObservedValue_wCallback<atomicNumber_t, atomId_t> *>(ObservedValues[AtomElement])->get();
462}
463
[1187c5]464QtObservedMolecule* const QtObservedAtom::getAtomMolecule() const
[65c323]465{
[1187c5]466 return boost::any_cast<ObservedValue_wCallback<QtObservedMolecule*, atomId_t> *>(ObservedValues[AtomMolecule])->get();
[fe493f]467}
468
[3b9aa1]469const std::string& QtObservedAtom::getAtomName() const
[fe493f]470{
471 return boost::any_cast<ObservedValue_wCallback<std::string, atomId_t> *>(ObservedValues[AtomName])->get();
472}
473
[3b9aa1]474const Vector& QtObservedAtom::getAtomPosition() const
[fe493f]475{
476 return boost::any_cast<ObservedValue_wCallback<Vector, atomId_t> *>(ObservedValues[AtomPosition])->get();
[65c323]477}
[9e9100]478
479const bool QtObservedAtom::getAtomSelected() const
480{
481 return boost::any_cast<ObservedValue_wCallback<bool, atomId_t> *>(ObservedValues[AtomSelected])->get();
482}
Note: See TracBrowser for help on using the repository browser.