FreeHEP API
Version current

org.freehep.jaco.rtti.cpp
Class Scope

java.lang.Object
  extended byorg.freehep.jaco.rtti.cpp.Scope

public class Scope
extends Object

Source Code:
Scope.java

Field Summary
 String scopeName
          Name of the scope (set only for class/function scopes).
 
Constructor Summary
Scope(Scope p)
          Creates an unnamed scope (like for compound statements).
Scope(String name, boolean isType, Scope p)
          Creates a scope object with a given name.
 
Method Summary
 String getName(String name)
          looks up the name in this scope.
 Scope getScope(String name)
           
 boolean isTypeName(String name)
          Checks if a given name is the name of a type in this scope.
 void putTypeName(String name)
          Inserts a name into the table to say that it is the name of a type.
 void putTypeName(String name, Scope sc)
          A type with a scope (class/struct/union).
 void putUsingName(String name)
          Puts a using declaration into the usingTable.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

scopeName

public String scopeName
Name of the scope (set only for class/function scopes).

Constructor Detail

Scope

public Scope(String name,
             boolean isType,
             Scope p)
Creates a scope object with a given name.


Scope

public Scope(Scope p)
Creates an unnamed scope (like for compound statements).

Method Detail

putTypeName

public void putTypeName(String name)
Inserts a name into the table to say that it is the name of a type. There was a bug. The simple type declarartion override the existing type definition. Correction made: 11/20/97 by Ferenc Magyar


putTypeName

public void putTypeName(String name,
                        Scope sc)
A type with a scope (class/struct/union).


isTypeName

public boolean isTypeName(String name)
Checks if a given name is the name of a type in this scope.


getScope

public Scope getScope(String name)

putUsingName

public void putUsingName(String name)
Puts a using declaration into the usingTable. The key is the className, while the value is the fullName FIXME: if the className exists in the local table, this is an error but nothing special is done


getName

public String getName(String name)
looks up the name in this scope. If it does not exist, the lookup is done in the usingTable. null is returned if it also does not exist there


FreeHEP API
Version current

Copyright © 2000-2004 FreeHEP, All Rights Reserved.