ILib Class Reference

Inheritance diagram for ILib:

IBase


Public Methods

virtual void init (const char *libName, const char *libPath, oaLibModeEnum libMode, const char *writePath, IDMAccess *dmAccess, IAttrIter *dmAttrs=NULL)=0
virtual void libPreCreate ()=0
virtual void libPostCreate ()=0
virtual void libPreOpen ()=0
virtual void libPostOpen ()=0
virtual void libPreClose ()=0
virtual void cellCreate (const char *cellName)=0
virtual bool cellFind (const char *cellName)=0
virtual bool cellValidate (const char *cellName)=0
virtual void cellPreFind ()=0
virtual void cellValidateDestroy (ICell *cell)=0
virtual void cellDestroy (ICell *cell)=0
virtual void viewCreate (const char *viewName, const char *viewType)=0
virtual bool viewFind (const char *viewName, const char *viewType)=0
virtual bool viewValidate (const char *viewName, const char *viewType)=0
virtual void viewPreFind (const char *viewName)=0
virtual void viewPreFind ()=0
virtual void viewValidateDestroy (IView *view)=0
virtual void viewDestroy (IView *view)=0
virtual void cellViewCreate (const char *cName, const char *vName, const char *vtName)=0
virtual bool cellViewFind (const char *cName, const char *vName, const char *vtName)=0
virtual bool cellViewFindViewType (const char *cName, const char *vName, char *vtName)=0
virtual bool cellViewValidate (const char *cName, const char *vName, const char *vtName)=0
virtual void cellViewPreFind (ICell *cell)=0
virtual void cellViewPreFind (IView *view)=0
virtual void cellViewPreFind ()=0
virtual void cellViewPreSetView (ICellView *cv, IView *view, IDMFile *newPrimary)=0
virtual void cellViewPostSetView (ICellView *cv)=0
virtual void cellViewValidateDestroy (ICellView *cv)=0
virtual void cellViewDestroy (ICellView *cv)=0
virtual void fileCreate (const char *name, IDMObject *parent, bool primary)=0
virtual bool fileFind (const char *name, IDMObject *parent)=0
virtual bool fileValidate (const char *name, IDMObject *parent)=0
virtual void filePreFind (IDMObject *parent)=0
virtual void filePreSetLeader (IDMFile *file, IDMFile *leader)=0
virtual void filePostSetLeader (IDMFile *file)=0
virtual void filePreSetName (IDMFile *file, const char *name)=0
virtual void filePostSetName (IDMFile *file)=0
virtual void fileValidateDestroy (IDMFile *file)=0
virtual void fileDestroy (IDMFile *file)=0
virtual bool fileGetCache (IDMFile *file, IString *&path)=0
virtual void fileReleaseCache (IDMFile *file, const char *path)=0
virtual void getPath (IDMFile *file, IString *&path)=0
virtual void getTempFile (IDMObject *dmObject, bool sameFileSystem, IString *&path)=0
virtual void getDMSystemName (IString *&dmSystem)=0
virtual void getAttributes (IAttrIter *&dmAttrs)=0
virtual void setAttributes (IAttrIter *dmAttrs)=0
virtual void getPath (IDMFile *file, oaSaveRecoverTypeEnum type, IString *&path)=0
virtual void fileCreate (IDMFile *file, oaSaveRecoverTypeEnum type)=0
virtual void fileValidateDestroy (IDMFile *file, oaSaveRecoverTypeEnum type)=0
virtual void fileDestroy (IDMFile *file, oaSaveRecoverTypeEnum type)=0
virtual bool exists (IDMFile *file, oaSaveRecoverTypeEnum type)=0

Static Public Methods

const GuidgetId ()

Detailed Description

This is an abstract class that specifies the DM library interface. This interface is used in OpenAccess to call the DM library plug-in.

The ILib class is required to be implemented by any DM plug-in implementation. Design Management library actions are initiated through the OpenAccess DM API. These actions are passed through to the DM plug-in using the ILib interface. An instance of the plug-in's implementation of the ILib class is created for each library that is opened or created in OpenAccess. Each class instance is instantiated by the factory class for the plug-in. See How to Write a Plug-in for more details.

Each function is called by OpenAccess under certain circumstances, which are described below. The plug-in is responsible for responding to the initiating action.

The actions that a plug-in might take include:

An instance of the IDMAccess class is created by OpenAccess for each library, and the instance is given to the plug-in as a parameter to ILib::init(). This class instance can be used by the plug-in in order to communicate with OpenAccess in order to take actions like adding data to the library representation.

Exceptions thrown from the plug-in are caught and rethrown as DM exceptions. Exceptions thrown using the IDMException interface class are passed to the user by way of the oaDMException class. Exceptions thrown using the IException interface class are rethrown as oaDMErrors. Other exceptions are not caught by OpenAccess.


Member Function Documentation

void ILib::cellCreate const char *    cellName [pure virtual]
 

This function is called to create a cell in the library.

The plug-in should create a cell with the given name in the library.

Parameters:
cellName Name of the cell to be created.

void ILib::cellDestroy ICell *    cell [pure virtual]
 

This function is called to destroy a cell. The cell’s destruction was previously validated using cellValidateDestroy. The implementation is responsible for removing the cell from it’s library representation.

Parameters:
cell Cell that is to be destroyed.

bool ILib::cellFind const char *    cellName [pure virtual]
 

This function is called in order to determine whether a cell with the given name exists in the library. This function is called when the cell does not exist in DM’s in-memory representation.

The plug-in should return true if the specified cell exists, and false if not. If true is returned, DM adds the cell to its in-memory representation of the library.

Parameters:
cellName Name of the cell to find.

void ILib::cellPreFind   [pure virtual]
 

This function is called before a find operation is done on the library, which requires all cells to be available. For example, this function is called before a collection of cells for the library is constructed.

bool ILib::cellValidate const char *    cellName [pure virtual]
 

This function is called in order to validate that a cell with the given name exists in the library. This function is called when the cell exists in DM’s representation of the library. The plug-in should return true if the specified cell exists and false if not. If false is returned, DM will remove the cell from its in-memory representation of the library.

Parameters:
cellName Name of the cell to validate.

void ILib::cellValidateDestroy ICell *    cell [pure virtual]
 

This function is called before the cell is destroyed, in order to validate the destroy operation. Note that a cell destroy operation destroys the cell as well as all objects contained in the cell. This function is called only for the top-level object (in this case, the cell) that is to be destroyed.

The implementation of this function should validate that the destroy operation is ok for the cell and all objects contained in the cell. If not, an exception should be thrown.

Parameters:
cell Cell that is to be destroyed.

void ILib::cellViewCreate const char *    cName,
const char *    vName,
const char *    vtName
[pure virtual]
 

This function is called to create a cellView in the library. It is assumed (and validated by DM) that the cell and the view with the given names exist in the library.

The plug-in should create a cellView with the given cell and view parents. The parent cell is identified by the cName parameter, and the parent view is identified by the vName and vType parameters.

Parameters:
cName Name of the parent cell of the cellView.
vName Name of the parent view of the cellView.
vtName ViewType of the parent view of the cellView.

void ILib::cellViewDestroy ICellView *    cv [pure virtual]
 

This function is called to destroy a cellView. The cellView’s destruction was previously validated using cellViewValidateDestroy, cellValidateDestroy, or viewValidateDestroy. The implementation is responsible for removing the cellView from it’s library representation.

Parameters:
cv CellView that is to be destroyed.

bool ILib::cellViewFind const char *    cName,
const char *    vName,
const char *    vtName
[pure virtual]
 

This function is called to determine whether a cellView with the specified parents exists in the library. The parent cell is specified with the cName argument, and the parent view is specified with the vName and vtName arguments.

This function is called when the cellView does not exist in DM. The plug-in should return true if the specified cellView exists, and false if not. If true is returned, DM adds the cellView to its in-memory representation of the library.

Parameters:
cName Name of the parent cell of the cellView.
vName Name of the parent view of the cellView.
vtName ViewType of the parent view of the cellView.

bool ILib::cellViewFindViewType const char *    cName,
const char *    vName,
char *    vtName
[pure virtual]
 

This function is called to determine whether a cellView with the specified parents exists in the library. The parent cell is specified with the cName argument, and the parent view is specified with the vName argument.

This function is called when the cellView does not exist in DM, and the cellView has been referenced by cellName and viewName. The plug-in should return true if the specified cellView exists, and false if not. If the cellView is found, the plugIn must return the viewType to DM through the parameter vtName.

If true is returned, DM adds the cellView to its in-memory representation of the library.

Parameters:
cName Name of the parent cell of the cellView.
vName Name of the parent view of the cellView.
vtName ViewType of the parent view of the cellView. This parameter is filled in for the existing cellView by the plug-in.

void ILib::cellViewPostSetView ICellView *    cv [pure virtual]
 

This function is called after a setView operation is performed on a cellView.

Parameters:
cv CellView object that was changed.

void ILib::cellViewPreFind   [pure virtual]
 

This function is called before a find operation is done on the library that requires all cellViews in the library to be available . For example, this function is called before a collection of cellViews for the library is constructed.

void ILib::cellViewPreFind IView *    view [pure virtual]
 

This function is called before a find operation is done on the library that requires all cellViews with the given parent view to be available. For example, this function is called before a collection of cellViews by view is constructed.

Parameters:
view Parent of the cellViews to be found.

void ILib::cellViewPreFind ICell *    cell [pure virtual]
 

This function is called before a find operation is done on the library that requires all cellViews with the given parent cell to be available. For example, this function is called before a collection of cellViews by cell is constructed.

Parameters:
cell Parent of the cellViews to be found.

void ILib::cellViewPreSetView ICellView *    cv,
IView *    view,
IDMFile *    newPrimary
[pure virtual]
 

This function is called before a setView operation is performed on a cellView. This operation sets the parent view of the cellView to a new view.

This function can reset the primary file of the cellView. If the newPrimary argument is non-NULL, this file represents the new primary file for the cellView.

Parameters:
cv CellView to be changed.
view New parent view.
newPrimary New primary file. If NULL, the primary file is not reset.

bool ILib::cellViewValidate const char *    cName,
const char *    vName,
const char *    vtName
[pure virtual]
 

This function is called in order to validate that a cellView with the specified parents exists in the library. The parent cell is specified with the cName argument, and the parent view is specified with the vName and vType arguments.

This function is called when the cellView exists in DM’s representation of the library. The plug-in should return true if the specified cellView exists and false if not. If false is returned, DM removes the cellView from its in-memory representation of the library.

Parameters:
cName Name of the parent cell of the cellView.
vName Name of the parent view of the cellView.
vtName ViewType of the parent view of the cellView.

void ILib::cellViewValidateDestroy ICellView *    cv [pure virtual]
 

This function is called before the cellView is destroyed, in order to validate the destroy operation. Note that a cellView destroy operation destroys the cellView as well as all objects contained in the cellView. This function is called only for the top-level object (in this case, the cellView) that is to be destroyed.

When implementing this function, validate that the destroy operation is correct for the cellView and all objects contained in the cellView. If not, an exception should be thrown.

Parameters:
cv CellView that is to be destroyed.

bool ILib::exists IDMFile *    file,
oaSaveRecoverTypeEnum    type
[pure virtual]
 

This function returns true if the corresponding oaSaveRecoverType file exists on disk.

Parameters:
file The file for which the oaSaveRecoverType file check is performed
type Either oacAutoSaveType or oacCriticalSaveType

void ILib::fileCreate IDMFile *    file,
oaSaveRecoverTypeEnum    type
[pure virtual]
 

This function is called to create an IDMFile type file of the specified oaSaveRecoverType.

Parameters:
file The file created
type The recover type of file to create, which is either oacAutoSaveType or oacCriticalSaveType

void ILib::fileCreate const char *    name,
IDMObject *    parent,
bool    primary
[pure virtual]
 

This function is called to create a file. The plug-in should create a file with given name in the given parent container.

Parameters:
name Name of the file to be created.
parent Parent container for the new file.
primary Indicates that the file to be created is a primary file for a cellView.

void ILib::fileDestroy IDMFile *    file,
oaSaveRecoverTypeEnum    type
[pure virtual]
 

This function is called to destroy the specified oaSaveRecoverType of IDMFile type.

Parameters:
file The file to destroy
type The recover type, which is either oacAutoSaveType or oacCriticalSaveType

void ILib::fileDestroy IDMFile *    file [pure virtual]
 

This function is called to destroy a file. The file’s destruction was previously validated using cellValidateDestroy, viewValidateDestroy, cellVieValidateDestroy, or fileValidateDestroy. The implementation is responsible for removing the file from it’s library representation.

Parameters:
file The file to be destroyed.

bool ILib::fileFind const char *    name,
IDMObject *    parent
[pure virtual]
 

This function is called to determine whether a file with the given name exists in the given parent container. This function is called when DM has no knowledge about the state of the file. The plug-in should return true if the specified file exists, and false if not. If true is returned, DM adds the file to its in-memory representation of the library.

Parameters:
name Name of the file to find.
parent Parent of the file to find.

bool ILib::fileGetCache IDMFile *    file,
IString *&    path
[pure virtual]
 

This function retrieves the cache of the file, which should remain valid for the usage of the process even if the original file is overwritten by another process. It is the responsibility of the plug-in to ensure that the cache is valid until it is released. In addition, the plug-in should create the cache if it doesn't exist and return it in path.

A boolean that indicates whether or not the cache was created is returned.

Parameters:
file File for which to get the cache.
path Returned cache.

void ILib::filePostSetLeader IDMFile *    file [pure virtual]
 

This function is called after a file leader is set. The leader may have been set to another file, or been reset to no leader status.

Parameters:
file File that had a leader set on it. The leader information is part of the file object.

void ILib::filePostSetName IDMFile *    file [pure virtual]
 

This function is called after the logical name of a file is changed.

Parameters:
file File that was changed.

void ILib::filePreFind IDMObject *    parent [pure virtual]
 

This function is called before a find operation is done to find all files with a particular parent. For example, this function is called before a collection of files by parent is constructed.

Parameters:
parent Parent of the files to be found.

void ILib::filePreSetLeader IDMFile *    file,
IDMFile *    leader
[pure virtual]
 

This function is called before a leader is set for a file.

Parameters:
file File to be changed.
leader New leader for the file. Note that the leader may be NULL. This indicates that the file has no leader.

void ILib::filePreSetName IDMFile *    file,
const char *    name
[pure virtual]
 

This function is called before a file's logical name is to be changed.

Parameters:
file File to be changed.
name New name for the file.

void ILib::fileReleaseCache IDMFile *    file,
const char *    path
[pure virtual]
 

This function releases the cache for the file, which is specified by the path parameter of the file. The caller must ensure that path points to the cache of the given file (as requested through a fileGetCache() call made by the same caller previously.)

Parameters:
file Cache file.
path Address of the cache.

bool ILib::fileValidate const char *    name,
IDMObject *    parent
[pure virtual]
 

This function is called to determine whether a file with the given name exists in the given parent container. This function is called when the file exists in DM’s representation of the library. The plug-in should return true if the specified file exists and false if not. If false is returned, DM removes the file from its in-memory representation of the library.

Parameters:
name Name of the file to validate.
parent Parent of the file to validate.

void ILib::fileValidateDestroy IDMFile *    file,
oaSaveRecoverTypeEnum    type
[pure virtual]
 

This function is called before the specified oaSaveRecoverType file is destroyed.

Parameters:
file The IDMFile type of file to destroy
type The recover type, which is either oacAutoSaveType or oacCriticalSaveType

void ILib::fileValidateDestroy IDMFile *    file [pure virtual]
 

This function is called before the file is destroyed in order to validate the destroy operation. Note that if a file is a leader, the file destroy operation destroys the file as well as all followers of the file. This function is called only for the top-level object to be destroyed.

When you implement this function, validate that the destroy operation is correct for the file and all objects contained in the file. If not correct, the implmentation should throw an exception.

Parameters:
file The file to be destroyed.

void ILib::getAttributes IAttrIter *&    dmAttrs [pure virtual]
 

This function is used to get the current set of plugin attributes for the library. Each attribute is represented by a name and value pair. Attributes are set when the library is opened or created, and also can be set using the setAttributes function.

Parameters:
dmAttrs A pointer to an attribute iterator, which is filled with the plugin attributes.

void ILib::getDMSystemName IString *&    dmSystem [pure virtual]
 

This function returns the current DM system name.

Parameters:
dmSystem A string that is used to return the DM system name.

const Guid & ILib::getId   [inline, static]
 

This function returns the Guid for the ILib class. This Guid is used to determine if the class contains an ILib interface.

void ILib::getPath IDMFile *    file,
oaSaveRecoverTypeEnum    type,
IString *&    path
[pure virtual]
 

This function is called by DM to get the physical path to the IDMFile type file for the specified oaSaveRecoverType.

Parameters:
file The IDMFile to match
type The recover type, which is either oacAutoSaveType or oacCriticalSaveType
path The returned path

void ILib::getPath IDMFile *    file,
IString *&    path
[pure virtual]
 

This function is called by DM to get the physical path to the file from the plug-in. The information is returned in the path argument.

Parameters:
file File to get path for.
path The physical path to the file.

void ILib::getTempFile IDMObject *    dmObject,
bool    sameFileSystem,
IString *&    path
[pure virtual]
 

This function returns a path to a new, unique, temporary file to be associated with the specified DM object. Temporary files are not DM objects. The user may specify the directory to create the temporary file by using the writePath argument in oaLib::open(). This argument is passed to the ILib interface as the writePath argument in the ILib::init() function.

Parameters:
dmObject The DM object that the temp file is to be associated with.
sameFileSystem A boolean that indicates if the file must be in the same file system as the DM object.
path A pointer to an IString that the new temp file path is returned in.

void ILib::init const char *    libName,
const char *    libPath,
oaLibModeEnum    libMode,
const char *    writePath,
IDMAccess *    dmAccess,
IAttrIter *    dmAttrs = NULL
[pure virtual]
 

This function is called once, immediately after the ILib class is instantiated. The data that is passed into this function characterizes the library. The implementation should retain that data which it considers valuable for later use.

Parameters:
libName Name of the library.
libPath The path to the library as specified to OpenAccess.
libMode The mode in which the library is to be opened.
writePath A directory path used for temporary files.
dmAccess A pointer to an instance of a IDMAccess class for this library. This class instance is provided for the plug-in to make calls back into OpenAccess.
dmAttrs A pointer to an attribute iterator. This iterator can be used by the plug-in to get the attributes that were defined for OpenAccess in this library.

void ILib::libPostCreate   [pure virtual]
 

This function is called after the library is created.

void ILib::libPostOpen   [pure virtual]
 

This function is called after the library is opened.

void ILib::libPreClose   [pure virtual]
 

This function is called before the library is closed. Once a library is closed, the ILib plug-in instance is destroyed.

void ILib::libPreCreate   [pure virtual]
 

This function is called before the library is created.

void ILib::libPreOpen   [pure virtual]
 

This function is called before the library is opened.

void ILib::setAttributes IAttrIter *    dmAttrs [pure virtual]
 

This function sets attributes while the library is open.

Parameters:
dmAttrs A pointer to an attribute iterator that contains the attributes to be set.

void ILib::viewCreate const char *    viewName,
const char *    viewType
[pure virtual]
 

This function is called to create a view in the library.

The plug-in should create a view with the given viewName and viewType in the library.

Parameters:
viewName Name of the view to be created.
viewType View type for the view to be created.

void ILib::viewDestroy IView *    view [pure virtual]
 

This function is called to destroy a view. The view’s destruction was previously validated using viewValidateDestroy. The implementation is responsible for removing the view from it’s library representation.

Parameters:
view View that is to be destroyed.

bool ILib::viewFind const char *    viewName,
const char *    viewType
[pure virtual]
 

This function is called to determine whether a view with the given name and viewType exists in the library. This function is called when the view does not exist in DM. The plug-in returns true if the specified view exists, and false if not. If true is returned, DM adds the view to its in-memory representation of the library.

Parameters:
viewName Name of the view to find.
viewType viewType of the view to find.

void ILib::viewPreFind   [pure virtual]
 

This function is called before a find operation is done on the library that requires all views to be available. For example, this function is called before a collection of views for the library is constructed.

void ILib::viewPreFind const char *    viewName [pure virtual]
 

This function is called before a find operation is done on the library that requires all views with a certain name to be available. For example, this function is called before a collection of views by viewName for the library is constructed.

Parameters:
viewName The name of the views to find.

bool ILib::viewValidate const char *    viewName,
const char *    viewType
[pure virtual]
 

This function is called in order to validate that a view with the given name and viewType exists in the library. This function is called when the view exists in DM’s representation of the library. The plug-in returns true if the specified view exists and false if not. If false is returned, DM removes the view from its in-memory representation of the library.

Parameters:
viewName Name of the view to find.
viewType ViewType of the view to find.

void ILib::viewValidateDestroy IView *    view [pure virtual]
 

This function is called before the view is destroyed in order to validate the destroy operation. Note that a view destroy operation destroys the view as well as all objects contained in the view. This function is called only for the top-level object (in this case, the view) that is to be destroyed.

When you implement this function, validate whether the destroy operation is for the view and all objects contained in the view. If not, an exception should be thrown.

Parameters:
view View that is to be destroyed.


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

Return to top of page