Sharing Classes

Each class can be defined, separately, with sharing options. SansGUI supports four levels of class sharing:

With a shared class, the simulation user can drag the class from a source Project Model or Object Library to another as long as it is compatible with the target simulator in a proper share level. You can use the class sharing mechanism to include common classes in an Object Library before distributing your simulator. More on this subject can be found in the Preparing Object Libraries section in Chapter 3.

Setting the Sharing Levels

The Class Sharing Properties dialog can be used to set different sharing levels. To use the dialog:

The company, workgroup, and the simulator program names are entered in the Simulator Identification dialog which can be accessed via the menu sequence Action>Change Identification... The levels are inclusive in that if the class is to be shared globally, it should be sharable in a company and in a workgroup. If it cannot be shared among workgroups, it cannot be shared among companies.

When a class is created by subclassing from a parent class, the sharing level defined in the parent class will be copied. The same applies to creating a class from a sibling class, with the sharing level defined in the sibling class will be copied. There is, however, a sharing level rule for the classes in a class path: any super class should have the same or broader sharing level than a subclass. The reason behind this is quite simple. When a subclass can be exported or imported, the ancestor classes should go with it; otherwise, the class definition for the subclass will be incomplete. When you modify the sharing level of a class, SansGUI will check and modify the related classes in the path for sharing coherence.

Entering Compatible Options

The bottom half of the Class Sharing Properties dialog is a table of compatible options. The options are, again, defined in the simulator identification. Check or uncheck the options to indicate whether you would like the class to be included in the options or not. An Object Library will be generated for each option entry. SansGUI uses the compatibility flag to decide if the class should be included in the generated Object Library.


C:\FH_Suite\htmlgifs\home.gif Adding Classes Operating on Class Tree View

SansGUI Modeling and Simulation Environment Version 1.2

Copyright 2000-2003 ProtoDesign, Inc. All rights reserved.