VirtualLabBuilder.src.Interfaces

Connectors and interfaces

Information


 

Interfaces package

Interfaces package includes the connectors and interfaces of the interactive graphic elements. These packages contain classes describing the interactive graphic elements and the base classes of these elements. There are four type of connectors. The following information about each connector is shown in Figure 1: name, icon, terminal variables and interfaces that include instances of the connector.


Figure 1.Connectors included in the VirtualLabBuilder library.

The ParentL and ChildL connectors have the following pair of variables: nodeReference and BorderLayout. The nodeReference variable is an integer number that identifies one of the interactive graphic elements of the class describing the virtual-lab view. The BorderLayout variable is a boolean variable. The value of this variable is true only if the component identified by the nodeReference variable of this connector has the layout policy BorderLayout.

The Parent and Child connectors have the following variable: nodeReference. The meaning of this variable is the same as the nodeReference variable of the ParentL and ChildL connectors.

The interfaces included in the Interfaces package are the following: IContainer, IContainerDrawables, IDrawables and IViewElements.

The description of these four interfaces includes the declaration of an integer variable named num. The value of this variable, which is obtained during the model initialization process, identifies one of the interactive graphic elements of the Modelica view description.

Package Content

NameDescription
VirtualLabBuilder.src.Interfaces.Parent Parent Connector of drawables components - Parent information
VirtualLabBuilder.src.Interfaces.Child Child Connector of drawables components
VirtualLabBuilder.src.Interfaces.ParentL ParentL Connector of non drawable components - Parent information
VirtualLabBuilder.src.Interfaces.ChildL ChildL Connector of non drawable components
VirtualLabBuilder.src.Interfaces.IContainer IContainer Interfaces of the classes describing containers that can't host drawable elements
VirtualLabBuilder.src.Interfaces.IContainerDrawables IContainerDrawables Interfaces of the classes describing containers that only can host drawable elements
VirtualLabBuilder.src.Interfaces.IDrawable IDrawable Interfaces of the classes describing drawable elements
VirtualLabBuilder.src.Interfaces.IViewElement IViewElement Interfaces of the classes describing interactive elements


VirtualLabBuilder.src.Interfaces.Parent VirtualLabBuilder.src.Interfaces.Parent

Connector of drawables components - Parent information

VirtualLabBuilder.src.Interfaces.Parent

Information


                        This connector is used only by components included in the Drawable package.

Contents

TypeNameDescription
IntegernodeReferenceNumber identifying the component hosting the element

Modelica definition

connector Parent 
  "Connector of drawables components - Parent information" 
   Integer nodeReference "Number identifying the component hosting the element";
end Parent;

VirtualLabBuilder.src.Interfaces.Child VirtualLabBuilder.src.Interfaces.Child

Connector of drawables components

VirtualLabBuilder.src.Interfaces.Child

Information


                        This connector is used by components included in the Drawable package and 
                        by containers that can host drawables.
This connector is used to transmit the number indentifying a container that can host drawables.
This number is the component number if the component is a container.
And it is the number of the container that host the component if the component is a drawable.


Contents

TypeNameDescription
IntegernodeReferenceNumber of a container that host drawables

Modelica definition

connector Child "Connector of drawables components" 
   Integer nodeReference "Number of a container that host drawables";
end Child;

VirtualLabBuilder.src.Interfaces.ParentL VirtualLabBuilder.src.Interfaces.ParentL

Connector of non drawable components - Parent information

VirtualLabBuilder.src.Interfaces.ParentL

Information


                        This connector is used by components included in the following packages:  
                        Containers,  InteractiveControls and  BasicElements.
This connector is used to obtain the number indentifying the component hosting the element.

Contents

TypeNameDescription
IntegernodeReferenceNumber identifying the component hosting the element
BooleanborderLayoutTrue if the component hosting the element has the BorderLayout layout policy

Modelica definition

connector ParentL 
  "Connector of non drawable components - Parent information" 
  Integer nodeReference "Number identifying the component hosting the element";
  Boolean borderLayout 
    "True if the component hosting the element has the BorderLayout layout policy";
end ParentL;

VirtualLabBuilder.src.Interfaces.ChildL VirtualLabBuilder.src.Interfaces.ChildL

Connector of non drawable components

VirtualLabBuilder.src.Interfaces.ChildL

Information


                        This connector is used by components included in the following packages:  
                        Containers,  InteractiveControls and  BasicElements.
Components included in the Containers package have two connectors of this type, whereas the components included in the other packages have only one connector of this type.


Contents

TypeNameDescription
IntegernodeReferenceNumber identifying the component
BooleanborderLayoutTrue if the component has the BorderLayout layout policy

Modelica definition

connector ChildL "Connector of non drawable components" 
  Integer nodeReference "Number identifying the component";
  Boolean borderLayout 
    "True if the component has the BorderLayout layout policy";
end ChildL;

VirtualLabBuilder.src.Interfaces.IContainer VirtualLabBuilder.src.Interfaces.IContainer

Interfaces of the classes describing containers that can't host drawable elements

VirtualLabBuilder.src.Interfaces.IContainer

Information


                        

The IContainer interface is inherited from classes describing containers that don't host drawable elements.

It contains the following two connectors on one side (''left'' connectors): pLLeft and cLLeft. And it contains the following connector on the other side (''right'' connector): cLRight. This interface includes the definition of a String parameter, named LayoutPolicy. The value of this parameter sets the layout policy of the container (i.e. BorderLayout(), HorizontalBox(), VerticalBox(), GridLayout or FlowLayout).

According to the connection rules, only a component hosted inside the container with this interface should be connected to the ''right'' connector. The ''right'' connector transmit the two following variables:

According to the connection rules, only the container hosting the container with this interface or a component hosted inside the same container should be connected to its pLLeft connector. And only a component hosted inside the same container should be connected to its cLLeft connector. The variables nodeReference and borderLayout of the cLLeft connector have the same value than the variables with the same name of the pLLeft connector.


Parameters

TypeNameDefaultDescription
LayoutPolicyLayoutPolicy"BorderLayout()"Layout policy

Connectors

TypeNameDescription
ParentLpLLeftConnector of non drawable components - Parent information
ChildLcLRightConnector of non drawable components - Child information
ChildLcLLeftConnector of non drawable components - Parent information

Modelica definition

partial model IContainer 
  "Interfaces of the classes describing containers that can't host drawable elements" 
  import Modelica.Utilities.*;
  Interfaces.ParentL pLLeft 
    "Connector of non drawable components - Parent information";
  Interfaces.ChildL cLRight 
    "Connector of non drawable components - Child information";
  Interfaces.ChildL cLLeft 
    "Connector of non drawable components - Parent information";
  
 parameter TypesDef.LayoutPolicy LayoutPolicy = "BorderLayout()" 
    "Layout policy";
  
protected 
 Integer num 
    "Number identifying the component in the virtual-lab view description";
  
initial algorithm 
  cLRight.nodeReference :=num;
  cLRight.borderLayout  :=if (Strings.compare(LayoutPolicy, "BorderLayout()")
     == Types.Compare.Equal) then true else false;
  cLLeft.nodeReference :=pLLeft.nodeReference;
  cLLeft.borderLayout :=pLLeft.borderLayout;
  
equation 
when false then
  num = pre(num);
  cLRight.nodeReference = pre(cLRight.nodeReference);
  cLRight.borderLayout = pre(cLRight.borderLayout);
  cLLeft.nodeReference = pre(cLLeft.nodeReference);
  cLLeft.borderLayout = pre(cLLeft.borderLayout);
end when;
end IContainer;

VirtualLabBuilder.src.Interfaces.IContainerDrawables VirtualLabBuilder.src.Interfaces.IContainerDrawables

Interfaces of the classes describing containers that only can host drawable elements

VirtualLabBuilder.src.Interfaces.IContainerDrawables

Information


                        

The IContainerDrawable interface is inherited from classes describing containers that host drawable elements.

It contains the following two connectors on one side (''left'' connectors): pLLeft and cLLeft. And it contains the following connector on the other side (''right'' connector): cRight.

According to the connection rules, only a component hosted inside the container with this interface should be connected to the ''right'' connector. The ''right'' connector transmit the following variables:

According to the connection rules, only the container hosting the container with this interface or a component hosted inside the same container should be connected to its pLLeft connector. And only a component hosted inside the same container should be connected to its cLLeft connector. The variables nodeReference and borderLayout of the cLLeft connector have the same value than the variables with the same name of the pLLeft connector.


Connectors

TypeNameDescription
ParentLpLLeftConnector of non drawable components - Parent information
ChildLcLLeftConnector of non drawable components - Parent information
ChildcRightConnector of drawable components - Child information

Modelica definition

partial model IContainerDrawables 
  "Interfaces of the classes describing containers that only can host drawable elements" 
  import Modelica.Utilities.*;
  import Modelica.Utilities.*;
  Interfaces.ParentL pLLeft 
    "Connector of non drawable components - Parent information";
  Interfaces.ChildL cLLeft 
    "Connector of non drawable components - Parent information";
  Interfaces.Child cRight 
    "Connector of drawable components - Child information";
  
protected 
  Integer num 
    "Number identifying the component in the virtual-lab view description";
initial algorithm 
  cRight.nodeReference :=num;
  cLLeft.nodeReference :=pLLeft.nodeReference;
  cLLeft.borderLayout :=pLLeft.borderLayout;
equation 
  when false then
  num = pre(num);
  cRight.nodeReference = pre(cRight.nodeReference);
  cLLeft.nodeReference = pre(cLLeft.nodeReference);
  cLLeft.borderLayout = pre(cLLeft.borderLayout);
 end when;
end IContainerDrawables;

VirtualLabBuilder.src.Interfaces.IDrawable VirtualLabBuilder.src.Interfaces.IDrawable

Interfaces of the classes describing drawable elements

VirtualLabBuilder.src.Interfaces.IDrawable

Information


                        

The IDrawable interface is inherited from classes describing drawable elements. It contains the following two ''left'' connectors: pLeft and cLeft.

According to the connection rules, only the container hosting the drawable with this interface or a drawable element hosted inside the same container should be connected to its pLeft connector. And only a drawable element hosted inside the same container should be connected to its cLeft connector. The variable nodeReference of the cLeft connector has the same value than the variable nodeReference of the pLeft connector.


Connectors

TypeNameDescription
ParentpLeftConnector of drawable components
ChildcLeftConnector of drawable components

Modelica definition

partial model IDrawable 
  "Interfaces of the classes describing drawable elements" 
  import Modelica.Utilities.*;
  import Modelica.Utilities.*;
  Interfaces.Parent pLeft "Connector of drawable components ";
  Interfaces.Child cLeft "Connector of drawable components ";
  
protected 
  Integer num 
    "Number identifying the component in the virtual-lab view description";
  Integer dummy;
initial algorithm 
    cLeft.nodeReference :=pLeft.nodeReference;
    dummy :=num;
equation 
when false then
  num = pre(num);
  dummy = pre(dummy);
  cLeft.nodeReference = pre(cLeft.nodeReference);
end when;
end IDrawable;

VirtualLabBuilder.src.Interfaces.IViewElement VirtualLabBuilder.src.Interfaces.IViewElement

Interfaces of the classes describing interactive elements

VirtualLabBuilder.src.Interfaces.IViewElement

Information


                        

The IViewElement interface is inherited from classes describing basic and interactive elements. It contains the following two ''left'' connectors: pLLeft and cLLeft.

According to the connection rules, only the container hosting the element with this interface or an element hosted inside the same container should be connected to its pLLeft connector. And only an element hosted inside the same container should be connected to its cLLeft connector. The variable nodeReference and borderLayout of the cLeft connector has the same value than the variable nodeReference and borderLayout of the pLLeft connector.


Connectors

TypeNameDescription
ParentLpLLeftConnector of non drawable components
ChildLcLLeftConnector of non drawable components

Modelica definition

model IViewElement 
  "Interfaces of the classes describing interactive elements" 
  import Modelica.Utilities.*;
  import Modelica.Utilities.*;
  Interfaces.ParentL pLLeft "Connector of non drawable components ";
  Interfaces.ChildL cLLeft "Connector of non drawable components ";
  
protected 
  Integer num 
    "Number identifying the component in the virtual-lab view description";
  Integer dummy;
initial algorithm 
 cLLeft.nodeReference :=pLLeft.nodeReference;
 cLLeft.borderLayout :=pLLeft.borderLayout;
 dummy := num;
equation 
  when false then
   num = pre(num);
   dummy = pre(dummy);
   cLLeft.nodeReference = pre(cLLeft.nodeReference);
   cLLeft.borderLayout = pre(cLLeft.borderLayout);
   end when;
end IViewElement;

HTML-documentation generated by Dymola Tue Jul 24 18:58:14 2007.