OpenAccess calls various callback functions when you open, reopen, revert, save, or purge a design. As with all callbacks, an application registers the desire to receive these callbacks by creating its own class that is derived from the callback class defined in the API. The application then constructs an instance of the derived callback class. The constructor registers the callback instance, and the database calls the virtual functions it has defined when the appropriate events occur.
The callbacks discussed here are the functions on the oaObserver<oaDesign> class. The application must create a class derived from oaObserver<oaDesign>, then implement the virtual functions such as onFirstOpen or onPreSave.
This table shows where each of the oaObserver<oaDesign> functions are invoked by listing a pair of oaDesign operations (first and second function calls on a given design) and showing the functions (callbacks) that will be triggered by those operations.
Key: | w |
write |
a |
append | |
r |
read |
- First call on a given design - | - Second call on the given design - | ||||||
Action | Mode Used | Callbacks | Action | Mode used | Callback | Final Mode | Resulting Status |
---|---|---|---|---|---|---|---|
open | w a r |
onFirstOpen | close | onPurge | |||
open | w | onFirstOpen | open | w r |
w | No change in database | |
open | w | onFirstOpen | open | a | onPreReopen onPostReOpen |
a |
No change in database |
open | a | onFirstOpen | open | a r |
a | No change in database | |
open | a | onFirstOpen | open | w | onPreReopen onTruncate onPostReOpen |
w | Database contents discarded |
open | r | onFirstOpen | open | r | r | ||
open | r | onFirstOpen | open | a | onPreReopen onPostReOpen |
a | No change in database |
open | r | onFirstOpen | open | w | onPreReopen onTruncate onPostReOpen |
w | Database contents discarded |
open | w a r |
onFirstOpen | reopen | w a r |
w a |
If reopened in same mode | |
open | w | onFirstOpen | reopen | a | onPreReopen onPostReopen |
a | No change in database |
open | w a |
onFirstOpen | reopen | r | onPreReopen onTruncate onFirstOpen onPostReopen |
r | Reread from disk |
open | a | onFirstOpen | reopen | w | onPreReopen onTruncate onPostReopen |
w | Database contents discarded |
open | r | onFirstOpen | reopen | w | onPreReopen onTruncate onPostReopen |
w | Database contents discarded |
open | r | onFirstOpen | reopen | a | onPreReopen onPostReopen |
a | No change in database |
open | r | onFirstOpen | reopen | r | |||
open | w a |
onFirstOpen | save | onPreSave onPostSave |
a | Disk file changed | |
open | w a r |
onFirstOpen | purge | onPurge | w a r |
No change in mode | |
open | w a r |
onFirstOpen | revert | onTruncate onFirstOpen |
w a r |
Reread from disk Database contents discarded |
|
open | w a r |
onFirstOpen | saveAs | onPreSaveAs onPostSaveAs |
w a r |
No change in mode No change in database |
Binding is defined as connecting an object in one database to a related object in another database. When binding is done, the first object is represented in memory with a pointer to the object to which it is bound.
Binding occurs between Design databases and a Tech database for numerous types of objects. For example, oaViaHeader::getViaDef requires a binding between these two objects.
The current version of OpenAccess always binds a cross-database reference if the referenced object is in memory. Hence, when an oaDesign is first opened, all instances and instHeaders that point to it are bound. In addition, all the instTerms on those instances are bound if a corresponding Terminal exists on the newly-read master.
Return to Programmers Guide topics
Copyright © 2001-2010 Cadence Design Systems, Inc.
All rights reserved.