oaDMFile Class Reference

Inheritance diagram for oaDMFile:

oaDMObject oaObject


Public Methods

void destroy ()
void destroy (oaSaveRecoverType type)
oaDMContainergetParent () const
void getName (oaString &name) const
void getPath (oaString &path) const
void getPath (oaSaveRecoverType type, oaString &path) const
oaDMFile * getLeader () const
oaBoolean isLeader () const
oaBoolean isPrimary () const
oaBoolean existsOnDisk () const
oaBoolean existsOnDisk (oaSaveRecoverType type) const
oaUInt8 getOnDiskSize () const
void setLeader (oaDMFile *leader)
oaBoolean getLock ()
void releaseLock ()
oaDMLockStatus getLockStatus () const
oaVCVersion getVersion () const
oaCollection< oaDMFile, oaDMFile > getFollowers () const

Static Public Methods

oaDMFile * find (const oaDMContainer *parent, const oaString &name)
oaDMFile * create (const oaDMContainer *parent, const oaString &name, const oaString &srcPath)
oaDMFile * create (const oaDMContainer *parent, const oaString &name)

Public Types

enum  { dtIndex = oacDMFileDataType }

Detailed Description

The oaDMFile class represents a managed file.

The oaDMFile class can be observed by deriving from oaObserver<oaDMFile>.

Note: The oaDMFile function descriptions indicate if library access is required for the called function. If write access is necessary, this requirement also is noted.

For more information on library access, see Library Access in the detailed description for oaLib and OpenAccess 2.2 Libraries and Design Management in the Programmers Guide.


Member Function Documentation

oaDMFile * oaDMFile::create const oaDMContainer *    parent,
const oaString &    name
[static]
 

This function creates a new entry for the file with the specified name and parent. An error is thrown if an oaDMFile already exists with the same name and parent.

Note: This function requires write access to the library associated with this object (through oaLib::getAccess). An oacLibAccessDenied exception is thrown if write access to the library does not exist.

For more information on library access, see Library Access in the detailed description for oaLib and OpenAccess 2.2 Libraries and Design Management in the Programmers Guide.

Parameters:
parent The parent of the file to be created
name The name of the file to be created
Exceptions:
oacDMFileExists 
oacLibAccessDenied 

oaDMFile * oaDMFile::create const oaDMContainer *    parent,
const oaString &    name,
const oaString &    path
[static]
 

This function copies a file from the specified path into the library directory. An exception is thrown if an oaDMFile already exists with the same name and parent.

Parameters:
parent The parent of the file to be created
name The name of the file to be created
path The path of the file to be copied from
Exceptions:
oacDMFileExists 
oacLibAccessDenied 

void oaDMFile::destroy oaSaveRecoverType    type
 

This function destroys the specified oaSaveRecoverType file. An exception is thrown if the specified type is not found.

Parameters:
type Either oacAutoSaveType or oacCriticalSaveType
Exceptions:
oacSaveRecoverFileDoesNotExistOnDisk 

void oaDMFile::destroy  
 

This function destroys this oaDMFile.

This function requires write access to the library associated with this object (through a call to oaLib::getAccess). An oacLibAccessDenied exception is thrown if write access to the library does not exist.

For more information on library access, see Library Access in the detailed description for oaLib and OpenAccess 2.2 Libraries and Design Management in the Programmers Guide.

Exceptions:
oacLibAccessDenied 

oaBoolean oaDMFile::existsOnDisk oaSaveRecoverType    type const
 

This function destroys the specified oaSaveRecoverType file. An exception is thrown if the specified type does not exist.

Parameters:
type Either oacAutoSaveType or oacCriticalSaveType
Exceptions:
oacSaveRecoverFileDoesNotExistOnDisk 

oaBoolean oaDMFile::existsOnDisk   const
 

This function returns true if this file exists on disk.

oaDMFile * oaDMFile::find const oaDMContainer *    parent,
const oaString &    name
[static]
 

This function finds and returns the file with the specified name and parent if it exists. If not found, NULL is returned.

This function requires access to the library associated with this object (through a call to oaLib::getAccess). An oacLibAccessDenied exception is thrown if access to the library does not exist.

For more information on library access, see Library Access in the detailed description for oaLib and OpenAccess 2.2 Libraries and Design Management in the Programmers Guide.

Parameters:
parent The parent of the file
name The name of the file
Exceptions:
oacLibAccessDenied 

oaCollection< oaDMFile, oaDMFile > oaDMFile::getFollowers   const
 

This function is to get a collection of all of the followers of a file. If this file does not have followers, the collection will be empty.

This function requires access to the library associated with this object (through a call to oaLib::getAccess). An oacLibAccessDenied exception is thrown if access to the library does not exist.

For more information on library access, see Library Access in the detailed description for oaLib and OpenAccess 2.2 Libraries and Design Management in the Programmers Guide.

Exceptions:
oacLibAccessDenied 

oaDMFile * oaDMFile::getLeader   const
 

This function returns the leader of this oaDMFile. If this file is not a follower, NULL will be returned.

This function requires access to the library associated with this object (through a call to oaLib::getAccess). An oacLibAccessDenied exception is thrown if access to the library does not exist.

For more information on library access, see Library Access in the detailed description for oaLib and OpenAccess 2.2 Libraries and Design Management in the Programmers Guide.

Exceptions:
oacLibAccessDenied 

oaBoolean oaDMFile::getLock  
 

This function is used to get a write lock on the specified file. If the lock is successfully obtained, true is returned; otherwise, false is returned.

Note: When a file is locked by the current or any other process and a lock is requested, the lock request is denied (this function returns false).

oaDMLockStatus oaDMFile::getLockStatus   const
 

This function returns the lock status of this file.

void oaDMFile::getName oaString &    name const
 

This function returns the name of this oaDMFile in the user-supplied name parameter.

oaUInt8 oaDMFile::getOnDiskSize   const
 

This function returns on disk size of the DM file. If the file does not exist on disk, an error is thrown.

Exceptions:
oacDMFileDoesNotExistOnDisk 

oaDMObject * oaDMFile::getParent   const
 

This function returns the parent of this oaDMFile.

This function requires access to the library associated with this object (through a call to oaLib::getAccess). An oacLibAccessDenied exception is thrown if access to the library does not exist.

For more information on library access, see Library Access in the detailed description for oaLib and OpenAccess 2.2 Libraries and Design Management in the Programmers Guide.

Exceptions:
oacLibAccessDenied 

void oaDMFile::getPath oaSaveRecoverType    type,
oaString &    name
const
 

This function returns the path of the oaSaveRecoverType file that is specified.

Parameters:
type Either oacAutoSaveType or oacCriticalSaveType
name The filename to match

void oaDMFile::getPath oaString &    name const
 

This function returns the path of the specified file.

Parameters:
name The filename to match

oaVCVersion * oaDMFile::getVersion   const
 

This function returns the current version of this file.

oaBoolean oaDMFile::isLeader   const
 

This function returns true if this file is a leader file, with other files as its followers.

oaBoolean oaDMFile::isPrimary   const
 

This function returns true if this file is a primary file for a cellView.

void oaDMFile::releaseLock  
 

This function is used to release a lock on the current file.

void oaDMFile::setLeader oaDMFile *    leader
 

This function is used to set the specified oaDMFile leader as the leader for this oaDMFile. Leader and follower files must belong to same parent. OA does not support multiple levels of leader-follower relationships, so if the file is a leader, it cannot also be a follower. A primary file can be a leader, but cannot be a follower.

Note: This function requires current write access to the library associated with this object (through oaLib::getAccess). An oacLibAccessDenied exception is thrown if write access to the library does not exist.

For more information on library access, see Library Access in the detailed description for oaLib.

Parameters:
leader The specified leader file
Exceptions:
oacCannotHaveMultiLevelFollowers 
oacPrimaryCannotBeFollower 
oacLeaderFollowerNotInSameParent 
oacLibAccessDenied 


Member Enumeration Documentation

anonymous enum
 

Enumeration values:
dtIndex 


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

Return to top of page