Loading...
Searching...
No Matches
IdentifiedObjectAbstract.hpp
1#pragma once
2#include <QObject>
3
4#include <score_lib_base_export.h>
5
6#include <cinttypes>
7#include <verdigris>
8
15class SCORE_LIB_BASE_EXPORT IdentifiedObjectAbstract : public QObject
16{
18public:
19 virtual int32_t id_val() const noexcept = 0;
21
24 E_SIGNAL(SCORE_LIB_BASE_EXPORT, identified_object_destroying, o)
25
26
27 void identified_object_destroyed(IdentifiedObjectAbstract* o)
28 E_SIGNAL(SCORE_LIB_BASE_EXPORT, identified_object_destroyed, o)
29
30 virtual void resetCache() const noexcept = 0;
31
32protected:
33 using QObject::QObject;
34 IdentifiedObjectAbstract(const QString& name, QObject* parent) noexcept
35 {
36 QObject::setObjectName(name);
37 QObject::setParent(parent);
38 }
39};
40
41W_REGISTER_ARGTYPE(IdentifiedObjectAbstract*)
Base class for IdentifiedObject.
Definition IdentifiedObjectAbstract.hpp:16
void identified_object_destroying(IdentifiedObjectAbstract *o)
To be called by subclasses.