|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectbyucc.edif.EdifLibraryManager
public class EdifLibraryManager
Represents a List of related EdifLibraries. When a cell is added, all references to the old cell are replaced with references to the new cell, and all references to the old ports are replaced with references to the new ports. A Cell with the same name can exist in two different libraries, but not in the same library.
EdifLibrary,
Serialized Form| Field Summary | |
|---|---|
private EdifEnvironment |
_edifEnvironment
The EdifEnvironment that points to this library manager. |
private ArrayListNameSpaceResolver |
_libraries
The EdifLibrary objects of this file. |
| Constructor Summary | |
|---|---|
EdifLibraryManager(EdifEnvironment edifFile)
Constructs an EdifLibraryManager Object with the specified EdifEnvironment. |
|
| Method Summary | |
|---|---|
void |
addCellDeep(EdifCell cell,
EdifLibrary targetLib)
Adds a new EdifCell to the given EdifLibrary as well as all sub-cells instanced by the given EdifCell. |
void |
addLeafCell(EdifCell leaf)
This method will search through the libraries within the manager and find the Library that is most appropriate for the given leaf cell to be added. |
boolean |
addLibrary(EdifLibrary library)
Adds a library to this library manager, and sets its library manager to 'this' |
EdifLibrary |
containsCell(EdifCell cell)
Searches for the given cell among all libraries. |
boolean |
containsLibrary(EdifLibrary lib)
|
boolean |
deleteCell(EdifCell cell,
boolean force)
Deletes a cell from the library manager, and returns whether or not the delete was successful. |
java.util.Collection |
findBlackBoxes()
This method will search through all EdifCells in the current Manager and determine which cells are not defined. |
java.util.Collection |
findCellInstancesOf(EdifCell cell)
This function will return a list of EdifCellInstances in the entire libraryManager that reference the passed in cell. |
EdifLibrary |
findEarliestLibraryToAdd(EdifCell cell,
boolean addToPrimitiveLibraryOK)
This method returns the earliest library that this cell can be added to. |
int |
findEarliestPositionToAdd(EdifLibrary add)
Returns the earliest position to add the library within the collection of libraries, so as to avoid violating the define before use rule. |
EdifLibrary |
findLatestLibraryToAdd(EdifCell cell,
boolean addToPrimitiveLibraryOK)
This method returns the latest library that this cell can be added to. |
int |
findLatestPositionToAdd(EdifLibrary add)
Returns the latest position to add the library within the collection of libraries, so as to avoid violating the define before use rule. |
EdifLibrary |
findMatchingLibrary(EdifLibrary inputLibrary)
This method will investigate all EdifCell objects found within same library as the passed-in library and find out which target library matches closest. |
java.util.Collection |
findNonReferencedCells()
This function will return a list of EdifCells that aren't referenced at all within the entire LibraryManager. |
EdifCell |
getCell(java.lang.String name)
Returns the first cell whose name matches the give String. |
java.util.List |
getCells()
This method will return a List of all cells in the library manager. |
java.util.Collection |
getCells(java.lang.String name)
Returns all the EdifCell objects whose name matches the give String. |
java.util.Collection |
getContainingLibraries(java.lang.String name)
Returns a Collection of Libraries that contain a cell of the specified name. |
EdifEnvironment |
getEdifEnvironment()
Returns the file pointing to this library manager. |
EdifLibrary |
getFirstPrimitiveLibrary()
Returns the first primitive library in the collection of libraries. |
java.util.List |
getLibraries()
Returns the libraries contained by this library manager. |
EdifLibrary |
getLibrary(java.lang.String lib)
Returns the library based on the string lib. |
java.util.Collection |
getNextLibraries(EdifLibrary lib)
Return the Collection of libraries that are defined after the specified library in the libarary manager. |
java.util.Collection |
getPreviousLibraries(EdifLibrary lib)
Return the Collection of libraries that are defined before the specified library in the libarary manager. |
java.util.Iterator |
iterator()
Returns the libraries contained by this library manager. |
boolean |
nameClash(EdifLibrary lib)
Returns true if the library can be added to the library name space, otherwise false. |
void |
pruneNonReferencedCells()
Prunes non referenced cells within the entire library manager. |
void |
tagLeafCellsAsPrimitives()
Tags all leaf cells as primitive. |
void |
tagPrimitives(EdifLibrary primitives)
Tags all primitive cells by comparing them to the cells contained within the passed-in library. |
void |
toEdif(EdifPrintWriter epw)
Print the Edif equivalent of this EdifLibraryManager. |
java.lang.String |
toString()
|
void |
trimToSize()
Trims to size all Trimmable objects in this library manager. |
void |
validateOrder()
Re-orders the libraries, and the cells within into a proper order (if they aren't already). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private ArrayListNameSpaceResolver _libraries
private EdifEnvironment _edifEnvironment
| Constructor Detail |
|---|
public EdifLibraryManager(EdifEnvironment edifFile)
edifFile - The EdifEnvironment that contains this
EdifLibraryManager| Method Detail |
|---|
public EdifLibrary containsCell(EdifCell cell)
public boolean containsLibrary(EdifLibrary lib)
public void addLeafCell(EdifCell leaf)
public void addCellDeep(EdifCell cell,
EdifLibrary targetLib)
cell - The EdifCell to addtargetLib - The library to add the cell topublic boolean addLibrary(EdifLibrary library)
library - The library to add into this manager, defaulted
to add at the earliest position
EdifLibraryManager#findPositionToAdd
public boolean deleteCell(EdifCell cell,
boolean force)
cell - The cell to be deleted.force - Forces the cell to be deleted even if it's still
referenced within the library manager.
EdifLibrary.deleteCell(EdifCell,boolean)public EdifLibrary findMatchingLibrary(EdifLibrary inputLibrary)
public java.util.Collection findCellInstancesOf(EdifCell cell)
cell - The cell to check references for
EdifLibrary.findCellInstancesOf(byucc.edif.EdifCell)public java.util.Collection findNonReferencedCells()
pruneNonReferencedCells()public int findEarliestPositionToAdd(EdifLibrary add)
add - The library to add to the earliest position
EdifLibraryManager#findPositionToAddpublic int findLatestPositionToAdd(EdifLibrary add)
add - The library to add to the latest position
EdifLibraryManager#findPositionToAdd
public EdifLibrary findEarliestLibraryToAdd(EdifCell cell,
boolean addToPrimitiveLibraryOK)
cell - The cell to be added into which library.addToPrimitiveLibraryOK - Specifies whether or not it is
ok to add the cell to a primitive library.
EdifLibrary.findEarliestPositionToAdd(byucc.edif.EdifCell)
public EdifLibrary findLatestLibraryToAdd(EdifCell cell,
boolean addToPrimitiveLibraryOK)
cell - The cell to be added into which library.addToPrimitiveLibraryOK - Specifies whether or not it is
ok to add the cell to a primitive library.
EdifLibrary.findLatestPositionToAdd(byucc.edif.EdifCell)public java.util.Collection findBlackBoxes()
EdifLibrary.findBlackBoxes()public EdifLibrary getFirstPrimitiveLibrary()
public EdifLibrary getLibrary(java.lang.String lib)
lib - The String that will be used to find the library
public EdifEnvironment getEdifEnvironment()
public java.util.List getLibraries()
public java.util.List getCells()
public EdifCell getCell(java.lang.String name)
name - The name of the cell to return
EdifLibrary.getCell(String)public java.util.Collection getCells(java.lang.String name)
name - The name of the cell to return
EdifLibrary.getCell(String)public java.util.Collection getContainingLibraries(java.lang.String name)
name - String name of cell to search for.
public java.util.Collection getNextLibraries(EdifLibrary lib)
lib - The library that designates the point after which
libraries will begin to be returned
public java.util.Collection getPreviousLibraries(EdifLibrary lib)
lib - The library that designates the point where the list
of libraries stops
public java.util.Iterator iterator()
public boolean nameClash(EdifLibrary lib)
lib - The library to chech to see if there is a name clash
with this libraries of this library manager
public void pruneNonReferencedCells()
public void tagLeafCellsAsPrimitives()
public void tagPrimitives(EdifLibrary primitives)
primitives - Library containing primitives to be compared
to cells.EdifCell.tagAsPrimitive(byucc.edif.EdifLibrary)public void trimToSize()
trimToSize in interface Trimablepublic void validateOrder()
public java.lang.String toString()
toString in class java.lang.Objectpublic void toEdif(EdifPrintWriter epw)
toEdif in interface EdifOutepw - The EdifPrintWriter Object that the interfacing
Object will write EDIF data to
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||