oaCMObjectStateRef Class Reference

Inheritance diagram for oaCMObjectStateRef:

oaCMObjectRef


Public Methods

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

Public Types

typedef oaCMObjectStateRef * 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 oaCMObjectStateRef is an object reference in which the object can be identified by its state (a collection of its attributes and relationships). oaCMObjectStateRefs are managed by oaChangeSets.

When an oaCMObjectStateRef is created, it is immediately externalized. A string representation of its identifying state is stored with it. If the live object is destroyed, the oaCMObjectStateRef 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 oaCMObjectStateRef can be activated by resetting the boolean flag.

The oaCMObjectStateRef class supports a visitor design pattern interface, which uses a dual dispatch technique. The oaCMObjectStateRef 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 oaCMObjectStateRef* oaCMObjectStateRef::SPtr
 

Reimplemented from oaCMObjectRef.


Constructor & Destructor Documentation

oaCMObjectStateRef::oaCMObjectStateRef const sd::sdObject *    def,
void *    object,
oaCMObjectRefTbl *    tbl,
oaTimeStamp    timeStamp,
oaBoolean    isNew = false,
oaCMObjectRef::SPtr    scope = NULL
 

This is the oaCMObjectStateRef constructor.

Parameters:
def A pointer to the schema definition object.
object A pointer to the object.
tbl A pointer to the table to contain the oaCMObjectStateRef.
timeStamp The timestamp indicating when this object was created.
isNew A boolean flag indicating whether or not the reference refers to an object that is created during the course of the change set, or to a pre-existing object that was created before the begining of the change set.
scope The scope for the oaCMObjectStateRef. The default is the block domain.

oaCMObjectStateRef::~oaCMObjectStateRef   [virtual]
 

This is the oaCMObjectStateRef destructor.


Member Function Documentation

void oaCMObjectStateRef::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 oaCMObjectStateRef::activate   [virtual]
 

This function activates (marks as valid) this oaCMObjectStateRef.

Reimplemented from oaCMObjectRef.

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

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

Implements oaCMObjectRef.

oaCMObjectRef::SPtr oaCMObjectStateRef::getScope   const
 

This function returns the scope for the oaCMObjectStateRef. The default is the block domain.

const oaCMObjectStateEntry::SPtr oaCMObjectStateRef::getState   const
 

This function returns the oaCMObjectStateTbl entry for this oaCMObjectStateRef.

void oaCMObjectStateRef::passivate   [virtual]
 

This function passivates (marks as invalid) this oaCMObjectStateRef.

Reimplemented from oaCMObjectRef.

void oaCMObjectStateRef::setState oaCMObjectStateEntry::SPtr    state
 

This function sets this oaCMObjectStateRef to the specified state. It also increments the reference count on the oaCMObjectStateRef.

Parameters:
state A pointer to the oaCMObjectStateEntry to set on this oaCMObjectStateRef.


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

Return to top of page