net.sourceforge.pmd.cpd.cppast
Class Scope

java.lang.Object
  extended bynet.sourceforge.pmd.cpd.cppast.Scope
Direct Known Subclasses:
ClassScope

public class Scope
extends java.lang.Object


Field Summary
(package private)  Scope parent
          Parent scope.
(package private)  java.lang.String scopeName
          Name of the scope (set only for class/function scopes).
(package private)  boolean type
          Indicates whether this is a class scope or not.
(package private)  java.util.Hashtable typeTable
          (partial) table of type symbols introduced in this scope.
 
Constructor Summary
Scope(Scope p)
          Creates an unnamed scope (like for compound statements).
Scope(java.lang.String name, boolean isType, Scope p)
          Creates a scope object with a given name.
 
Method Summary
 Scope GetScope(java.lang.String name)
           
 boolean IsTypeName(java.lang.String name)
          Checks if a given name is the name of a type in this scope.
 void PutTypeName(java.lang.String name)
          Inserts a name into the table to say that it is the name of a type.
 void PutTypeName(java.lang.String name, Scope sc)
          A type with a scope (class/struct/union).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

scopeName

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


type

boolean type
Indicates whether this is a class scope or not.


typeTable

java.util.Hashtable typeTable
(partial) table of type symbols introduced in this scope.


parent

Scope parent
Parent scope. (null if it is the global scope).

Constructor Detail

Scope

public Scope(java.lang.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(java.lang.String name)
Inserts a name into the table to say that it is the name of a type.


PutTypeName

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


IsTypeName

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


GetScope

public Scope GetScope(java.lang.String name)


Copyright © 2002-2005 InfoEther. All Rights Reserved.