engine
Class ModuleInstanceDescription

java.lang.Object
  |
  +--engine.Symbol
        |
        +--engine.ModuleInstanceDescription
Direct Known Subclasses:
ModuleArrayDescription

class ModuleInstanceDescription
extends Symbol

Describes the way a module is instantiated (it describes the assignements between the container module and the submodule ports).

See Also:
Serialized Form

Field Summary
(package private)  Delay3Description delays
           
(package private)  ModuleFactory descriptor
          Contains a list of (name, ExpressionDescription (these refer to the parent !)) pairs to be linked to ports by names.
(package private)  java.lang.String descriptorName
          The name of descriptor(if forward referenced).
(package private)  java.util.Vector parameters
          Holds the expressions that parameters will be assigned to
(package private)  java.util.Hashtable portsHash
           
(package private)  java.util.Vector portsVector
          Contains the Expressions (these refer to the parent !) descriptions to be linked to ports in an odered list.
(package private)  byte strength
          The primitve Strength (If this is a primitive instance).
 
Fields inherited from class engine.Symbol
blockType, connType, funcType, intType, lineNo, moduleArType, moduleType, name, paramType, portType, realType, regType, taskType, udpType, wireType
 
Constructor Summary
(package private) ModuleInstanceDescription(java.lang.String name, int lineNo, java.lang.String descriptorName, ModuleFactory descriptor, byte strength, Delay3Description delays, java.util.Vector portsVector, java.util.Hashtable portsHash, java.util.Vector parameters)
          Creates a new ModuleInstanceDescription object.
 
Method Summary
 void breakLink()
          Used during the serialization process in order to prevent other descriptions reffered by a ModuleDescription to be serialized
 int getType()
           
(package private)  java.lang.Object instantiate(NameSpace parent, ScopeNode scope)
           
(package private)  java.util.Vector instantiateParams(NameSpace ns)
           
(package private)  void orderPorts(java.util.Vector conList, java.util.Hashtable conHash)
          If 'by name' connection, order the ports to match descriptor.ConnectionList order.
(package private)  void resolveDescriptor(NameSpace parent)
          Finds the right descriptor and sets it up for the next instantiation.
 
Methods inherited from class engine.Symbol
toString
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

portsVector

java.util.Vector portsVector
Contains the Expressions (these refer to the parent !) descriptions to be linked to ports in an odered list.

portsHash

java.util.Hashtable portsHash

descriptor

ModuleFactory descriptor
Contains a list of (name, ExpressionDescription (these refer to the parent !)) pairs to be linked to ports by names. Hashtable portsHash; /** The descriptor of the submodule.

descriptorName

java.lang.String descriptorName
The name of descriptor(if forward referenced). Must be resolved at instantiation time.

parameters

java.util.Vector parameters
Holds the expressions that parameters will be assigned to

strength

byte strength
The primitve Strength (If this is a primitive instance).

delays

Delay3Description delays
Constructor Detail

ModuleInstanceDescription

ModuleInstanceDescription(java.lang.String name,
                          int lineNo,
                          java.lang.String descriptorName,
                          ModuleFactory descriptor,
                          byte strength,
                          Delay3Description delays,
                          java.util.Vector portsVector,
                          java.util.Hashtable portsHash,
                          java.util.Vector parameters)
Creates a new ModuleInstanceDescription object.
Parameters:
descriptorName - the name of the module (if the name should be resolved to a Description at instantiation time.
descriptor - the ModuleDescription (if the name coul be resolved at parse time (can be null, and in this case, the named is resolved at instantiation time)
strength - if this is a UDP (or standard) primitive instance, holds the strength ( the default strength should be explicitely given)
portsHash - holds a hashtable with (portname, to-be-assigned-to expression) pairs, if the instantiation gives the connections in this form. One of the portsHash and portsVector parameters should be null.
portsVector - holds the values to be assigned (in the given order) to the ports.
Method Detail

instantiateParams

java.util.Vector instantiateParams(NameSpace ns)
                             throws ParseException,
                                    InterpretTimeException

resolveDescriptor

void resolveDescriptor(NameSpace parent)
                 throws ParseException
Finds the right descriptor and sets it up for the next instantiation.

orderPorts

void orderPorts(java.util.Vector conList,
                java.util.Hashtable conHash)
          throws ParseException
If 'by name' connection, order the ports to match descriptor.ConnectionList order.

instantiate

java.lang.Object instantiate(NameSpace parent,
                             ScopeNode scope)
                       throws ParseException
Overrides:
instantiate in class Symbol

breakLink

public void breakLink()
Used during the serialization process in order to prevent other descriptions reffered by a ModuleDescription to be serialized
See Also:
NameSpaceDescription.breakLinks

getType

public int getType()
Overrides:
getType in class Symbol