Mercurial > hg > svcore
comparison data/model/Model.h @ 1742:52705a328b34 by-id
Rejig ById so as to put everything in a single pool, so that at the core you can go from numeric id (untyped) to anything the object can be dynamic_cast to. Useful for building other abstractions like PlayParameter-type registrations that don't know about e.g. Models. Probably some more tweaking needed. Also add tests
author | Chris Cannam |
---|---|
date | Fri, 28 Jun 2019 17:36:30 +0100 |
parents | 9d82b164f264 |
children | 498b426191e5 |
comparison
equal
deleted
inserted
replaced
1741:9d82b164f264 | 1742:52705a328b34 |
---|---|
31 /** | 31 /** |
32 * Model is the base class for all data models that represent any sort | 32 * Model is the base class for all data models that represent any sort |
33 * of data on a time scale based on an audio frame rate. | 33 * of data on a time scale based on an audio frame rate. |
34 */ | 34 */ |
35 class Model : public QObject, | 35 class Model : public QObject, |
36 public WithId<Model>, | 36 public WithTypedId<Model>, |
37 public XmlExportable, | 37 public XmlExportable, |
38 public Playable | 38 public Playable |
39 { | 39 { |
40 Q_OBJECT | 40 Q_OBJECT |
41 | 41 |
361 //!!! bool m_aboutToDelete; | 361 //!!! bool m_aboutToDelete; |
362 sv_frame_t m_extendTo; | 362 sv_frame_t m_extendTo; |
363 }; | 363 }; |
364 | 364 |
365 typedef Model::Id ModelId; | 365 typedef Model::Id ModelId; |
366 typedef StaticById<Model, Model::Id> ModelById; | 366 typedef TypedById<Model, Model::Id> ModelById; |
367 | 367 |
368 #endif | 368 #endif |