LibrePCB Developers Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
serializableobjectlist.h
Go to the documentation of this file.
1 /*
2  * LibrePCB - Professional EDA for everyone!
3  * Copyright (C) 2013 LibrePCB Developers, see AUTHORS.md for contributors.
4  * https://librepcb.org/
5  *
6  * This program is free software: you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation, either version 3 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program. If not, see <http://www.gnu.org/licenses/>.
18  */
19 
20 #ifndef LIBREPCB_SERIALIZABLEOBJECTLIST_H
21 #define LIBREPCB_SERIALIZABLEOBJECTLIST_H
22 
23 /*******************************************************************************
24  * Includes
25  ******************************************************************************/
26 #include "../signalslot.h"
27 #include "../uuid.h"
28 #include "serializableobject.h"
29 
30 #include <QtCore>
31 
32 #include <memory>
33 
34 /*******************************************************************************
35  * Namespace / Forward Declarations
36  ******************************************************************************/
37 namespace librepcb {
38 
39 /*******************************************************************************
40  * Class SerializableObjectList
41  ******************************************************************************/
42 
92 template <typename T, typename P, typename... OnEditedArgs>
94  Q_DECLARE_TR_FUNCTIONS(SerializableObjectList)
95 
96 public:
97  // Iterator Types
98  template <typename I, typename O>
99  class Iterator {
100  I it;
101 
102  public:
103  Iterator() = delete;
104  Iterator(const Iterator& other) noexcept : it(other.it) {}
105  Iterator(const I& it) noexcept : it(it) {}
106  bool operator!=(const Iterator& rhs) const noexcept { return it != rhs.it; }
108  ++it;
109  return *this;
110  }
111  O& operator*() { return **it; }
112  std::shared_ptr<O> ptr() noexcept {
113  return std::const_pointer_cast<O>(*it);
114  }
116  };
117  using iterator = Iterator<typename QVector<std::shared_ptr<T>>::iterator, T>;
118  using const_iterator =
119  Iterator<typename QVector<std::shared_ptr<T>>::const_iterator, const T>;
120 
121  // Signals
122  enum class Event {
123  ElementAdded,
126  };
127  Signal<SerializableObjectList<T, P, OnEditedArgs...>, int,
128  const std::shared_ptr<const T>&, Event>
130  typedef Slot<SerializableObjectList<T, P, OnEditedArgs...>, int,
131  const std::shared_ptr<const T>&, Event>
133  Signal<SerializableObjectList<T, P, OnEditedArgs...>, int,
134  const std::shared_ptr<const T>&, OnEditedArgs...>
136  typedef Slot<SerializableObjectList<T, P, OnEditedArgs...>, int,
137  const std::shared_ptr<const T>&, OnEditedArgs...>
139 
140  // Constructors / Destructor
142  : onEdited(*this),
143  onElementEdited(*this),
145  T, P, OnEditedArgs...>::elementEditedHandler) {}
147  const SerializableObjectList<T, P, OnEditedArgs...>& other) noexcept
148  : onEdited(*this),
149  onElementEdited(*this),
151  T, P, OnEditedArgs...>::elementEditedHandler) {
152  *this = other; // copy all elements
153  }
156  : onEdited(*this),
157  onElementEdited(*this),
159  T, P, OnEditedArgs...>::elementEditedHandler) {
160  while (!other.isEmpty()) {
161  append(other.take(0)); // copy all pointers (NOT the objects!)
162  }
163  }
165  std::initializer_list<std::shared_ptr<T>> elements) noexcept
166  : onEdited(*this),
167  onElementEdited(*this),
169  T, P, OnEditedArgs...>::elementEditedHandler) {
170  foreach (const std::shared_ptr<T>& obj, elements) { append(obj); }
171  }
172  explicit SerializableObjectList(const SExpression& node)
173  : onEdited(*this),
174  onElementEdited(*this),
176  T, P, OnEditedArgs...>::elementEditedHandler) {
177  loadFromSExpression(node); // can throw
178  }
179  virtual ~SerializableObjectList() noexcept {}
180 
181  // Getters
182  bool isEmpty() const noexcept { return mObjects.empty(); }
183  int count() const noexcept { return mObjects.count(); }
184  std::vector<Uuid> getUuids() const noexcept {
185  std::vector<Uuid> uuids;
186  uuids.reserve(mObjects.count());
187  foreach (const std::shared_ptr<T>& obj, mObjects) {
188  uuids.push_back(obj->getUuid());
189  }
190  return uuids;
191  }
192  QSet<Uuid> getUuidSet() const noexcept {
193  QSet<Uuid> uuids;
194  uuids.reserve(mObjects.count());
195  foreach (const std::shared_ptr<T>& obj, mObjects) {
196  uuids.insert(obj->getUuid());
197  }
198  return uuids;
199  }
200 
201  // Element Query
202  int indexOf(const T* obj) const noexcept {
203  for (int i = 0; i < count(); ++i) {
204  if (mObjects[i].get() == obj) {
205  return i;
206  }
207  }
208  return -1;
209  }
210  int indexOf(const Uuid& key) const noexcept {
211  for (int i = 0; i < count(); ++i) {
212  if (mObjects[i]->getUuid() == key) {
213  return i;
214  }
215  }
216  return -1;
217  }
218  int indexOf(const QString& name) const noexcept {
219  for (int i = 0; i < count(); ++i) {
220  if (mObjects[i]->getName() == name) {
221  return i;
222  }
223  }
224  return -1;
225  }
226  bool contains(int index) const noexcept {
227  return index >= 0 && index < mObjects.count();
228  }
229  bool contains(const T* obj) const noexcept { return indexOf(obj) >= 0; }
230  bool contains(const Uuid& key) const noexcept { return indexOf(key) >= 0; }
231  bool contains(const QString& name) const noexcept {
232  return indexOf(name) >= 0;
233  }
234 
235  // "Soft" Element Access (null if not found)
236  std::shared_ptr<T> value(int index) noexcept { return mObjects.value(index); }
237  std::shared_ptr<const T> value(int index) const noexcept {
238  return std::const_pointer_cast<const T>(mObjects.value(index));
239  }
240  std::shared_ptr<T> find(const T* obj) noexcept { return value(indexOf(obj)); }
241  std::shared_ptr<T> find(const Uuid& key) noexcept {
242  return value(indexOf(key));
243  }
244  std::shared_ptr<const T> find(const Uuid& key) const noexcept {
245  return value(indexOf(key));
246  }
247  std::shared_ptr<T> find(const QString& name) noexcept {
248  return value(indexOf(name));
249  }
250  std::shared_ptr<const T> find(const QString& name) const noexcept {
251  return value(indexOf(name));
252  }
253 
254  // "Hard" Element Access (assertion or exception if not found!)
255  std::shared_ptr<const T> at(int index) const noexcept {
256  return std::const_pointer_cast<const T>(mObjects.at(index));
257  } // always read-only!
258  std::shared_ptr<T>& first() noexcept { return mObjects.first(); }
259  std::shared_ptr<const T> first() const noexcept { return mObjects.first(); }
260  std::shared_ptr<T>& last() noexcept { return mObjects.last(); }
261  std::shared_ptr<const T> last() const noexcept { return mObjects.last(); }
262  std::shared_ptr<T> get(const T* obj) {
263  std::shared_ptr<T> ptr = find(obj);
264  if (!ptr) throw LogicError(__FILE__, __LINE__);
265  return ptr;
266  }
267  std::shared_ptr<T> get(const Uuid& key) {
268  std::shared_ptr<T> ptr = find(key);
269  if (!ptr) throwKeyNotFoundException(key);
270  return ptr;
271  }
272  std::shared_ptr<const T> get(const Uuid& key) const {
273  std::shared_ptr<const T> ptr = find(key);
274  if (!ptr) throwKeyNotFoundException(key);
275  return ptr;
276  }
277  std::shared_ptr<T> get(const QString& name) {
278  std::shared_ptr<T> ptr = find(name);
279  if (!ptr) throwNameNotFoundException(name);
280  return ptr;
281  }
282  std::shared_ptr<const T> get(const QString& name) const {
283  std::shared_ptr<const T> ptr = find(name);
284  if (!ptr) throwNameNotFoundException(name);
285  return ptr;
286  }
287 
288  // Iterator Access
289  const_iterator begin() const noexcept { return mObjects.begin(); }
290  const_iterator end() const noexcept { return mObjects.end(); }
291  const_iterator cbegin() noexcept { return mObjects.cbegin(); }
292  const_iterator cend() noexcept { return mObjects.cend(); }
293  iterator begin() noexcept { return mObjects.begin(); }
294  iterator end() noexcept { return mObjects.end(); }
295 
296  // General Methods
297  int loadFromSExpression(const SExpression& node) {
298  clear();
299  foreach (const SExpression& node, node.getChildren(P::tagname)) {
300  append(std::make_shared<T>(node)); // can throw
301  }
302  return count();
303  }
304  void swap(int i, int j) noexcept {
305  // do not call mObjects.swap() because it would not notify the observers
306  qBound(0, i, count() - 1);
307  qBound(0, j, count() - 1);
308  if (i == j) return;
309  if (i > j) qSwap(i, j);
310  std::shared_ptr<T> oj = take(j);
311  std::shared_ptr<T> oi = take(i);
312  insert(i, oj);
313  insert(j, oi);
314  }
315  int insert(int index, const std::shared_ptr<T>& obj) noexcept {
316  Q_ASSERT(obj);
317  qBound(0, index, count());
318  insertElement(index, obj);
319  return index;
320  }
321  int append(const std::shared_ptr<T>& obj) noexcept {
322  return insert(count(), obj);
323  }
324  std::shared_ptr<T> take(int index) noexcept {
325  Q_ASSERT(contains(index));
326  return takeElement(index);
327  }
328  std::shared_ptr<T> take(const T* obj) noexcept { return take(indexOf(obj)); }
329  std::shared_ptr<T> take(const Uuid& uuid) noexcept {
330  return take(indexOf(uuid));
331  }
332  std::shared_ptr<T> take(const QString& name) noexcept {
333  return take(indexOf(name));
334  }
335  void remove(int index) noexcept { take(index); }
336  void remove(const T* obj) noexcept { take(obj); }
337  void remove(const Uuid& uuid) noexcept { take(uuid); }
338  void remove(const QString& name) noexcept { take(name); }
339  void clear() noexcept {
340  // do not call mObjects.clear() because it would not notify the observers
341  for (int i = count() - 1; i >= 0; --i) {
342  remove(i);
343  }
344  Q_ASSERT(isEmpty() && mObjects.isEmpty());
345  }
347  void serialize(SExpression& root) const override {
348  serializePointerContainer(root, mObjects, P::tagname); // can throw
349  }
350 
351  // Convenience Methods
352  SerializableObjectList<T, P, OnEditedArgs...> sortedByUuid() const noexcept {
353  SerializableObjectList<T, P, OnEditedArgs...> copiedList;
354  copiedList.mObjects = mObjects; // copy only the pointers, not the objects!
355  qSort(copiedList.mObjects.begin(), copiedList.mObjects.end(),
356  [](const std::shared_ptr<T>& ptr1, const std::shared_ptr<T>& ptr2) {
357  return ptr1->getUuid() < ptr2->getUuid();
358  });
359  return copiedList;
360  }
361  SerializableObjectList<T, P, OnEditedArgs...> sortedByName() const noexcept {
362  SerializableObjectList<T, P, OnEditedArgs...> copiedList;
363  copiedList.mObjects = mObjects; // copy only the pointers, not the objects!
364  qSort(copiedList.mObjects.begin(), copiedList.mObjects.end(),
365  [](const std::shared_ptr<T>& ptr1, const std::shared_ptr<T>& ptr2) {
366  return ptr1->getName() < ptr2->getName();
367  });
368  return copiedList;
369  }
370 
371  // Operator Overloadings
372  std::shared_ptr<T> operator[](int i) noexcept {
373  Q_ASSERT(contains(i));
374  return mObjects[i];
375  }
376  std::shared_ptr<const T> operator[](int i) const noexcept {
377  Q_ASSERT(contains(i));
378  return mObjects[i];
379  }
381  const SerializableObjectList<T, P, OnEditedArgs...>& rhs) const noexcept {
382  if (rhs.mObjects.count() != mObjects.count()) return false;
383  for (int i = 0; i < mObjects.count(); ++i) {
384  if (*rhs.mObjects[i] != *mObjects[i]) return false;
385  }
386  return true;
387  }
389  const SerializableObjectList<T, P, OnEditedArgs...>& rhs) const noexcept {
390  return !(*this == rhs);
391  }
392  SerializableObjectList<T, P, OnEditedArgs...>& operator=(
393  const SerializableObjectList<T, P, OnEditedArgs...>& rhs) noexcept {
394  clear();
395  mObjects.reserve(rhs.count());
396  foreach (const std::shared_ptr<T>& ptr, rhs.mObjects) {
397  append(std::make_shared<T>(*ptr)); // call copy constructor of object
398  }
399  return *this;
400  }
401  SerializableObjectList<T, P, OnEditedArgs...>& operator=(
403  clear();
404  mObjects.reserve(rhs.count());
405  foreach (const std::shared_ptr<T>& ptr, rhs.mObjects) {
406  append(ptr); // copy only the pointer, NOT the object
407  }
408  rhs.clear();
409  return *this;
410  }
411 
412 protected: // Methods
413  void insertElement(int index, const std::shared_ptr<T>& obj) noexcept {
414  mObjects.insert(index, obj);
415  obj->onEdited.attach(mOnEditedSlot);
416  onEdited.notify(index, obj, Event::ElementAdded);
417  }
418  std::shared_ptr<T> takeElement(int index) noexcept {
419  std::shared_ptr<T> obj = mObjects.takeAt(index);
420  obj->onEdited.detach(mOnEditedSlot);
421  onEdited.notify(index, obj, Event::ElementRemoved);
422  return obj;
423  }
424  void elementEditedHandler(const T& obj, OnEditedArgs... args) noexcept {
425  int index = indexOf(&obj);
426  if (contains(index)) {
427  onElementEdited.notify(index, at(index), args...);
428  onEdited.notify(index, at(index), Event::ElementEdited);
429  } else {
430  qCritical() << "SerializableObjectList: Received notification from "
431  "unknown element!";
432  }
433  }
434  void throwKeyNotFoundException(const Uuid& key) const {
435  throw RuntimeError(
436  __FILE__, __LINE__,
437  QString(
438  tr("There is "
439  "no element of type \"%1\" with the UUID \"%2\" in the list."))
440  .arg(P::tagname)
441  .arg(key.toStr()));
442  }
443  void throwNameNotFoundException(const QString& name) const {
444  throw RuntimeError(
445  __FILE__, __LINE__,
446  QString(
447  tr("There is "
448  "no element of type \"%1\" with the name \"%2\" in the list."))
449  .arg(P::tagname)
450  .arg(name));
451  }
452 
453 protected: // Data
454  QVector<std::shared_ptr<T>> mObjects;
455  Slot<T, OnEditedArgs...> mOnEditedSlot;
456 };
457 
458 } // namespace librepcb
459 
460 /*******************************************************************************
461  * Prevent from using SerializableObjectList in a foreach loop because it always
462  *would create a deep copy of the list! You should use C++11 range based for
463  *loops instead.
464  ******************************************************************************/
465 
466 #if (QT_VERSION > QT_VERSION_CHECK(5, 9, 0))
467 namespace QtPrivate {
468 #endif
469 
470 template <typename T, typename P, typename... OnEditedArgs>
471 class QForeachContainer<
472  librepcb::SerializableObjectList<T, P, OnEditedArgs...>> {
473 public:
474  ~QForeachContainer() = delete;
475 };
476 template <typename T, typename P, typename... OnEditedArgs>
477 class QForeachContainer<
478  const librepcb::SerializableObjectList<T, P, OnEditedArgs...>> {
479 public:
480  ~QForeachContainer() = delete;
481 };
482 
483 #if (QT_VERSION > QT_VERSION_CHECK(5, 9, 0))
484 } // namespace QtPrivate
485 #endif
486 
487 /*******************************************************************************
488  * End of File
489  ******************************************************************************/
490 
491 #endif // LIBREPCB_SERIALIZABLEOBJECTLIST_H
I it
Definition: serializableobjectlist.h:100
const_iterator cend() noexcept
Definition: serializableobjectlist.h:292
The LogicError class.
Definition: exceptions.h:182
bool operator!=(const Iterator &rhs) const noexcept
Definition: serializableobjectlist.h:106
const QList< SExpression > & getChildren() const
Definition: sexpression.h:84
Slot< SerializableObjectList< T, P, OnEditedArgs...>, int, const std::shared_ptr< const T > &, Event > OnEditedSlot
Definition: serializableobjectlist.h:132
std::shared_ptr< T > & last() noexcept
Definition: serializableobjectlist.h:260
static void serializePointerContainer(SExpression &root, const T &container, const QString &itemName)
Definition: serializableobject.h:96
SerializableObjectList< T, P, OnEditedArgs...> sortedByUuid() const noexcept
Definition: serializableobjectlist.h:352
std::shared_ptr< T > value(int index) noexcept
Definition: serializableobjectlist.h:236
void clear() noexcept
Definition: serializableobjectlist.h:339
int loadFromSExpression(const SExpression &node)
Definition: serializableobjectlist.h:297
std::vector< Uuid > getUuids() const noexcept
Definition: serializableobjectlist.h:184
std::shared_ptr< T > operator[](int i) noexcept
Definition: serializableobjectlist.h:372
SerializableObjectList< T, P, OnEditedArgs...> sortedByName() const noexcept
Definition: serializableobjectlist.h:361
iterator end() noexcept
Definition: serializableobjectlist.h:294
SerializableObjectList(const SerializableObjectList< T, P, OnEditedArgs...> &other) noexcept
Definition: serializableobjectlist.h:146
Iterator(const I &it) noexcept
Definition: serializableobjectlist.h:105
The SerializableObjectList class implements a list of librepcb::SerializableObject.
Definition: serializableobjectlist.h:93
int indexOf(const QString &name) const noexcept
Definition: serializableobjectlist.h:218
Iterator< typename QVector< std::shared_ptr< Polygon >>::const_iterator, const Polygon > const_iterator
Definition: serializableobjectlist.h:119
Slot< SerializableObjectList< T, P, OnEditedArgs...>, int, const std::shared_ptr< const T > &, OnEditedArgs...> OnElementEditedSlot
Definition: serializableobjectlist.h:138
O & operator*()
Definition: serializableobjectlist.h:111
std::shared_ptr< O > ptr() noexcept
Definition: serializableobjectlist.h:112
int count() const noexcept
Definition: serializableobjectlist.h:183
bool operator!=(const SerializableObjectList< T, P, OnEditedArgs...> &rhs) const noexcept
Definition: serializableobjectlist.h:388
bool contains(int index) const noexcept
Definition: serializableobjectlist.h:226
QSet< Uuid > getUuidSet() const noexcept
Definition: serializableobjectlist.h:192
bool contains(const T *obj) const noexcept
Definition: serializableobjectlist.h:229
Signal< SerializableObjectList< T, P, OnEditedArgs...>, int, const std::shared_ptr< const T > &, Event > onEdited
Definition: serializableobjectlist.h:129
~Iterator()
Definition: serializableobjectlist.h:115
std::shared_ptr< T > & first() noexcept
Definition: serializableobjectlist.h:258
void insertElement(int index, const std::shared_ptr< T > &obj) noexcept
Definition: serializableobjectlist.h:413
SerializableObjectList< T, P, OnEditedArgs...> & operator=(SerializableObjectList< T, P, OnEditedArgs...> &&rhs) noexcept
Definition: serializableobjectlist.h:401
SerializableObjectList(const SExpression &node)
Definition: serializableobjectlist.h:172
bool isEmpty() const noexcept
Definition: serializableobjectlist.h:182
The SerializableObject class is the base class for all classes which need to be serializable/deserial...
Definition: serializableobject.h:43
void serialize(SExpression &root) const override
Serialize the object into an existing S-Expression node.
Definition: serializableobjectlist.h:347
iterator begin() noexcept
Definition: serializableobjectlist.h:293
Signal< SerializableObjectList< T, P, OnEditedArgs...>, int, const std::shared_ptr< const T > &, OnEditedArgs...> onElementEdited
Definition: serializableobjectlist.h:135
std::shared_ptr< const T > at(int index) const noexcept
Definition: serializableobjectlist.h:255
std::shared_ptr< const T > find(const Uuid &key) const noexcept
Definition: serializableobjectlist.h:244
int append(const std::shared_ptr< T > &obj) noexcept
Definition: serializableobjectlist.h:321
bool operator==(const SerializableObjectList< T, P, OnEditedArgs...> &rhs) const noexcept
Definition: serializableobjectlist.h:380
std::shared_ptr< const T > operator[](int i) const noexcept
Definition: serializableobjectlist.h:376
bool contains(const QString &name) const noexcept
Definition: serializableobjectlist.h:231
void elementEditedHandler(const T &obj, OnEditedArgs...args) noexcept
Definition: serializableobjectlist.h:424
std::shared_ptr< T > take(int index) noexcept
Definition: serializableobjectlist.h:324
std::shared_ptr< const T > value(int index) const noexcept
Definition: serializableobjectlist.h:237
The RuntimeError class.
Definition: exceptions.h:219
void throwKeyNotFoundException(const Uuid &key) const
Definition: serializableobjectlist.h:434
std::shared_ptr< const T > find(const QString &name) const noexcept
Definition: serializableobjectlist.h:250
void swap(int i, int j) noexcept
Definition: serializableobjectlist.h:304
int indexOf(const T *obj) const noexcept
Definition: serializableobjectlist.h:202
int insert(int index, const std::shared_ptr< T > &obj) noexcept
Definition: serializableobjectlist.h:315
std::shared_ptr< T > find(const Uuid &key) noexcept
Definition: serializableobjectlist.h:241
Definition: serializableobjectlist.h:99
std::shared_ptr< T > find(const QString &name) noexcept
Definition: serializableobjectlist.h:247
std::shared_ptr< T > take(const QString &name) noexcept
Definition: serializableobjectlist.h:332
std::shared_ptr< T > takeElement(int index) noexcept
Definition: serializableobjectlist.h:418
The Signal class is used to emit signals on non-QObject derived classes.
Definition: signalslot.h:65
Iterator(const Iterator &other) noexcept
Definition: serializableobjectlist.h:104
const_iterator cbegin() noexcept
Definition: serializableobjectlist.h:291
SerializableObjectList(SerializableObjectList< T, P, OnEditedArgs...> &&other) noexcept
Definition: serializableobjectlist.h:154
virtual ~SerializableObjectList() noexcept
Definition: serializableobjectlist.h:179
std::shared_ptr< T > take(const Uuid &uuid) noexcept
Definition: serializableobjectlist.h:329
std::shared_ptr< T > take(const T *obj) noexcept
Definition: serializableobjectlist.h:328
int indexOf(const Uuid &key) const noexcept
Definition: serializableobjectlist.h:210
SerializableObjectList< T, P, OnEditedArgs...> & operator=(const SerializableObjectList< T, P, OnEditedArgs...> &rhs) noexcept
Definition: serializableobjectlist.h:392
std::shared_ptr< T > find(const T *obj) noexcept
Definition: serializableobjectlist.h:240
The Uuid class is a replacement for QUuid to get UUID strings without {} braces.
Definition: uuid.h:58
const_iterator end() const noexcept
Definition: serializableobjectlist.h:290
QVector< std::shared_ptr< T > > mObjects
Definition: serializableobjectlist.h:454
bool contains(const Uuid &key) const noexcept
Definition: serializableobjectlist.h:230
Iterator & operator++()
Definition: serializableobjectlist.h:107
SerializableObjectList(std::initializer_list< std::shared_ptr< T >> elements) noexcept
Definition: serializableobjectlist.h:164
void throwNameNotFoundException(const QString &name) const
Definition: serializableobjectlist.h:443
The Slot class is used to receive signals from non-QObject derived classes.
Definition: signalslot.h:36
The SExpression class.
Definition: sexpression.h:57
QString toStr() const noexcept
Get the UUID as a string (without braces)
Definition: uuid.h:88
SerializableObjectList() noexcept
Definition: serializableobjectlist.h:141
Slot< T, OnEditedArgs...> mOnEditedSlot
Definition: serializableobjectlist.h:455
std::shared_ptr< const T > last() const noexcept
Definition: serializableobjectlist.h:261
std::shared_ptr< const T > first() const noexcept
Definition: serializableobjectlist.h:259
const_iterator begin() const noexcept
Definition: serializableobjectlist.h:289
Iterator< typename QVector< std::shared_ptr< Polygon >>::iterator, Polygon > iterator
Definition: serializableobjectlist.h:117