oaCMDatabaseRef Class Reference

Inheritance diagram for oaCMDatabaseRef:

oaCMObjectRef


Public Methods

 oaCMDatabaseRef (const sd::sdObject *def, void *object, oaCMDatabaseTbl *tbl, oaTimeStamp timeStamp, oaBoolean isNew=false)
virtual ~oaCMDatabaseRef ()
virtual void accept (sr::srVisitorMgr &visitor)
virtual void passivate ()
virtual void activate ()
virtual oaCMDatabaseRef::SPtr getDatabase () const
oaCMObjectStateEntry::SPtr getState () const
void setState (oaCMObjectStateEntry::SPtr state)

Public Types

typedef oaCMDatabaseRef * SPtr

Detailed Description

The oaCMObjectRef and its derived classes add lifecycle management to schema representation (sr) object references, and are used in the OpenAccess Change Management System (CMS).

An oaCMDatabaseRef is an object reference in which the object is a database. oaCMDatabaseRefs are managed by oaChangeSets.

When an oaCMDatabaseRef is created, it is immediately externalized. A string representation of its identifying state is stored with it. If the live object is destroyed, the oaCMDatabaseRef corresponding to the destroyed object is passivated by setting a boolean flag to indicate that the object pointer is invalid. If an undo operation recreates the live object that was destroyed, the oaCMDatabaseRef can be activated by resetting the boolean flag.

The oaCMDatabaseRef class supports a visitor design pattern interface, which uses a dual dispatch technique. The oaCMDatabaseRef class has an accept method, which provides access to a visitor. The visitor can then execute its behavior for that element.


Member Typedef Documentation

typedef oaCMDatabaseRef* oaCMDatabaseRef::SPtr
 

Reimplemented from oaCMObjectRef.


Constructor & Destructor Documentation

oaCMDatabaseRef::oaCMDatabaseRef const sd::sdObject *    def,
void *    object,
oaCMDatabaseTbl *    tbl,
oaTimeStamp    timeStamp,
oaBoolean    isNew = false
 

This function is the oaCMDatabaseRef constructor.

Parameters:
def A pointer to the schema definition object.
object A pointer to the database object.
tbl A pointer to the table containing state identifiers for all the referenced databases in the change set.
timeStamp The timestamp indicating when this object was created.
isNew This parameter is not currently used.

oaCMDatabaseRef::~oaCMDatabaseRef   [virtual]
 

This function is the oaCMDatabaseRef destructor.


Member Function Documentation

void oaCMDatabaseRef::accept sr::srVisitorMgr &    visitor [virtual]
 

This function accepts an srVisitorMgr visitor. It calls the visit function of the specified visitor on this object.

Parameters:
visitor The visitor to call on this object

void oaCMDatabaseRef::activate   [virtual]
 

This function resets a boolean flag on the oaCMDatabaseRef to indicate that the corresponding live object for this reference has been recreated (due to an undo operation after the live object was destroyed).

Reimplemented from oaCMObjectRef.

oaCMDatabaseRef::SPtr oaCMDatabaseRef::getDatabase   const [virtual]
 

This function returns a smart pointer to the database for this oaCMDatabaseRef.

Implements oaCMObjectRef.

const oaCMObjectStateEntry::SPtr oaCMDatabaseRef::getState   const
 

This function returns the oaCMObjectStateTbl entry for this oaCMDatabaseRef.

void oaCMDatabaseRef::passivate   [virtual]
 

This function sets a boolean flag on the oaCMDatabaseRef to indicate that the corresponding live object for this reference has been destroyed.

Reimplemented from oaCMObjectRef.

void oaCMDatabaseRef::setState oaCMObjectStateEntry::SPtr    state
 

This function sets the state for an oaCMDatabaseRef. The state describes an OpenAccess object that is identified by a compound state rather than a unique identifier.

Parameters:
state The state to which to set the oaCMDatabaseRef.


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

Return to top of page