Classes and types Removing or deleting a class You can remove a class from the current view (diagram) or delete the class entirely from the model. Removing a class from the view does not delete it from the model. To remove a class from the diagram, right-click the class and select Remove from View . To delete the class entirely from the model, do one the following actions: Љ Right-click the class, then select Delete from Model . Љ Select the class, then click Delete in the main toolbar. Note When you delete a class, all of its objects are also deleted. Ports A port is a distinct interaction point between a class and its environment or between (the behavior of) a class and its internal parts.
A port allows you to specify classes that are independent of the environment in which they are embedded. The internal parts of the class can be completely isolated from the environment and vice versa. A port can have the following interfaces: Љ Required interfaces characterizes the requests that can be made from the class for a port (via the port) to its environment (external objects). A required interface is denoted by a socket notation. Љ Provided interfaces characterizes the requests that could be made from the environment to the class via the port. A provided interface is denoted by a lollipop notation.
These interfaces are specified using a contract , which by itself is a provided interface. For more information, see The Port Contract tab . If a port is behavioral , the messages of the provided interface are forwarded to the owner class; if it is non-behavioral , the messages are sent to one of the internal parts of the class. Classes can distinguish between events of the same type if they are received from different ports. Note See the HomeAlarmwithPorts sample model (under path>\Samples\CppSamples ) for an example of a model that uses ports. 90 User Guide