oaDMData Class Reference

Inheritance diagram for oaDMData:

oaObject oaCellDMData oaCellViewDMData oaLibDMData oaViewDMData


Public Methods

void close ()
void purge ()
void save ()
void save (oaSaveRecoverType saveRecoverType)
void reopen (oaChar mode)
void revert ()
void getLibName (oaScalarName &libName) const
void getLibName (const oaNameSpace &ns, oaString &libName) const
oaLibgetLib () const
oaChar getMode () const
oaUInt4 getRefCount () const
oaTimeStamp getTimeStamp (oaDMDataType type) const
oaBoolean isModified () const
oaBoolean isRecovered () const
void getFeatures (oaUInt4 &dataModelRev, oaFeatureArray &features)
oaCollection< oaGroup, oaDMData > getGroups () const
oaCollection< oaGroup, oaDMData > getGroups (oaGroupDef *def) const
oaCollection< oaGroup, oaDMData > getGroupsByName (const oaString &name) const
oaCollection< oaAppDef, oaDMData > getAppDefsByDataType (oaDMDataType dataType) const
oaCollection< oaAppObject, oaDMData > getAppObjects (const oaAppObjectDef *def) const
oaCollection< oaAppObjectDef, oaDMData > getAppObjectDefs () const

Static Public Methods

oaDMData * open (const oaDMContainer *container, oaChar mode)
oaDMData * recover (const oaDMContainer *container, oaSaveRecoverType saveRecoverType)
oaDMData * find (const oaDMContainer *container)
oaBoolean exists (const oaDMContainer *container)
oaBoolean exists (const oaDMContainer *container, oaSaveRecoverType saveRecoverType)
void destroy (const oaDMContainer *container)
void destroy (const oaDMContainer *container, oaSaveRecoverType saveRecoverType)
oaUInt4 getRevNumber ()
oaCollection< oaDMData, oaDMData > getOpenDMDataObjs ()

Public Types

enum  { dtIndex = oacDMDataDataType }
enum  { domain = oacNoDomain }

Detailed Description

oaDMData objects represent database objects that can be associated with a DM library, cell, view or cellView and can be used to persistently store properties (oaProp objects), groups (oaGroup objects), group members (oaGroupMember objects) and application objects (see oaAppObject).

The oaDMData class provides the behavior that is common to oaLibDMData, oaCellDMData, oaViewDMData and oaCellViewDMData.


Member Function Documentation

void oaDMData::close  
 

This function decrements the reference count of this DMData by one. If the count goes to zero, this database is purged from memory.

Exceptions:
oacCloseOnDMDataBeingPurged 

void oaDMData::destroy const oaDMContainer *    container,
oaSaveRecoverType    saveRecoverType
[static]
 

This function attempts to remove the specified oaSaveRecoverType file from disk. It throws an exception if this file cannot be found on disk.

Parameters:
container A pointer to the container for the oaDMData database
saveRecoverType Either oacAutoSaveType or oacCriticalSaveType
Exceptions:
oacDestroyDMDataDoesNotExist 
oacSaveRecoverFileDoesNotExistOnDisk 
oacInterfaceException 

oaBoolean oaDMData::destroy const oaDMContainer *    dmObj [static]
 

This function attempts to remove this oaDMData database from disk. It throws an exception if the DMData is currently open or if the DMData cannot be found on disk.

Parameters:
dmObj A pointer to the container (owner of) for the oaDMData database
Exceptions:
oacInvalidContainer 
oacDestroyDMDataOpen 
oacDestroyDMDataDoesNotExist 
oacDMDataHasReadNeedWriteAccess 
oacDMDataCannotGetWriteAccess 

oaBoolean oaDMData::exists const oaDMContainer *    container,
oaSaveRecoverType    saveRecoverType
[static]
 

This function returns a boolean that indicates whether the specified oaSaveRecoverType file exists on-disk.

Parameters:
container A pointer to the container (owner) for the oaDMData database
saveRecoverType Either oacAutoSaveType or oacCriticalSaveType

oaBoolean oaDMData::exists const oaDMContainer *    dmObj [static]
 

This function checks whether there is a DMData open that has the specified dmObj container (owner) or whether a DMData file exists on disk with a non-zero size. This function returns if either condition is true; otherwise, it returns false.

Parameters:
dmObj A pointer to the container (owner) for the oaDMData database
Exceptions:
oacInvalidContainer 

oaDMData * oaDMData::find const oaDMContainer *    dmObj [static]
 

This function attempts to find an open DM data with the specified dmObj container (owner). If successful, a pointer to the DMData database is returned. If unsuccessful, NULL is returned.

Parameters:
dmObj A pointer to the container (owner) for the oaDMData database
Exceptions:
oacInvalidContainer 
oacDMDataCannotGetReadAccess 

oaCollection< oaAppDef, oaDMData > oaDMData::getAppDefsByDataType oaDMDataType    dataType const
 

This function returns a collection of oaAppDefs of the specified dataType set on oaDMObjects in this oaDMData database.

Parameters:
dataType the data type to get

oaCollection< oaAppObjectDef, oaDMData > oaDMData::getAppObjectDefs   const
 

This function returns a collection of oaAppObjectDefs extension definitions set on oaAppObjects in this oaDMData database.

oaCollection< oaAppObject, oaDMData > oaDMData::getAppObjects const oaAppObjectDef *    def const
 

This function returns a collection of oaAppObjects with the specified def oaAppObjectDef extension definition set on them in this oaDMData database.

Parameters:
def the extension type look for

void oaDMData::getFeatures oaUInt4 &    dataModelRev,
oaFeatureArray &    features
 

This function returns the data model revision number for the database, as well as an array of the features currently in the database. The application can iterate through the array to get the ID for each feature present. Each feature ID corresponds to an oaFeatureIDEnum value.

Parameters:
dataModelRev returned data model revision
features returned feature array

oaCollection< oaGroup, oaDMData > oaDMData::getGroups oaGroupDef *    def const
 

These functions return collections of objects in or associated with this dmData.

Parameters:
def 

oaCollection< oaGroup, oaDMData > oaDMData::getGroups   const
 

This function returns the collection of groups in or associated with this oaDMData database.

oaCollection< oaGroup, oaDMData > oaDMData::getGroupsByName const oaString &    name const
 

This function returns a collection of groups in or associated with this oaDMData database with the specified name.

Parameters:
name the name of the groups to get

oaLib * oaDMData::getLib   const
 

This function returns a pointer to the lib object that this dmData database is in.

void oaDMData::getLibName const oaNameSpace &    ns,
oaString &    libName
const
 

This function returns the library name for this DMData object in the specified ns namespace.

Parameters:
ns input parameter - the namespace to use for the returned library name
libName the returned library name

void oaDMData::getLibName oaScalarName &    libName const
 

These functions returns the library name for this DMData object.

Parameters:
libName the returned library name

oaChar oaDMData::getMode   const
 

This function returns the mode ('r'ead-only, 'w'rite, or 'a'ppend) with which this DMData database is currently opened.

oaCollection< oaDMData, oaDMData > oaDMData::getOpenDMDataObjs   [static]
 

This function returns a collection of open DM data databases.

oaUInt4 oaDMData::getRefCount   const
 

This function returns the number of times this DMData has been opened without being closed.

oaUInt4 oaDMData::getRevNumber   [static]
 

This function returns the revision number for this DMData database.

oaTimeStamp oaDMData::getTimeStamp oaDMDataType    type const
 

This function returns the timeStamp value for the specified DM data dataType.

Parameters:
type an oaDMDataType value
Exceptions:
oacInvalidDMDataTypeForTimeStamp 

oaBoolean oaDMData::isModified   const
 

This function returns a boolean indicating whether or not this oaDMData database has been modified but not saved.

oaBoolean oaDMData::isRecovered   const
 

This function returns a boolean indicating whether or not this oaDMData database has been recovered.

oaDMData * oaDMData::open const oaDMContainer *    dmObj,
oaChar    mode
[static]
 

This function attempts to open a DM data database with the specified dmObj (container) owner in the given mode. If successful, a pointer to the DM Data is returned.

Parameters:
dmObj pointer to the container for (owner of) the oaDMData object
mode mode to open this oaDMData object: 'r'ead-only, 'w'rite (truncate) or 'a'ppend
Exceptions:
oacOpenUndefinedModeDMData 
oacInvalidContainer 
oacOpenOnDMDataBeingPurged 
oacDMDataDoesNotExist 
oacCannotLockDMData 
oacDMDataCannotGetReadAccess 
oacDMDataHasReadNeedWriteAccess 
oacDMDataCannotGetWriteAccess 

void oaDMData::purge  
 

This function closes and removes this DMData from memory, regardless of its reference count. Applications sometimes inadvertently attempt to recursively purge databases, so set an exception is thrown to catch this.

Exceptions:
oacPurgeOnDMDataBeingPurged 

oaDMData * oaDMData::recover const oaDMContainer *    container,
oaSaveRecoverType    saveRecoverType
[static]
 

This function attempts to recover the DM data for the given DM object with the specified oaSaveRecoverType. If successful, a pointer to the DMData object is returned.

Parameters:
container A pointer to the container (owner) for the oaDMData database
saveRecoverType Either oacAutoSaveType or oacCriticalSaveType
Exceptions:
oacSaveRecoverDMDataFileAlreadyOpened 
oacOpenOnDMDataBeingPurged 
oacDMDataDoesNotExist 
oacSaveRecoverFileDoesNotExistOnDisk 
oacInterfaceException 

void oaDMData::reopen oaChar    mode
 

This function attempts to reopen this oaDMData using the specified access mode. The contents of the DMData may be reset or even truncated depending on the new access mode.

Note that the oaDMData's refCount is not affected.

Parameters:
mode mode in which to reopen this DMData database: 'r'ead-only, 'w'rite (truncate) or 'a'ppend.
Exceptions:
oacOpenUndefinedModeDMData 
oacOpenOnDMDataBeingPurged 
oacCannotLockDMData 

void oaDMData::revert  
 

This function reloads the contents of this oaDMData from disk. If the oaDMData is opened in write mode, it will be truncated.

Note that the oaDMData's access mode is not affected.

void oaDMData::save oaSaveRecoverType    saveRecoverType
 

This function attempts to save this oaSaveRecoverType database.

Parameters:
saveRecoverType Either oacAutoSaveType or oacCriticalSaveType
Exceptions:
oacSaveReadOnlyDMData 
oacInterfaceException 

void oaDMData::save  
 

This function attempts to save this oaDMdata database.

Exceptions:
oacSaveReadOnlyDMData 


Member Enumeration Documentation

anonymous enum
 

Enumeration values:
dtIndex 

anonymous enum
 

Enumeration values:
domain 


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

Return to top of page