This is an open group. Sign in and click the "Join Group" button to become a group member and start posting.

Class Diagram II: Properties

Today I summarize my understanding of the meta-class Property. It was already introduced in Basics, which I skipped discussing in this blog.

A property is a structural Feature, so owned by a Classifier. As already written in my previous post, the owners of Properties are Classes and Associations (by subsetting the Features association).

As a structural feature, the property has a type and a multiplicity. A lot of information on multiplicity is found in this section.

The Instance of a property owned by a class is called an attribute. This is defined as an operation/query called isAttribute().

The property has some attributes that got my attention as they are not obvious in my background:

  • isDerived: I really have my      difficulties to understand it in the meta-context, but it seams      obvious to me when programming. I just might calculate it from other      properties by a mathematical or physical formula or might query      another object for the property.

  • isDerviedUnion: This is a uml      special way of a derived property found alot in the specs. Here the      property is derived as the union of all properties that subset it in      the same class or in child classes. If a property is isDerivedUnion,      it also must be isDerived. Furthermore, it must be isReadOnly.

  • isReadOnly: may not be written      after initialization.


A property is associated to another property in two ways:

  • it can subset a property.

  • it can redefine a property, as it      inherits from redefinable element. It only can redefine properties      that are inherited from a more general classifier.


I wouldn't directly translate the classes private data cluster to properties, as this doesn't take into

account the possibility to be derived. I prefer of thinking a property of anythink, that has a Accessor method defined. Apart from accessors that Get/Set a private data member, I can also define it as a method that returns a constant (read-only). I think this is better than to store the value inside the private data cluster (with a proper default value), as this can still be accessed inside the class (violating the readOnly attribute).

And for derived properties, the Getter method will calculate the value or have other kinds of implementation (such as a query to a driver layer).

Secondly, having accessors allows to redefine a property by overwriting the accessor method.

On subsetting, I think it is necessary to always override the accessor method of a derived union and place the subset-implementation there together with a call parent node. As sets are not a native data type of LabVIEW, there will be always some extra code for the implementation of the Set with proper type casts.

0 Kudos
Message 1 of 1
This is an open group. Sign in and click the "Join Group" button to become a group member and start posting.