Dynamic View Services > Semantics of Dynamic View Type Specifications > Representations
 
Representations
In a view, Server object types can be associated with 0, 1, or n representations.
Each representation is implemented by a representation object type and is named.
The dynamic-view type DomainView below specifies a tree representation of type Tree, which is associated with the Server class Domain. It also includes the treeItem representation of type TreeItem, and the matrix representation of type Matrix, which are both associated with the Server class Node.
view DomainView:
subscribe origin Domain:
represent Tree tree:
...
...
subscribe Node:
represent TreeItem treeItem:...
represent Matrix matrix:..
If an Rogue Wave Server class is associated with several representations in the same view specification, each of them must have a unique name.
A representation object type must derive from IlsRpObject and must be declared to the representation model interpreter of the component by means of the macros ILS_RP_OBJECT_DECL and ILS_RP_OBJECT_BEGIN/ILS_RP_OBJECT_END.
A representation can be directly associated with a view, as shown in the following example:
view DomainView:
represent TreeContainer container:...
In this case, the type TreeContainer must derive from IlsRepresentation
and must be declared to the representation model interpreter by means of the
macros ILS_REPRESENTATION_DECL and ILS_REPRESENTATION_BEGIN/ILS_REPRESENTATION_END.

Version 6.1
Copyright © 2016, Rogue Wave Software, Inc. All Rights Reserved.