[Smtk-developers] Inconsistent entity-attribute associations between Attribute and EntityRef
Yumin Yuan
yumin.yuan at kitware.com
Wed Jun 10 00:07:47 EDT 2015
Hi Dave and Bob,
I noticed some inconsistency between Attribute and EntityRef, in terms of
how to manage the associations between entity and attribute.
In Attribute class, there is a ModelEntityItem (m_associations) keeping
track of the associated entities, and the Attribute::associateEntity() only
updates m_associations without updating the Manager (so the manager's
association record does not reflect the system), however
Attribute::disassociateEntity() will update both m_associations and the
Manager.
In EntityRef class, the EntityRef::associateAttribute() and
EntityRef::disassociateAttribute() depend fully on the Manager to update
the associations.
I suggest to remove the m_associations from Attribute, and use the Manager
instead (like EntityRef) to manage associations. This will avoid keeping
the same record in two places and potential mismatch between them.
Comments?
Yumin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/smtk-developers/attachments/20150610/8cf70ef3/attachment.html>
More information about the Smtk-developers
mailing list