| 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 | * QtObservedInstanceBoard.cpp
|
|---|
| 25 | *
|
|---|
| 26 | * Created on: Oct 17, 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 "QtObservedInstanceBoard.hpp"
|
|---|
| 37 |
|
|---|
| 38 | #include <QtCore/QMetaType>
|
|---|
| 39 |
|
|---|
| 40 | #include "UIElements/Qt4/InstanceBoard/QtObservedAtom.hpp"
|
|---|
| 41 | #include "UIElements/Qt4/InstanceBoard/QtObservedMolecule.hpp"
|
|---|
| 42 |
|
|---|
| 43 | #include "CodePatterns/MemDebug.hpp"
|
|---|
| 44 |
|
|---|
| 45 | #include <boost/bind.hpp>
|
|---|
| 46 |
|
|---|
| 47 | #include "CodePatterns/Log.hpp"
|
|---|
| 48 |
|
|---|
| 49 | #include "Atom/atom.hpp"
|
|---|
| 50 | #include "Descriptors/AtomIdDescriptor.hpp"
|
|---|
| 51 | #include "Descriptors/MoleculeIdDescriptor.hpp"
|
|---|
| 52 | #include "molecule.hpp"
|
|---|
| 53 | #include "UIElements/Qt4/InstanceBoard/ObservedValuesContainer_impl.hpp"
|
|---|
| 54 | #include "World.hpp"
|
|---|
| 55 |
|
|---|
| 56 | QtObservedInstanceBoard::QtObservedInstanceBoard(QWidget * _parent) :
|
|---|
| 57 | QWidget(_parent),
|
|---|
| 58 | Observer("QtObservedInstanceBoard"),
|
|---|
| 59 | WorldSignedOn(false),
|
|---|
| 60 | atomObservedValues(
|
|---|
| 61 | "atom",
|
|---|
| 62 | *this,
|
|---|
| 63 | boost::bind(&QtObservedInstanceBoard::atomcountsubjectKilled, this, _1)),
|
|---|
| 64 | moleculeObservedValues(
|
|---|
| 65 | "molecule",
|
|---|
| 66 | *this,
|
|---|
| 67 | boost::bind(&QtObservedInstanceBoard::moleculecountsubjectKilled, this, _1)),
|
|---|
| 68 | atomSubjectKilled(
|
|---|
| 69 | boost::bind(&ObservedValuesContainer<QtObservedAtom, atomId_t>::countsubjectKilled,
|
|---|
| 70 | boost::ref(atomObservedValues),
|
|---|
| 71 | _1)),
|
|---|
| 72 | moleculeSubjectKilled(
|
|---|
| 73 | boost::bind(&ObservedValuesContainer<QtObservedMolecule, moleculeId_t>::countsubjectKilled,
|
|---|
| 74 | boost::ref(moleculeObservedValues),
|
|---|
| 75 | _1)),
|
|---|
| 76 | lastremovedatom((atomId_t)-1),
|
|---|
| 77 | lastremovedatomsmolecule( std::make_pair((moleculeId_t)-1,(atomId_t)-1) ),
|
|---|
| 78 | lastremovedmolecule((moleculeId_t)-1)
|
|---|
| 79 | {
|
|---|
| 80 | qRegisterMetaType<QtObservedAtom::ptr>("QtObservedAtom::ptr");
|
|---|
| 81 | qRegisterMetaType<QtObservedMolecule::ptr>("QtObservedMolecule::ptr");
|
|---|
| 82 |
|
|---|
| 83 | // be first (besides ObservedValues to know about new insertions)
|
|---|
| 84 | World::getInstance().signOn(this, World::AtomInserted, GlobalObservableInfo::PriorityLevel(int(-10)));
|
|---|
| 85 | World::getInstance().signOn(this, World::AtomRemoved, GlobalObservableInfo::PriorityLevel(int(-10)));
|
|---|
| 86 | World::getInstance().signOn(this, World::MoleculeInserted, GlobalObservableInfo::PriorityLevel(int(-10)));
|
|---|
| 87 | World::getInstance().signOn(this, World::MoleculeRemoved, GlobalObservableInfo::PriorityLevel(int(-10)));
|
|---|
| 88 | WorldSignedOn = true;
|
|---|
| 89 | }
|
|---|
| 90 |
|
|---|
| 91 | QtObservedInstanceBoard::~QtObservedInstanceBoard()
|
|---|
| 92 | {
|
|---|
| 93 | if (WorldSignedOn) {
|
|---|
| 94 | World::getInstance().signOff(this, World::AtomInserted);
|
|---|
| 95 | World::getInstance().signOff(this, World::AtomRemoved);
|
|---|
| 96 | World::getInstance().signOff(this, World::MoleculeInserted);
|
|---|
| 97 | World::getInstance().signOff(this, World::MoleculeRemoved);
|
|---|
| 98 | }
|
|---|
| 99 | // sign off from all remaining molecules and atoms
|
|---|
| 100 | for (SignedOn_t::iterator iter = AtomSignedOn.begin(); !AtomSignedOn.empty();
|
|---|
| 101 | iter = AtomSignedOn.begin()) {
|
|---|
| 102 | (*iter)->signOff(this, atom::IndexChanged);
|
|---|
| 103 | AtomSignedOn.erase(iter);
|
|---|
| 104 | }
|
|---|
| 105 |
|
|---|
| 106 | for (SignedOn_t::iterator iter = MoleculeSignedOn.begin(); !MoleculeSignedOn.empty();
|
|---|
| 107 | iter = MoleculeSignedOn.begin()) {
|
|---|
| 108 | (*iter)->signOff(this, molecule::IndexChanged);
|
|---|
| 109 | (*iter)->signOff(this, molecule::AtomInserted);
|
|---|
| 110 | (*iter)->signOff(this, molecule::AtomRemoved);
|
|---|
| 111 | MoleculeSignedOn.erase(*iter); //erase all instances
|
|---|
| 112 | }
|
|---|
| 113 | }
|
|---|
| 114 |
|
|---|
| 115 | void QtObservedInstanceBoard::update(Observable *publisher)
|
|---|
| 116 | {
|
|---|
| 117 | ASSERT(0,
|
|---|
| 118 | "QtObservedInstanceBoard::update() - we are not signed on to general updates.");
|
|---|
| 119 | }
|
|---|
| 120 |
|
|---|
| 121 | void QtObservedInstanceBoard::subjectKilled(Observable *publisher)
|
|---|
| 122 | {
|
|---|
| 123 | SignedOn_t::iterator iter = AtomSignedOn.find(publisher);
|
|---|
| 124 | if ( iter != AtomSignedOn.end()) {
|
|---|
| 125 | LOG(3, "DEBUG: InstanceBoard got subjectKilled() from atom " << publisher);
|
|---|
| 126 | AtomSignedOn.erase(iter);
|
|---|
| 127 | } else {
|
|---|
| 128 | iter = MoleculeSignedOn.find(publisher);
|
|---|
| 129 | if ( iter != MoleculeSignedOn.end()) {
|
|---|
| 130 | LOG(3, "DEBUG: InstanceBoard got subjectKilled() from molecule " << publisher);
|
|---|
| 131 | MoleculeSignedOn.erase(iter);
|
|---|
| 132 | } else {
|
|---|
| 133 | ASSERT(0,
|
|---|
| 134 | "QtObservedInstanceBoard::subjectKilled() - could not find signedOn for atom/molecule "+toString(publisher));
|
|---|
| 135 | }
|
|---|
| 136 | }
|
|---|
| 137 | }
|
|---|
| 138 |
|
|---|
| 139 | void QtObservedInstanceBoard::recieveNotification(Observable *publisher, Notification_ptr notification)
|
|---|
| 140 | {
|
|---|
| 141 | if (static_cast<World *>(publisher) == World::getPointer()) {
|
|---|
| 142 | switch (notification->getChannelNo()) {
|
|---|
| 143 | case World::MoleculeInserted:
|
|---|
| 144 | {
|
|---|
| 145 | const moleculeId_t _id = const_cast<const World &>(World::getInstance()).lastChangedMolId();
|
|---|
| 146 | #ifdef LOG_OBSERVER
|
|---|
| 147 | observerLog().addMessage() << "++ Observer " << observerLog().getName(static_cast<Observer *>(this)) << " received notification that molecule "+toString(_id)+" has been inserted.";
|
|---|
| 148 | #endif
|
|---|
| 149 | LOG(3, "DEBUG: InformationBoard got moleculeInserted signal for molecule " << _id);
|
|---|
| 150 | const molecule * const _molecule = const_cast<const World &>(World::getInstance()).
|
|---|
| 151 | getMolecule(MoleculeById(_id));
|
|---|
| 152 | if (_molecule != NULL) {
|
|---|
| 153 | ObservedValues_t ObservedValues(QtObservedMolecule::MAX_ObservedTypes);
|
|---|
| 154 | LOG(3, "DEBUG: InformationBoard initializes ObservedValues for molecule " << _id);
|
|---|
| 155 | QtObservedMolecule::initObservedValues(
|
|---|
| 156 | ObservedValues,
|
|---|
| 157 | _id,
|
|---|
| 158 | _molecule,
|
|---|
| 159 | moleculeSubjectKilled);
|
|---|
| 160 | QtObservedMolecule::ptr observedmolecule(new QtObservedMolecule(ObservedValues, *this));
|
|---|
| 161 | moleculeObservedValues.insert(_id, observedmolecule);
|
|---|
| 162 | // we need to check for index changes
|
|---|
| 163 | LOG(3, "DEBUG: InformationBoard signOn()s to molecule " << _id);
|
|---|
| 164 | _molecule->signOn(this, molecule::IndexChanged);
|
|---|
| 165 | MoleculeSignedOn.insert( static_cast<Observable *>(const_cast<molecule *>(_molecule)) );
|
|---|
| 166 | _molecule->signOn(this, molecule::AtomInserted);
|
|---|
| 167 | MoleculeSignedOn.insert( static_cast<Observable *>(const_cast<molecule *>(_molecule)) );
|
|---|
| 168 | _molecule->signOn(this, molecule::AtomRemoved);
|
|---|
| 169 | MoleculeSignedOn.insert( static_cast<Observable *>(const_cast<molecule *>(_molecule)) );
|
|---|
| 170 |
|
|---|
| 171 | emit moleculeInserted(_id);
|
|---|
| 172 | } else {
|
|---|
| 173 | ELOG(1, "QtObservedInstanceBoard got MoleculeInserted for unknown molecule id " << _id);
|
|---|
| 174 | }
|
|---|
| 175 | break;
|
|---|
| 176 | }
|
|---|
| 177 | case World::MoleculeRemoved:
|
|---|
| 178 | {
|
|---|
| 179 | const moleculeId_t _id = const_cast<const World &>(World::getInstance()).lastChangedMolId();
|
|---|
| 180 | LOG(3, "DEBUG: InformationBoard got MoleculeRemoved signal for molecule " << _id);
|
|---|
| 181 | // note down such that ObservedValues are simply dropped
|
|---|
| 182 | lastremovedmolecule = _id;
|
|---|
| 183 | break;
|
|---|
| 184 | }
|
|---|
| 185 | case World::AtomInserted:
|
|---|
| 186 | {
|
|---|
| 187 | const atomId_t _id = const_cast<const World &>(World::getInstance()).lastChangedAtomId();
|
|---|
| 188 | #ifdef LOG_OBSERVER
|
|---|
| 189 | observerLog().addMessage() << "++ Observer " << observerLog().getName(static_cast<Observer *>(this)) << " received notification that atom "+toString(_id)+" has been inserted.";
|
|---|
| 190 | #endif
|
|---|
| 191 | LOG(3, "DEBUG: InformationBoard got atomInserted signal for atom " << _id);
|
|---|
| 192 | const atom * const _atom = const_cast<const World &>(World::getInstance()).
|
|---|
| 193 | getAtom(AtomById(_id));
|
|---|
| 194 | if (_atom!= NULL) {
|
|---|
| 195 | ObservedValues_t ObservedValues(QtObservedAtom::MAX_ObservedTypes);
|
|---|
| 196 | LOG(3, "DEBUG: InformationBoard initializes ObservedValues for atom " << _id);
|
|---|
| 197 | QtObservedAtom::initObservedValues(
|
|---|
| 198 | ObservedValues,
|
|---|
| 199 | _id,
|
|---|
| 200 | _atom,
|
|---|
| 201 | atomSubjectKilled);
|
|---|
| 202 | QtObservedAtom::ptr observedatom(new QtObservedAtom(ObservedValues, *this));
|
|---|
| 203 | atomObservedValues.insert(_id, observedatom);
|
|---|
| 204 | // we need to check for index changes
|
|---|
| 205 | LOG(3, "DEBUG: InformationBoard signOn()s to atom " << _id);
|
|---|
| 206 | _atom->signOn(this, atom::IndexChanged);
|
|---|
| 207 | AtomSignedOn.insert( static_cast<Observable *>(const_cast<atom *>(_atom)) );
|
|---|
| 208 | emit atomInserted(observedatom->getAtomMoleculeIndex(), observedatom->getAtomIndex());
|
|---|
| 209 | } else {
|
|---|
| 210 | ELOG(1, "QtObservedInstanceBoard got AtomInserted for unknown atom id " << _id);
|
|---|
| 211 | }
|
|---|
| 212 | break;
|
|---|
| 213 | }
|
|---|
| 214 | case World::AtomRemoved:
|
|---|
| 215 | {
|
|---|
| 216 | const atomId_t _id = const_cast<const World &>(World::getInstance()).lastChangedAtomId();
|
|---|
| 217 | LOG(3, "DEBUG: InformationBoard got AtomRemoved signal for atom " << _id);
|
|---|
| 218 | // note down such that ObservedValues are simply dropped
|
|---|
| 219 | lastremovedatom = _id;
|
|---|
| 220 | break;
|
|---|
| 221 | }
|
|---|
| 222 | default:
|
|---|
| 223 | ASSERT(0, "QtObservedInstanceBoard::recieveNotification() - we cannot get here for World.");
|
|---|
| 224 | break;
|
|---|
| 225 | }
|
|---|
| 226 | } else if (dynamic_cast<molecule *>(publisher) != NULL) {
|
|---|
| 227 | const moleculeId_t molid = const_cast<const World &>(World::getInstance()).lastChangedMolId();
|
|---|
| 228 | switch (notification->getChannelNo()) {
|
|---|
| 229 | case molecule::AtomInserted:
|
|---|
| 230 | {
|
|---|
| 231 | const molecule * const _molecule = const_cast<const World &>(World::getInstance()).
|
|---|
| 232 | getMolecule(MoleculeById(molid));
|
|---|
| 233 | if (_molecule != NULL) {
|
|---|
| 234 | const atomId_t atomid = const_cast<const molecule *>(_molecule)->lastChangedAtomId();
|
|---|
| 235 | LOG(3, "DEBUG: InformationBoard got AtomInserted signal for atom "
|
|---|
| 236 | << atomid << " from molecule " << molid);
|
|---|
| 237 | // check whether atom's observedvalues are present
|
|---|
| 238 | ASSERT( atomObservedValues.isPresent(atomid),
|
|---|
| 239 | "QtObservedInstanceBoard::recieveNotification() - ObservedValues for atom "
|
|---|
| 240 | +toString(atomid)+" are not present yet.");
|
|---|
| 241 | // and emit
|
|---|
| 242 | emit atomInserted(molid, atomid);
|
|---|
| 243 | } else {
|
|---|
| 244 | ELOG(2, "QtObservedInstanceBoard::recieveNotification() - molecule "
|
|---|
| 245 | << molid << " has disappeared.");
|
|---|
| 246 | }
|
|---|
| 247 | break;
|
|---|
| 248 | }
|
|---|
| 249 | case molecule::AtomRemoved:
|
|---|
| 250 | {
|
|---|
| 251 | const molecule * const _molecule = const_cast<const World &>(World::getInstance()).
|
|---|
| 252 | getMolecule(MoleculeById(molid));
|
|---|
| 253 | if (_molecule != NULL) {
|
|---|
| 254 | const atomId_t atomid = const_cast<const molecule *>(_molecule)->lastChangedAtomId();
|
|---|
| 255 | LOG(3, "DEBUG: InformationBoard got AtomRemoved signal for atom "
|
|---|
| 256 | << atomid << " from molecule " << molid);
|
|---|
| 257 | lastremovedatomsmolecule = std::make_pair(molid, atomid);
|
|---|
| 258 | }
|
|---|
| 259 | break;
|
|---|
| 260 | }
|
|---|
| 261 | case molecule::IndexChanged:
|
|---|
| 262 | {
|
|---|
| 263 | // molecule has changed its index
|
|---|
| 264 | const moleculeId_t newmoleculeId = dynamic_cast<molecule *>(publisher)->getId();
|
|---|
| 265 | LOG(3, "DEBUG: InformationBoard got IndexChanged from molecule " << molid << " to " << newmoleculeId);
|
|---|
| 266 | #ifndef NDEBUG
|
|---|
| 267 | bool status =
|
|---|
| 268 | #endif
|
|---|
| 269 | moleculeObservedValues.changeIdentifier(molid, newmoleculeId);
|
|---|
| 270 | ASSERT( status,
|
|---|
| 271 | "QtObservedInstanceBoard::recieveNotification() - cannot change molecule's id "
|
|---|
| 272 | +toString(molid)+" "+toString(newmoleculeId)+" in moleculeObservedValues.");
|
|---|
| 273 | // no need update SignedOn, ref does not change
|
|---|
| 274 | emit moleculeIndexChanged(molid, newmoleculeId);
|
|---|
| 275 | break;
|
|---|
| 276 | }
|
|---|
| 277 | default:
|
|---|
| 278 | ASSERT(0, "QtObservedInstanceBoard::recieveNotification() - we cannot get here.");
|
|---|
| 279 | break;
|
|---|
| 280 | }
|
|---|
| 281 | } else if (dynamic_cast<atom *>(publisher) != NULL) {
|
|---|
| 282 | const atomId_t oldatomId = const_cast<const World &>(World::getInstance()).lastChangedAtomId();
|
|---|
| 283 | switch (notification->getChannelNo()) {
|
|---|
| 284 | case AtomObservable::IndexChanged:
|
|---|
| 285 | {
|
|---|
| 286 | const atomId_t newatomId = dynamic_cast<atom *>(publisher)->getId();
|
|---|
| 287 | LOG(3, "DEBUG: InformationBoard got IndexChanged from atom " << oldatomId << " to " << newatomId);
|
|---|
| 288 | #ifndef NDEBUG
|
|---|
| 289 | bool status =
|
|---|
| 290 | #endif
|
|---|
| 291 | atomObservedValues.changeIdentifier(oldatomId, newatomId);
|
|---|
| 292 | ASSERT( status,
|
|---|
| 293 | "QtObservedInstanceBoard::recieveNotification() - cannot change atom's id "
|
|---|
| 294 | +toString(oldatomId)+" "+toString(newatomId)+" in atomObservedValues.");
|
|---|
| 295 | // changed insertion delayed
|
|---|
| 296 | atomInsertionDelayed_t::iterator iter = atomInsertionDelayed.find(oldatomId);
|
|---|
| 297 | if (iter != atomInsertionDelayed.end()) {
|
|---|
| 298 | const moleculeId_t molid = iter->second;
|
|---|
| 299 | atomInsertionDelayed.erase(iter);
|
|---|
| 300 | #ifndef NDEBUG
|
|---|
| 301 | std::pair<atomInsertionDelayed_t::iterator, bool> inserter =
|
|---|
| 302 | #endif
|
|---|
| 303 | atomInsertionDelayed.insert( std::make_pair(newatomId, molid) );
|
|---|
| 304 | ASSERT( inserter.second,
|
|---|
| 305 | "QtObservedInstanceBoard::recieveNotification() - id "
|
|---|
| 306 | +toString(newatomId)+" already present in atomInsertionDelayed.");
|
|---|
| 307 | }
|
|---|
| 308 | // no need update SignedOn, ref does not change
|
|---|
| 309 | emit atomIndexChanged(oldatomId, newatomId);
|
|---|
| 310 | break;
|
|---|
| 311 | }
|
|---|
| 312 | default:
|
|---|
| 313 | ASSERT(0, "QtObservedInstanceBoard::recieveNotification() - we cannot get here.");
|
|---|
| 314 | break;
|
|---|
| 315 | }
|
|---|
| 316 | } else {
|
|---|
| 317 | ASSERT(0, "QtObservedInstanceBoard::recieveNotification() - notification from unknown source.");
|
|---|
| 318 | }
|
|---|
| 319 | }
|
|---|
| 320 |
|
|---|
| 321 | void QtObservedInstanceBoard::atomcountsubjectKilled(const atomId_t _atomid)
|
|---|
| 322 | {
|
|---|
| 323 | if ((_atomid == lastremovedatomsmolecule.second) && (_atomid == lastremovedatom)) {
|
|---|
| 324 | LOG(3, "DEBUG: InstanceBoard emits atomRemoved for " << _atomid);
|
|---|
| 325 | emit atomRemoved(lastremovedatomsmolecule.first, lastremovedatomsmolecule.second);
|
|---|
| 326 | } else
|
|---|
| 327 | ELOG(2, "QtObservedInstanceBoard::atomcountsubjectKilled() - id " << _atomid
|
|---|
| 328 | << " not fitting with " << lastremovedatomsmolecule << " or " << lastremovedatom);
|
|---|
| 329 | }
|
|---|
| 330 |
|
|---|
| 331 | void QtObservedInstanceBoard::moleculecountsubjectKilled(const moleculeId_t _molid)
|
|---|
| 332 | {
|
|---|
| 333 | if (lastremovedmolecule == _molid) {
|
|---|
| 334 | LOG(3, "DEBUG: InstanceBoard emits moleculeRemoved for " << _molid);
|
|---|
| 335 | emit moleculeRemoved(_molid);
|
|---|
| 336 | } else
|
|---|
| 337 | ELOG(2, "QtObservedInstanceBoard::moleculecountsubjectKilled() - id " << _molid
|
|---|
| 338 | << " not fitting with " << lastremovedmolecule);
|
|---|
| 339 | }
|
|---|
| 340 |
|
|---|
| 341 | QtObservedAtom::ptr QtObservedInstanceBoard::getObservedAtom(const atomId_t _id)
|
|---|
| 342 | {
|
|---|
| 343 | return atomObservedValues.get(_id);
|
|---|
| 344 | }
|
|---|
| 345 |
|
|---|
| 346 | QtObservedMolecule::ptr QtObservedInstanceBoard::getObservedMolecule(const moleculeId_t _id)
|
|---|
| 347 | {
|
|---|
| 348 | return moleculeObservedValues.get(_id);
|
|---|
| 349 | }
|
|---|
| 350 |
|
|---|
| 351 | void QtObservedInstanceBoard::markObservedAtomAsConnected(const atomId_t _id)
|
|---|
| 352 | {
|
|---|
| 353 | atomObservedValues.markObservedValuesAsConnected(_id);
|
|---|
| 354 | }
|
|---|
| 355 |
|
|---|
| 356 | void QtObservedInstanceBoard::markObservedAtomAsDisconnected(const atomId_t _id)
|
|---|
| 357 | {
|
|---|
| 358 | atomObservedValues.markObservedValuesAsDisconnected(_id);
|
|---|
| 359 | }
|
|---|
| 360 |
|
|---|
| 361 | void QtObservedInstanceBoard::markObservedAtomForErase(const atomId_t _id)
|
|---|
| 362 | {
|
|---|
| 363 | atomObservedValues.eraseObservedValues(_id);
|
|---|
| 364 | }
|
|---|
| 365 |
|
|---|
| 366 | void QtObservedInstanceBoard::markObservedMoleculeAsConnected(const moleculeId_t _id)
|
|---|
| 367 | {
|
|---|
| 368 | moleculeObservedValues.markObservedValuesAsConnected(_id);
|
|---|
| 369 | }
|
|---|
| 370 |
|
|---|
| 371 | void QtObservedInstanceBoard::markObservedMoleculeAsDisconnected(const moleculeId_t _id)
|
|---|
| 372 | {
|
|---|
| 373 | moleculeObservedValues.markObservedValuesAsDisconnected(_id);
|
|---|
| 374 | }
|
|---|
| 375 |
|
|---|
| 376 | void QtObservedInstanceBoard::markObservedMoleculeForErase(const moleculeId_t _id)
|
|---|
| 377 | {
|
|---|
| 378 | moleculeObservedValues.eraseObservedValues(_id);
|
|---|
| 379 | }
|
|---|