Representation Status
An entry data member of type int, called rpStatus, is implicitly declared for each Server runtime type. This entry data member is known as the representation status. Its value depends on the pair (object, view). Therefore, it is possible to assign the representation status of a given object two different values if this object is referenced in two distinct views. Using the representation status in conditions applying to propagation and representations lets you dynamically modify an object representation in a view. The default value of a Server object representation status is:
1 if this object is associated with a representation object,
or 0 otherwise.
When the value of the representation status is reset to 0, the view cancels its subscription to the object after having destroyed its representations. See the member functions IlsMvView::getRpStatus and IlsMvView::setRpStatus.
In the following example, the matrix representation that is associated with Node is created only if the representation status of Node equals 2. The same condition applies to propagation towards the relations inputLines and outputLines.
view DomainView:
...
subscribe Node:
represent Matrix matrix
when rpStatus==2 : ...
propagate inputLines when rpStatus==2;
propagate outputLines when rpStatus==2;
Since rpStatus is a runtime attribute, it can be mapped to a representation attribute. Consequently, changing the value of this representation attribute from the component side may change the notification of the underlying Server object and, therefore, the way it is represented.
Version 6.3
Copyright © 2018, Rogue Wave Software, Inc. All Rights Reserved.