source: src/UIElements/Qt4/InstanceBoard/QtObservedAtom.cpp@ b4bd0e

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 b4bd0e was ee3fb8, checked in by Frederik Heber <heber@…>, 10 years ago

QtObservedAtom uses new index internally.

  • thus we don't have to jump through the loops with constructing prior an IndexGetter in initObservedValues().
  • Property mode set to 100644
File size: 15.0 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{
[ee3fb8]108 boost::function<void (ObservedValue_Index_t)> atomSubjectKilled(
[62a0ee]109 boost::bind(&QtObservedAtom::countValuesSubjectKilled,
110 boost::ref(*this),
[ee3fb8]111 boost::bind(&QtObservedAtom::getIndex, boost::ref(*this))));
[62a0ee]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{
[ee3fb8]119 boost::any_cast<ObservedValue_wCallback<atomId_t, ObservedValue_Index_t> *>(ObservedValues[AtomIndex])->noteCallBackIsGone();
120 boost::any_cast<ObservedValue_wCallback<ListOfBonds_t, ObservedValue_Index_t> *>(ObservedValues[AtomBonds])->noteCallBackIsGone();
121 boost::any_cast<ObservedValue_wCallback<atomicNumber_t, ObservedValue_Index_t> *>(ObservedValues[AtomElement])->noteCallBackIsGone();
122 boost::any_cast<ObservedValue_wCallback<QtObservedMolecule*, ObservedValue_Index_t> *>(ObservedValues[AtomMolecule])->noteCallBackIsGone();
123 boost::any_cast<ObservedValue_wCallback<std::string, ObservedValue_Index_t> *>(ObservedValues[AtomName])->noteCallBackIsGone();
124 boost::any_cast<ObservedValue_wCallback<Vector, ObservedValue_Index_t> *>(ObservedValues[AtomPosition])->noteCallBackIsGone();
125 boost::any_cast<ObservedValue_wCallback<bool, ObservedValue_Index_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
[ee3fb8]231 checkForRemoval(getIndex());
[62a0ee]232}
233
[ee3fb8]234void QtObservedAtom::countValuesSubjectKilled(ObservedValue_Index_t _id)
[62a0ee]235{
[ee3fb8]236 ASSERT( _id == getIndex(),
237 "QtObservedAtom::countValuesSubjectKilled() - atom "+toString(getIndex())
[62a0ee]238 +" received countValuesSubjectKilled for atom id "+toString(_id)+".");
239
240 ++subjectKilledCount;
241
[ee3fb8]242 checkForRemoval(_id);
[62a0ee]243}
244
245#ifdef HAVE_INLINE
246inline
247#endif
[ee3fb8]248void QtObservedAtom::checkForRemoval(ObservedValue_Index_t _id)
[62a0ee]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) {
[ee3fb8]257 board.markObservedAtomAsDisconnected(_id);
258 board.markObservedAtomForErase(_id);
[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,
[ee3fb8]334 const boost::function<void(ObservedValue_Index_t)> &_subjectKilled)
[65c323]335{
336 ASSERT( _ObservedValues.size() == MAX_ObservedTypes,
337 "QtObservedAtom::initObservedValues() - given ObservedValues has not correct size.");
338
339 // fill ObservedValues: index first
[ee3fb8]340 const boost::function<ObservedValue_Index_t ()> IndexGetter =
341 boost::bind(&QtObservedAtom::getIndex,
342 boost::cref(*this));
[65c323]343
344 // fill ObservedValues: then all the other that need index
[ee3fb8]345 const boost::function<atomId_t ()> AtomIndexUpdater(
346 boost::bind(&QtObservedAtom::updateIndex, boost::cref(*_atomref)));
[65c323]347 const boost::function<ListOfBonds_t ()> AtomBondsUpdater(
[f35f7e]348 boost::bind(&QtObservedAtom::updateBonds, boost::cref(*_atomref)));
[fe493f]349 const boost::function<atomicNumber_t ()> AtomElementUpdater(
[f35f7e]350 boost::bind(&QtObservedAtom::updateElement, boost::cref(*_atomref)));
[1187c5]351 const boost::function<QtObservedMolecule* ()> AtomMoleculeUpdater(
[f35f7e]352 boost::bind(&QtObservedAtom::updateMoleculeIndex, this, boost::cref(*_atomref)));
[fe493f]353 const boost::function<std::string ()> AtomNameUpdater(
[f35f7e]354 boost::bind(&QtObservedAtom::updateName, boost::cref(*_atomref)));
[fe493f]355 const boost::function<Vector ()> AtomPositionUpdater(
[f35f7e]356 boost::bind(&QtObservedAtom::updatePosition, boost::cref(*_atomref)));
[9e9100]357 const boost::function<bool ()> AtomSelectedUpdater(
[f35f7e]358 boost::bind(&QtObservedAtom::updateSelected, boost::cref(*_atomref)));
[65c323]359
[ee3fb8]360 _ObservedValues[AtomIndex] = new ObservedValue_wCallback<atomId_t, ObservedValue_Index_t>(
361 _atomref,
362 AtomIndexUpdater,
363 "AtomIndex_"+toString(_id),
364 _id,
365 AtomIndexChannels,
366 _subjectKilled,
367 IndexGetter);
368 _ObservedValues[AtomBonds] = new ObservedValue_wCallback<ListOfBonds_t, ObservedValue_Index_t>(
[65c323]369 _atomref,
[fe493f]370 AtomBondsUpdater,
371 "AtomBonds_"+toString(_id),
372 AtomBondsUpdater(),
373 AtomBondsChannels,
[65c323]374 _subjectKilled,
[ee3fb8]375 IndexGetter);
376 _ObservedValues[AtomElement] = new ObservedValue_wCallback<atomicNumber_t, ObservedValue_Index_t>(
[65c323]377 _atomref,
378 AtomElementUpdater,
379 "AtomElement"+toString(_id),
380 AtomElementUpdater(),
381 AtomElementChannels,
382 _subjectKilled,
[ee3fb8]383 IndexGetter);
384 _ObservedValues[AtomMolecule] = new ObservedValue_wCallback<QtObservedMolecule*, ObservedValue_Index_t>(
[65c323]385 _atomref,
[1187c5]386 AtomMoleculeUpdater,
387 "AtomMolecule"+toString(_id),
388 AtomMoleculeUpdater(),
389 AtomMoleculeChannels,
[fe493f]390 _subjectKilled,
[ee3fb8]391 IndexGetter);
392 _ObservedValues[AtomName] = new ObservedValue_wCallback<std::string, ObservedValue_Index_t>(
[fe493f]393 _atomref,
394 AtomNameUpdater,
395 "AtomName"+toString(_id),
396 AtomNameUpdater(),
397 AtomNameChannels,
398 _subjectKilled,
[ee3fb8]399 IndexGetter);
400 _ObservedValues[AtomPosition] = new ObservedValue_wCallback<Vector, ObservedValue_Index_t>(
[fe493f]401 _atomref,
402 AtomPositionUpdater,
403 "AtomPosition_"+toString(_id),
404 AtomPositionUpdater(),
405 AtomPositionChannels,
[65c323]406 _subjectKilled,
[ee3fb8]407 IndexGetter);
408 _ObservedValues[AtomSelected] = new ObservedValue_wCallback<bool, ObservedValue_Index_t>(
[9e9100]409 _atomref,
410 AtomSelectedUpdater,
411 "AtomSelected_"+toString(_id),
412 AtomSelectedUpdater(),
413 AtomSelectedChannels,
414 _subjectKilled,
[ee3fb8]415 IndexGetter);
[65c323]416}
417
418void QtObservedAtom::destroyObservedValues(
419 std::vector<boost::any> &_ObservedValues)
420{
[ee3fb8]421 delete boost::any_cast<ObservedValue_wCallback<atomId_t, ObservedValue_Index_t> *>(_ObservedValues[AtomIndex]);
422 delete boost::any_cast<ObservedValue_wCallback<ListOfBonds_t, ObservedValue_Index_t> *>(_ObservedValues[AtomBonds]);
423 delete boost::any_cast<ObservedValue_wCallback<atomicNumber_t, ObservedValue_Index_t> *>(_ObservedValues[AtomElement]);
424 delete boost::any_cast<ObservedValue_wCallback<QtObservedMolecule*, ObservedValue_Index_t> *>(_ObservedValues[AtomMolecule]);
425 delete boost::any_cast<ObservedValue_wCallback<std::string, ObservedValue_Index_t> *>(_ObservedValues[AtomName]);
426 delete boost::any_cast<ObservedValue_wCallback<Vector, ObservedValue_Index_t> *>(_ObservedValues[AtomPosition]);
427 delete boost::any_cast<ObservedValue_wCallback<bool, ObservedValue_Index_t> *>(_ObservedValues[AtomSelected]);
[65c323]428 _ObservedValues.clear();
429}
430
[59eabc]431ObservedValue_Index_t QtObservedAtom::getIndex() const
432{
433 ASSERT( owner != NULL,
434 "QtObservedAtom::getIndex() - index is NULL");
435 return owner;
436}
437
[3b9aa1]438const atomId_t& QtObservedAtom::getAtomIndex() const
[65c323]439{
[ee3fb8]440 return boost::any_cast<ObservedValue_wCallback<atomId_t, ObservedValue_Index_t> *>(ObservedValues[AtomIndex])->get();
[65c323]441}
442
[3b9aa1]443const QtObservedAtom::ListOfBonds_t& QtObservedAtom::getAtomBonds() const
[65c323]444{
[ee3fb8]445 return boost::any_cast<ObservedValue_wCallback<ListOfBonds_t, ObservedValue_Index_t> *>(ObservedValues[AtomBonds])->get();
[65c323]446}
447
[3b9aa1]448const atomicNumber_t& QtObservedAtom::getAtomElement() const
[65c323]449{
[ee3fb8]450 return boost::any_cast<ObservedValue_wCallback<atomicNumber_t, ObservedValue_Index_t> *>(ObservedValues[AtomElement])->get();
[65c323]451}
452
[1187c5]453QtObservedMolecule* const QtObservedAtom::getAtomMolecule() const
[65c323]454{
[ee3fb8]455 return boost::any_cast<ObservedValue_wCallback<QtObservedMolecule*, ObservedValue_Index_t> *>(ObservedValues[AtomMolecule])->get();
[fe493f]456}
457
[3b9aa1]458const std::string& QtObservedAtom::getAtomName() const
[fe493f]459{
[ee3fb8]460 return boost::any_cast<ObservedValue_wCallback<std::string, ObservedValue_Index_t> *>(ObservedValues[AtomName])->get();
[fe493f]461}
462
[3b9aa1]463const Vector& QtObservedAtom::getAtomPosition() const
[fe493f]464{
[ee3fb8]465 return boost::any_cast<ObservedValue_wCallback<Vector, ObservedValue_Index_t> *>(ObservedValues[AtomPosition])->get();
[65c323]466}
[9e9100]467
468const bool QtObservedAtom::getAtomSelected() const
469{
[ee3fb8]470 return boost::any_cast<ObservedValue_wCallback<bool, ObservedValue_Index_t> *>(ObservedValues[AtomSelected])->get();
[9e9100]471}
Note: See TracBrowser for help on using the repository browser.