oaCMObjectIDRef Class Reference

Inheritance diagram for oaCMObjectIDRef:

oaCMObjectRef


Public Methods

 oaCMObjectIDRef (const sd::sdObject *def, void *object, oaCMObjectRefTbl *tbl, oaTimeStamp timeStamp, oaBoolean isNew=false, oaCMObjectRef::SPtr scope=NULL)
virtual ~oaCMObjectIDRef ()
virtual void accept (sr::srVisitorMgr &visitor)
virtual void passivate ()
virtual void activate ()
virtual oaCMDatabaseRef::SPtr getDatabase () const
oaCMObjectRef::SPtr getScope () const
oaCMStringEntry::SPtr getName () const
void setName (oaCMStringEntry::SPtr name)

Public Types

typedef oaCMObjectIDRef * 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 oaCMObjectIDRef is an object reference in which the object can be identified by a single string. oaCMObjectIDRefs are managed by oaChangeSets.

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

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

Reimplemented from oaCMObjectRef.


Constructor & Destructor Documentation

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

This function is the oaCMObjectIDRef constructor.

Parameters:
def A pointer to the schema definition object.
object A pointer to the object.
tbl A pointer to the table containing the IDs for the reference objects.
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 oaCMObjectIDRef. The default is the block domain.

oaCMObjectIDRef::~oaCMObjectIDRef   [virtual]
 

This is the oaCMObjectIDRef destructor.


Member Function Documentation

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

This function activates (marks as valid) this oaCMObjectIDRef.

Reimplemented from oaCMObjectRef.

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

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

Implements oaCMObjectRef.

const oaCMStringEntry::SPtr oaCMObjectIDRef::getName   const
 

This function returns a smart pointer to the oaCMStringTblEntry for this oaCMObjectIDRef.

oaCMObjectRef::SPtr oaCMObjectIDRef::getScope   const
 

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

void oaCMObjectIDRef::passivate   [virtual]
 

This function passivates (marks as invalid) this oaCMObjectIDRef.

Reimplemented from oaCMObjectRef.

void oaCMObjectIDRef::setName oaCMStringEntry::SPtr    name
 

This function sets the name to the given string entry. It increments the reference count of that string entry.

Parameters:
name The string entry to set on this oaCMObjectIDRef.


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

Return to top of page