|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.byu.ece.edif.tools.sterilize.lutreplace.EdifEnvironmentCopy
public class EdifEnvironmentCopy
This class copies an EdifEnvironment and maintains an association between the objects in the old EdifEnvironment and the objects in the new EdifEnvironment.
This class was intended to be extended by overriding some of the methods. Custom "copy" classes can be created that actually copy and modify.
| Field Summary | |
|---|---|
protected java.util.HashMap<EdifCell,EdifCell> |
_cellMap
|
protected java.util.HashMap<EdifCellInstance,EdifCellInstance> |
_instanceMap
|
protected java.util.HashMap<EdifLibrary,EdifLibrary> |
_libMap
|
protected java.util.HashMap<EdifNet,EdifNet> |
_netMap
|
protected EdifEnvironment |
_newEnv
|
protected EdifEnvironment |
_origEnv
|
protected java.util.HashMap<EdifPort,EdifPort> |
_portMap
|
| Constructor Summary | |
|---|---|
EdifEnvironmentCopy(EdifEnvironment env)
This constructor will create a copy of the EdifEnvironmentCopy object. |
|
| Method Summary | |
|---|---|
protected void |
addChildEdifCellInstance(EdifCell origCell,
EdifCell newCell,
EdifCellInstance oldChildInstance)
|
protected void |
addChildEdifCellInstances(EdifCell origCell,
EdifCell newCell)
|
protected void |
addEdifPortRef(EdifNet newNet,
EdifPortRef oldRef)
|
protected void |
addEdifPorts(EdifCell origCell,
EdifCell newCell)
|
protected EdifNet |
addNet(EdifCell origCell,
EdifCell newCell,
EdifNet oldNet)
|
protected void |
addNets(EdifCell origCell,
EdifCell newCell)
|
protected EdifCell |
copyEdifCell(EdifCell origCell)
Finds associated library in new environment and uses it as well as the old name. |
protected EdifCell |
copyEdifCell(EdifCell origCell,
EdifLibrary destLibrary)
Uses name of original EdifCell for name of new cell. |
EdifCell |
copyEdifCell(EdifCell origCell,
EdifLibrary destLibrary,
EdifNameable name)
Copy the given EdifCell from the original Environment and add it to the new environment. |
protected EdifLibrary |
copyEdifLibrary(EdifLibrary origLib)
Create library using same name as in old library. |
protected EdifLibrary |
copyEdifLibrary(EdifLibrary origLib,
EdifNameable libName)
Copies a new library based on the old library. |
EdifEnvironment |
createEdifEnvironment()
Initiates the copying of the old environment and the creation of a new environment. |
EdifEnvironment |
createEdifEnvironment(EdifNameable name)
Initiates the copying of the old environment and the creation of a new environment. |
protected EdifCell |
createTopCell(EdifCell oldTopCell)
Create the top-level EdifCell (recursive) |
protected void |
createTopDesign()
This method creates the top-level design for the new environment. |
EdifEnvironment |
getNewEnvironment()
|
protected void |
setEdifEnvironmentDateAuthorProgramVersion()
Copy the date, author, program, and version of the old environment into the new environment. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.util.HashMap<EdifCellInstance,EdifCellInstance> _instanceMap
protected java.util.HashMap<EdifPort,EdifPort> _portMap
protected java.util.HashMap<EdifNet,EdifNet> _netMap
protected java.util.HashMap<EdifCell,EdifCell> _cellMap
protected java.util.HashMap<EdifLibrary,EdifLibrary> _libMap
protected EdifEnvironment _newEnv
protected EdifEnvironment _origEnv
| Constructor Detail |
|---|
public EdifEnvironmentCopy(EdifEnvironment env)
throws EdifNameConflictException
env - Environment to copy
EdifNameConflictException| Method Detail |
|---|
public EdifEnvironment createEdifEnvironment()
throws EdifNameConflictException
The name of the new environment will be assigned to the name of the old environment.
EdifNameConflictException
public EdifEnvironment createEdifEnvironment(EdifNameable name)
throws EdifNameConflictException
The name of the new environment is determined by the name parameter.
This method performs three steps: - Create new environment - Copy the properties of the environment - Copy Date, Author, Program, and Version of Environment - Create the top-level design and all EdifCells needed for design (recursive call)
EdifNameConflictExceptionpublic EdifEnvironment getNewEnvironment()
protected void setEdifEnvironmentDateAuthorProgramVersion()
protected void createTopDesign()
throws EdifNameConflictException
EdifNameConflictException
protected EdifCell createTopCell(EdifCell oldTopCell)
throws EdifNameConflictException
oldTopCell -
EdifNameConflictException
public EdifCell copyEdifCell(EdifCell origCell,
EdifLibrary destLibrary,
EdifNameable name)
throws EdifNameConflictException
This method performs the following steps:
origCell -
EdifNameConflictException
protected EdifCell copyEdifCell(EdifCell origCell,
EdifLibrary destLibrary)
throws EdifNameConflictException
EdifNameConflictException
protected EdifCell copyEdifCell(EdifCell origCell)
throws EdifNameConflictException
EdifNameConflictException
protected EdifLibrary copyEdifLibrary(EdifLibrary origLib,
EdifNameable libName)
throws EdifNameConflictException
This is a "shallow" copy that does not copy the cells. Instead, it creates an empty library. EdifCells are added to the library during the copyEdifCell methods.
origLib - libName -
EdifNameConflictException
protected EdifLibrary copyEdifLibrary(EdifLibrary origLib)
throws EdifNameConflictException
origLib -
EdifNameConflictException
protected void addEdifPorts(EdifCell origCell,
EdifCell newCell)
throws EdifNameConflictException
EdifNameConflictException
protected void addChildEdifCellInstances(EdifCell origCell,
EdifCell newCell)
throws EdifNameConflictException
EdifNameConflictException
protected void addChildEdifCellInstance(EdifCell origCell,
EdifCell newCell,
EdifCellInstance oldChildInstance)
throws EdifNameConflictException
EdifNameConflictException
protected void addNets(EdifCell origCell,
EdifCell newCell)
throws EdifNameConflictException
EdifNameConflictException
protected EdifNet addNet(EdifCell origCell,
EdifCell newCell,
EdifNet oldNet)
throws EdifNameConflictException
EdifNameConflictException
protected void addEdifPortRef(EdifNet newNet,
EdifPortRef oldRef)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||