diff data/model/DenseTimeValueModel.cpp @ 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 0d89abd631ac
children 77543124651b
line wrap: on
line diff
--- a/data/model/DenseTimeValueModel.cpp	Thu Jun 27 13:08:10 2019 +0100
+++ b/data/model/DenseTimeValueModel.cpp	Fri Jun 28 17:36:30 2019 +0100
@@ -20,12 +20,12 @@
 
 DenseTimeValueModel::DenseTimeValueModel()
 {
-    PlayParameterRepository::getInstance()->addPlayable(this);
+    PlayParameterRepository::getInstance()->addPlayable(getId().untyped);
 }
 
 DenseTimeValueModel::~DenseTimeValueModel()
 {
-    PlayParameterRepository::getInstance()->removePlayable(this);
+    PlayParameterRepository::getInstance()->removePlayable(getId().untyped);
 }
         
 QString