org.media.mn8
Class Scope

java.lang.Object
  |
  +--org.media.mn8.Scope
All Implemented Interfaces:
Cloneable
Direct Known Subclasses:
GlobalScope

public class Scope
extends Object
implements Cloneable

The base implementation of a Scope.

Version:
$Revision: 1.14 $ $Date: 2002/06/05 14:31:36 $
Author:
Remus Pereni

Field Summary
protected  Scope _prev
          The upper (in hierarchy) scope.
 
Constructor Summary
Scope(Scope prev)
          The default constructor.
 
Method Summary
 void clear()
           
 Object clone()
           
 String getForcedType(String instanceName)
           
 Concept getInstance(String variable_name)
          Returns a variable from the local scope.
 Scope getPrevScope()
          Returns the previous (upper in hierarchy) scope.
 void insertInstance(String variable_name, Concept variable)
          Inserts a variable into the local scope.
 boolean isForcedInstance(String instanceName)
           
 boolean isInstance(String instanceName)
           
 void setForcedType(String instanceName, String forcedType)
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_prev

protected Scope _prev
The upper (in hierarchy) scope.

Constructor Detail

Scope

public Scope(Scope prev)
The default constructor. It is protected since there will be specific implementations of this class.

Parameters:
prev - The outer scope, in which this one is situated
Method Detail

clear

public void clear()

insertInstance

public void insertInstance(String variable_name,
                           Concept variable)
Inserts a variable into the local scope.

Parameters:
variable_name - The name of the variable
variable - The variable

getInstance

public Concept getInstance(String variable_name)
Returns a variable from the local scope.

Parameters:
variable_name - The name of the wanted variable
Returns:
the variable

isInstance

public boolean isInstance(String instanceName)

isForcedInstance

public boolean isForcedInstance(String instanceName)

getForcedType

public String getForcedType(String instanceName)

setForcedType

public void setForcedType(String instanceName,
                          String forcedType)

getPrevScope

public Scope getPrevScope()
Returns the previous (upper in hierarchy) scope.

Returns:
The upper scope.

clone

public Object clone()
Overrides:
clone in class Object


"Copyright © 2000-2002 Internet Multicasting Services, media.org & noLimits Technologies. All Rights Reserved."