byucc.edif
Class EdifEnvironment

java.lang.Object
  extended by byucc.edif.NamedPropertyObject
      extended by byucc.edif.EdifEnvironment
All Implemented Interfaces:
EdifOut, Properties, Trimable

public class EdifEnvironment
extends NamedPropertyObject
implements EdifOut, Trimable

Represents an environment for representing EDIF circuits.

An EDIF environment represents a list of EDIF libraries and has a top-level EDIF design. This object has a name and is not static so multiple EdifEnvironment objects may exist in a single JVM.

Version:
$Id: EdifEnvironment.java,v 1.41 2006/08/21 22:37:58 jfc33 Exp $
See Also:
EdifDesign, EdifLibraryManager

Field Summary
private  EdifLibraryManager _libraries
          The EdifLibraryManager object representing the environment libraries.
private  EdifDesign _topDesign
          The top-level design associated with this environment.
 
Constructor Summary
EdifEnvironment(EdifNameable name)
          Construct an EdifEnvironment Object with the passed-in EdifNameable as its name Object.
EdifEnvironment(java.lang.String name)
          Construct an EdifEnvironment Object with the passed-in string as its name.
 
Method Summary
 void addLibrary(EdifLibrary library)
          Add the passed-in library to the appropriate position.
 EdifLibrary getLibrary(java.lang.String lib)
          Return the library that matches the passed in string.
 EdifLibraryManager getLibraryManager()
          Return the library manager.
 EdifCell getTopCell()
          Return the top cell of the design.
 EdifCellInstance getTopCellInstance()
          Return the top instance of the design.
 EdifDesign getTopDesign()
          Return the top design.
 void setTopDesign(EdifDesign design)
          Set the top design.
 void toEdif(EdifPrintWriter epw)
          Convert this Object to EDIF format and prints it to the passed in EdifPrintWriter.
 java.lang.String toString()
          Return a String representation of this object.
 void trimToSize()
          Trim the size of this object.
 
Methods inherited from class byucc.edif.NamedPropertyObject
addProperty, addProperty, addPropertyList, copyProperties, equals, equalsProperties, getEdifNameable, getName, getOldName, getProperty, getPropertyList, rename, rename, rename
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_libraries

private EdifLibraryManager _libraries
The EdifLibraryManager object representing the environment libraries. An empty manager is created during construction.


_topDesign

private EdifDesign _topDesign
The top-level design associated with this environment.

Constructor Detail

EdifEnvironment

public EdifEnvironment(java.lang.String name)
                throws InvalidEdifNameException
Construct an EdifEnvironment Object with the passed-in string as its name.

Parameters:
name - The name of the constructed EdifEnvironment Object
Throws:
InvalidEdifNameException

EdifEnvironment

public EdifEnvironment(EdifNameable name)
Construct an EdifEnvironment Object with the passed-in EdifNameable as its name Object.

Parameters:
name - The EdifNameable name of the constructed EdifEnvironment Object
Method Detail

addLibrary

public void addLibrary(EdifLibrary library)
                throws EdifNameConflictException
Add the passed-in library to the appropriate position.

Parameters:
library - The library to add TODO: should this method even exist?
Throws:
EdifNameConflictException

getLibrary

public EdifLibrary getLibrary(java.lang.String lib)
Return the library that matches the passed in string.

Parameters:
lib - The String name to match for when fetching the library

getLibraryManager

public EdifLibraryManager getLibraryManager()
Return the library manager.

Returns:
This EdifEnvironment's EdifLibraryManager

getTopCell

public EdifCell getTopCell()
Return the top cell of the design.

Returns:
The top EdifCell of this design

getTopCellInstance

public EdifCellInstance getTopCellInstance()
Return the top instance of the design.

Returns:
The top EdifCellInstance of this design

getTopDesign

public EdifDesign getTopDesign()
Return the top design.

Returns:
The top EdifDesign Object of this EdifEnvironment

setTopDesign

public void setTopDesign(EdifDesign design)
Set the top design.

Parameters:
design - The object that will become the new design for this EdifEnvironment

toEdif

public void toEdif(EdifPrintWriter epw)
Convert this Object to EDIF format and prints it to the passed in EdifPrintWriter.

Specified by:
toEdif in interface EdifOut
Parameters:
epw - The EdifPrintWriter that the EDIF data will be written to

toString

public java.lang.String toString()
Return a String representation of this object.

Overrides:
toString in class java.lang.Object
Returns:
A String representing the name and libraries contained in this EdifEnvironment Object

trimToSize

public void trimToSize()
Trim the size of this object.

Specified by:
trimToSize in interface Trimable