coins.opt
Class ReplaceInfo

java.lang.Object
  extended bycoins.opt.ReplaceInfo

class ReplaceInfo
extends java.lang.Object

title: ReplaceInfo class.

description: Information of global variable for replace.


Nested Class Summary
(package private)  class ReplaceInfo.Item
          title: class Item
 
Field Summary
protected  java.util.Map fReplaceMap
          Map of global var to replace information.
 
Constructor Summary
ReplaceInfo()
          Construct this object.
 
Method Summary
 void add(VarNode lGlobalVarNode)
          Add replace var node.
 void clear()
          Clear this object.
protected  ReplaceInfo.Item getItem(Sym pSym)
          get Item object related by pSym.
 Var getReplacedVar(Sym pSym)
          Get replaced temporal variable, whitch is related by pSym.
 java.util.List getReplaceNodeList(Sym pSym)
          Get List of VarNode to replace, whitch is related by pSym.
 java.util.Set getReplaceSymSet(int pCount)
          Get Set of Sym larger than pCount.
 void remove(Sym pSym)
          Remove var of replacing.
 boolean removeReplacedNode(VarNode pVarNode)
          Remove Gloval temporal var from replaced node list whitch is related by pSym.
 boolean setReplacedVar(Sym pSym, Var pVar)
          Set replaced temporal variable, whitch is related by pSym.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fReplaceMap

protected java.util.Map fReplaceMap
Map of global var to replace information. this map is formed as following. key : global var element: Item object, whitch is inner class of this.

Constructor Detail

ReplaceInfo

public ReplaceInfo()
Construct this object.

Method Detail

clear

public void clear()
Clear this object.


getItem

protected ReplaceInfo.Item getItem(Sym pSym)
get Item object related by pSym.

Parameters:
pSym - indicate to get related Item object. this may be global simple var sym.
Returns:
Item object related by pSym.

add

public void add(VarNode lGlobalVarNode)
Add replace var node.

Parameters:
lGlobalVarNode - var node of replacing.

remove

public void remove(Sym pSym)
Remove var of replacing.

Parameters:
pSym - sym of removing.

getReplaceSymSet

public java.util.Set getReplaceSymSet(int pCount)
Get Set of Sym larger than pCount.

Parameters:
pCount - use count for replace.
Returns:
Set of Sym larger than pCount.

getReplaceNodeList

public java.util.List getReplaceNodeList(Sym pSym)
Get List of VarNode to replace, whitch is related by pSym.

Parameters:
pSym - indicate to get related List of VarNode. It may be global simple var.
Returns:
List of VarNode.

getReplacedVar

public Var getReplacedVar(Sym pSym)
Get replaced temporal variable, whitch is related by pSym.

Parameters:
pSym - indicate to get related temporal variable. It may be global simple var.
Returns:
Var sym whitch is tempral varialbe of replaced.

setReplacedVar

public boolean setReplacedVar(Sym pSym,
                              Var pVar)
Set replaced temporal variable, whitch is related by pSym.

Parameters:
pSym - indicate to set related temporal variable. It may be global simple var.
pVar - temporal variable.
Returns:
true if successed, false else.

removeReplacedNode

public boolean removeReplacedNode(VarNode pVarNode)
Remove Gloval temporal var from replaced node list whitch is related by pSym.

Parameters:
pVarNode - Global temporal var whitch is replaced.
Returns:
treu if remoded, false else.