DIRECTORY CD USING [Design, Instance, InstanceList], Rope USING [ROPE]; CDSatellites: CEDAR DEFINITIONS = BEGIN ROPE: TYPE = Rope.ROPE; InstanceList: TYPE = CD.InstanceList; satellitesProp: ATOM; maxGroupIdProp: ATOM; groupIdProp: ATOM; commentProp: ATOM; GetSatellites: PROC [from: REF, filterComments: BOOL _ TRUE] RETURNS [sats: InstanceList]; GetSatelliteRopes: PROC [from: REF, filterComments: BOOL _ TRUE] RETURNS [ropes: LIST OF ROPE _ NIL]; EnforceInvariants: PRIVATE PROC [design: CD.Design, world: InstanceList] RETURNS [oSats: InstanceList]; EnforceDesignInvariants: PROC [design: CD.Design]; MakeInstanceSatellite: PROC [design: CD.Design, master: CD.Instance, text: CD.Instance]; END. ~CDSatellites.mesa Copyright c 1985, 1986 by Xerox Corporation. All rights reserved. Written by Pradeep Sindhu December 20, 1985 1:22:54 pm PST Pradeep Sindhu February 20, 1986 1:37:22 pm PST Bertrand Serlet August 19, 1986 11:44:28 am PDT Jean-Marc Frailong July 28, 1986 6:46:31 pm PDT Abstract A satellite is a text CD.Instance associated with another CD.Instance called the satellite's master. A master along with its satellites forms a satellite group. It is useful to think of satellites simply as visible properties attatched to the master. However, three things distinguish satellites from ordinary properties: 1) satellites are always visible, 2) the user can control their looks and placement to suit his taste, and 3) satellites are untypedas far as clients are concerned satellites are simply pieces of text. Clients of this interface should be aware of the following set of invariants maintained for satellites, so they may avoid violating them inadvertently (the description below uses the notion of a world, which is a list of CD.Instance belonging to a cell or to the top level of the design): I1) A master must be a non-text CD.Instance with a non-nil groupIDProp. I2) A satellite must be a text CD.Instance with a non-nil groupIDProp. I3) Every satellite in a given world must have a corresponding master. That is, if n is the value of its groupIDProp (its groupID), then there must be a master in world that also has n as its groupID. I4) A design may have at most one master with a given groupID. I5) Each master must have a satellitesProp property that points to a list instances that are the master's satellites. These invariants are enforced by the procedure EnforceInvariants, which should be called whenever one or more of them could have been violated. NB The procedures in this interface do not acquire any ChipNDale locks. It is the responsibility of clients to get these locks if they believe there is danger of conflict. This property hangs on a master. Its value is the list of the master's satellites. This property hangs on a design. Its value is the highest numbered satellite group in the design. This property hangs on each instance that is in a satellite group. Its value is the group's groupId. This property hangs on text instances that are comments, and therefore to be ignored. Returns the satellites of from, where from is an object, an instance, or a property list. If filterComments is TRUE then satellites marked as comments are filtered out. Convenience proc that returns the list of satellite ropes for from is an object, an instance, or a property list. If filterComments is TRUE then satellites marked as comments are filtered out. Obsolete (use the following function). Will disappear soon ... Enforces the satellite invariants listed above on the whole design. Should be called before getting design satellites. Associates a text to a master as instance satellite. ΚX˜šœ™Jšœ Οmœ7™BJ™:Icode™/K™/K™/—headšœ™IbodyšœΟi œRžœ.žœπ™šœΓžœX™ MšœžBœ™GMšœžAœ™FMšœžΔœ™ΙMšœž9œ™>Mšœžpœ™u—Mšœ™MšΟbœ«™­—J˜šΟk œ˜ Jš œ œ#˜+Jšœ œ œ˜—J˜šΠbl œ œ  œ œ˜(J˜Jš œ œ œ˜Jšœ œ œ˜%K˜šœ œ˜JšœS™S—šœ œ˜Jšœb™b—šœ  œ˜Jšœd™d—šœ  œ˜JšœU™U—˜J˜—š Οn œ œ œ œ œ œ˜ZJšœžœžœF œ5™©J™—š’œ œ œ œ œ œ  œ œ œ œ˜eJšœ>žœF œ5™ΑK˜—š’œ  œ  œ œ˜gK™?K™—š’œ œ  œ ˜2Jšœy™yJ™—š ’œ œ  œ œ œ ˜XK™4—J™—Jš œ˜—…—Ζœ