Skip to content
  • David Thompson's avatar
    Remove ModelEntityItem from use. · 25729eeb
    David Thompson authored
    This is a large, breaking change to SMTK that moves the attribute
    system away from using ModelEntityItem. Specifically, it
    
    + switches `Attribute::associations()` methods to return a
      ReferenceItem instead of a ModelEntityItem.
        + removes m_associations from Attribute.
    + switches `Definition::associationRule()` and related methods
      to return a ReferenceItemDefinition instead of a
      ModelEntityItemDefinition.
        + fix many methods in Definition that referred to m_associationRule
          to use m_acceptsRules instead.
    + updates the XML and JSON readers and writers to
      deserialize ModelEntity items/definitions in old files into their
      equivalent Reference items/definitions in the new system.
    + refactors ReferenceItem to no longer be a template
      since Resource and Component now share a common ancestor.
    + simplifies the qtReferenceItem hierarchy since now both
      Resource and Component inherit PersistentObject.
    + renames `Attribute::isComponentAssociated()` to `isObjectAssociated()`.
    + consolidates a lot of code that was shared between ReferenceItem,
      ResourceItem, and ComponentItem into ReferenceItem.
    + changes the default attribute reader version to 3 (was 2).
    + removes an unneeded argument from `from_json` methods.
      By the time these methods are called, `itemPtr` should already
      own a reference to the collection via its parent attribute, so
      don't pass the collection needlessly.
    
      This also simplifies the json format for items by eliminating
      the `ItemValue` dictionary; instead, items are responsible for
      adding the `Type` entry to their own dictionaries.
      It may even be possible to remove the `Type` entry since the
      items are required to have their type specified by a definition.
    + makes OperationEnvironment depend on AttributeEnvironment.
      Operations depend on attributes for their parameters/specifications.
    + removes `#include ".../ModelEntityItem.h"` from `Attribute.h`.
    + switches many operators to use ComponentItem or ReferenceItem
      instead of ModelEntityItem, and also switches some of these
      operators to use associations where they did not previously.
    + starts the convention of adding release notes to `doc/release/notes`.
    + fixes some tests to use the resource manager or operation manager
      to create objects because the way that reference items verify
      types often requires a resource manager to work properly.
    25729eeb