Classes


A class is an abstraction of a group of system elements that have the same set of features from the modeling point of view. Taking advantage of object orientation, SansGUI uses classes for categorizing and organizing system elements. SansGUI provides simulation developers with a mechanism to define the classes necessary to a simulator. The definitions of the classes become a contract between SansGUI and the simulator, through which SansGUI can gather proper model configuration and input data from the user and then pass them to the simulator for processing.

Class Schema

A class schema is a data structure that stores the properties of the class itself. It also contains a set of class attributes, which are used to define the properties of the objects derived from this class. The derived objects with specific values for the corresponding class attributes are instances of the class.

A simulation developer creates and defines classes that are related with the simulator in the modeling domain. The specifications of a class is captured in its class schema, which contains the following information: 1) Class Properties, 2) Sharing Options, and 3) Class Attributes.

Class Properties

The properties of a class consist of the following elements:

Sharing Options

When a class is planned to be reused among multiple simulators, they can be defined as shared. SansGUI supports four levels of class sharing: 1) multiple options within a simulator, 2) among simulators within a workgroup, 3) among workgroups within a company, or 4) among all companies globally. With this feature, commonly used classes can be shared to avoid duplicates. The DLL functions for the shared classes can be integrated into the same simulator DLL before distribution. It can also be implemented as user overriding functions in a separate DLL so that when the classes are imported to different Project Models, the location of the class functions can be specified explicitly. An integrated DLL has higher performance than a separate DLL because of the overhead of loading the separate DLL prior to every function call.

Class Attributes

The primary portion of a class schema contains the attributes of the class; therefore, the primary development in a Schema Definition is to specify the attributes of the classes involved in the simulator. These attributes are used to describe the properties of deriving objects. A class attribute contains the following information:

Intrinsic classes may or may not have class attributes. A class without any attribute is called a generic class. Simulation developers create domain specific classes by deriving them from the intrinsic classes and extending the set of class attributes to include those important to the simulator. SansGUI provides simulation developers with a mechanism for creating and maintaining class attributes. A schema version evolution function is included in the SansGUI Run-Time Environment for simulation users to synchronize all their Object Libraries and Project Models with any versions of the simulator for backward and forward compatibility. See the next section on Class Schema Version Control for more details.

Class Hierarchy

SansGUI supports multiple level classes in tree-like structures. A class may be used to derive multiple child classes and every child class can have exactly one parent class. In object-oriented terms, it is single inheritance. We call the parent class a super class and the child class a subclass. There are multiple root classes in the SansGUI environment. All the root classes are predefined and supplied with SansGUI. All the simulation developer defined classes are derived, directly or indirectly, from these root classes.

The operation of creating a subclass from an existing class is called subclassing. A subclass inherits all attributes from its parent class and all the ancestors of this parent class. In other words, the set of the attributes in the subclass is a superset of that of any ancestors. With this nature, the class functions in a superclass that act upon the class attributes can be called from a function in the subclass. The path that follows the inheritance relations from a root intrinsic class to a descendent class is the class path of the descendent.

When a class cannot be used to create subclasses, we call it a terminal class. When a class allows instantiation of objects, the class is a concrete class; otherwise, it is an abstract class. Whether a class is concrete or abstract is determined by the simulation developer.

SansGUI Classes

The SansGUI intrinsic classes, or classes that are predefined and supplied with SansGUI, are organized into three categories: Simulator, Component, and Reference Classes.

Creating subclasses from the SansGUI intrinsic classes for simulation control, system components, and data references is a primary task in the simulator development cycle. More on the SansGUI Intrinsic Classes can be found in the SansGUI Reference Manual.

 



C:\FH_Suite\htmlgifs\home.gif Schema Definition Class Schema Version Control

SansGUI Modeling and Simulation Environment Version 1.2

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

http://protodesign-inc.com