oaDMObject Class Reference

Inheritance diagram for oaDMObject:

oaObject oaDMContainer oaDMFile oaCell oaCellView oaLib oaView


Public Methods

oaBoolean isContainer () const
oaLibgetLib () const
void getTempFile (oaString &path, oaBoolean sameFileSystem=false) const
oaUInt4 getVCStatus (oaUInt4 mask=oacVCStatusAll) const
oaVCVersionIter getVersions () const
void update (const oaVCVersion &version, oaBoolean recurse=true, const oaChar *options=NULL)
void makeEditable (oaBoolean lock, oaBoolean recurse=true, const oaChar *options=NULL)
void cancelEdit (oaBoolean recurse=true, const oaChar *options=NULL)
void commitEdits (const oaChar *comment, oaBoolean recurse=true, oaBoolean keepEditable=false, const oaChar *options=NULL)
void setControlled (oaBoolean recurse=true, const oaChar *options=NULL)
void unsetControlled (oaBoolean recurse=true, oaBoolean keepLocalRep=true, const oaChar *options=NULL)

Public Types

enum  { dbType = oacLibDBType }

Detailed Description

The oaDMObject class is an abstract base for all OpenAccess DM objects. Child classes are the oaDMContainer classes -- oaCell, oaView, oaCellView and oaLib -- and oaDMFile.

Note: The oaDMObject function descriptions indicate if access to the library associated with the object is required for the called function. If the access type must be write access, 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

void oaDMObject::cancelEdit oaBoolean    recurse = true,
const oaChar *    options = NULL
 

This function is only active when a Version Control system is in place for the library this object is in. It will cancel the editable state of the object (and it's children if "recurse" is set to "true"). Note that in most VC systems this operation will cause the underlying file(s) to revert to what's currently in the repository.

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:
recurse signals to the version control system to apply this operation to all children of this object.
options a string that represents options that are specific to the version control system that's install for this library.
Exceptions:
oacLibAccessDenied 

void oaDMObject::commitEdits const oaChar *    comment,
oaBoolean    recurse = true,
oaBoolean    keepEditable = false,
const oaChar *    options = NULL
 

This function is only active when a Version Control system is in place for the library this object is in. It will commit the current set of edits to this object to the version control system's repository.

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:
comment the comment that will be stored with the new version of this object in the repository
recurse signals to the version control system to apply this operation to all children of this object.
keepEditable setting this to true is equivalent to calling "makeEditable" immediately after this function
options a string that represents options that are specific to the version control system that's install for this library.
Exceptions:
oacLibAccessDenied 

oaLib * oaDMObject::getLib   const
 

This function returns a pointer to the library database associated with this object.

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:
oacInvalidContainer 
oacLibAccessDenied 

void oaDMObject::getTempFile oaString &    path,
oaBoolean    sameFileSystem = false
const
 

This function returns a path to a new, unique, temporary file which is associated with this object. Temporary files are not DM objects, and the management of such files is left up to the application. Temporary files are expected to be process-specific. The user may specify the directory to create the temporary file in by using the writePath argument in oaLib::open(). If the library being used has been created in the process with oaLib::create(), then the library directory is assumed to be writeable and is used for temporary file creation.

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:
path returned unique path to the temp file associated with this object.
sameFileSystem A boolean flag indicating whether the temp file should be created on the same file system as the one that the library is on
Exceptions:
oacLibAccessDenied 

oaUInt4 oaDMObject::getVCStatus oaUInt4    mask = oacVCStatusAll const
 

This function is only active when a Version Control system is in place for the library this object is in. It gets the version control status of the object. This status only relates to the given object and is not hierarchical.

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:
mask this parameter is used to limit the status bits being retrieved. Some types of status are more expensive to discover than others; use this mask to optimize performance
Exceptions:
oacLibAccessDenied 

oaVCVersionIter oaDMObject::getVersions   const
 

This function gets the versions that exist for this object in the form of an oaVCVersionIter. This information is for this object only and is not recursive.

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 oaDMObject::isContainer   const
 

This function returns true if this object is an oaDMContainer object implying that it is either an oaLib, oaCell, oaView or an oaCellView object.

void oaDMObject::makeEditable oaBoolean    lock,
oaBoolean    recurse = true,
const oaChar *    options = NULL
 

This function is only active when a Version Control system is in place for the library this object is in. It will set the version control access mode of the object (and it's children if "recurse" is "true") to be editable. On some version control systems this could result in a check-out of the underlying file(s).

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:
lock if this parameter is true, the file(s) will be locked after this call returns
recurse signals to the version control system to apply this operation to all children of this object.
options a string that represents options that are specific to the version control system that's install for this library.
Exceptions:
oacLibAccessDenied 

void oaDMObject::setControlled oaBoolean    recurse = true,
const oaChar *    options = NULL
 

This function is only active when a Version Control system is in place for the library this object is in. It adds the object to the version control system's repository.

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:
recurse signals to the version control system to apply this operation to all children of this object.
options a string that represents options that are specific to the version control system that's install for this library.
Exceptions:
oacLibAccessDenied 

void oaDMObject::unsetControlled oaBoolean    recurse = true,
oaBoolean    keepLocalRep = true,
const oaChar *    options = NULL
 

This function is only active when a Version Control system is in place for the library this object is in. It will remove the object from the version control systems repository. if keepLocalRep is "false" the local file will also be removed.

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:
recurse signals to the version control system to apply this operation to all children of this object.
keepLocalRep set to true to prevent the local file from being removed from disk after it is removed from the version control repository
options a string that represents options that are specific to the version control system that's install for this library.
Exceptions:
oacLibAccessDenied 

void oaDMObject::update const oaVCVersion &    version,
oaBoolean    recurse = true,
const oaChar *    options = NULL
 

This function is only active when a Version Control system is in place for the library this object is in. It will retrieve the given version of the object from the repository. If the object is current, it will be left unchanged; if it didn't previously exist in the local directory, it will be retrieved.

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.

Parameters:
version the version of the object to retrieve from version control. Use an oaVCVersion created with the default constructor to denote the most recent version in the repository.
recurse signals to the version control system to apply this operation to all children of this object.
options a string that represents options that are specific to the version control system that's install for this library.
Exceptions:
oacLibAccessDenied 


Member Enumeration Documentation

anonymous enum
 

Enumeration values:
dbType 


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

Return to top of page