PcellFile Class Reference


Public Methods

 PcellFile (const oaString &fileName)
 ~PcellFile ()
void open (oaChar mode)
void close ()
void read (oaDesign *subMaster, oaUInt8 offset)
oaUInt8 append (oaDesign *subMaster)
oaUInt8 getSize () const

Detailed Description

The PcellFile class is a utility class that lets IPcell interface users write Pcell subMasters to (or read Pcell subMasters from) a file.


Constructor & Destructor Documentation

PcellFile::PcellFile const oaString &    fileName
 

This is the constructor for PcellFile.

Parameters:
fileName Name of the PcellFile

PcellFile::~PcellFile  
 

This is the destructor for PcellFile.


Member Function Documentation

oaUInt8 PcellFile::append oaDesign *    subMaster
 

This function appends the contents of the specified Pcell subMaster to the file associated with this object and returns the location in that file where the subMaster is written. This location must be handed back to PCellFile::read to retrieve this saved submaster.

An exception is thrown if:

  • The given design is not a Pcell subMaster (oacCannotAppendNonSubMasterDesignToFile).
  • The specified file is not open (oacCannotAppendSubMasterToUnopenedFile).
  • The file is not open in either 'a'ppend or 'w'rite mode (oacCannotAppendSubMasterToFileInUnwritableMode).

Parameters:
subMaster pointer to subMaster
Exceptions:
oacCannotAppendNonSubMasterDesignToFile 
oacCannotAppendSubMasterToUnopenedFile 
oacCannotAppendSubMasterToFileInUnwritableMode 

void PcellFile::close  
 

This function closes the file used to read or write Pcell subMasters.

Exceptions:
oacFileCloseFailed 

oaUInt8 PcellFile::getSize   const
 

This function returns the size in bytes of the subMaster data in the cache file associated with this object.

Exceptions:
oacFileGetInfoFailed 

void PcellFile::open oaChar    mode
 

This function opens the file in the specified access mode and prepares it for reading or writing Pcell subMasters.

Parameters:
mode The mode in which to open the file
  • 'r' for read
  • 'w' for write
  • 'a' for append
Exceptions:
oacInvalidFileAccessMode 
oacFileOpenFailed 

void PcellFile::read oaDesign *    subMaster,
oaUInt8    offset
 

This function reads the contents of a Pcell subMaster from the file associated with this object starting at the specified offset. The original contents in the subMaster are cleared. An exception is thrown if:

  • The given design is not a subMaster (oacCannotReadNonSubMasterDesignFromFile).
  • The file is not open and readable (oacCannotReadSubMasterFromUnopenedFile).
  • The on-disk version of the Pcell parameters does not match the version that is specified. (oacSubMasterParamsDoNotMatchSpec).

In addition, if the given offset location does not point to a valid subMaster database, or the database is corrupted, or the database is incompatible with the current OpenAccess software, OpenAccess exceptions are thrown to indicate the error. For example, if the database is not data compatible with the current software, an oaCompatibilityError is thrown.

Parameters:
subMaster Pointer to the Pcell subMaster
offset Offset into file
Exceptions:
oacCannotReadNonSubMasterDesignFromFile 
oacCannotReadSubMasterFromUnopenedFile 
oacSubMasterParamsDoNotMatchSpec 


The documentation for this class was generated from the following files:

Return to top of page