DWFCore::DWFOwnable Class Reference

#include "dwfcore/Owner.h"

Inheritance diagram for DWFCore::DWFOwnable:

Inheritance graph
[legend]
Collaboration diagram for DWFCore::DWFOwnable:

Collaboration graph
[legend]
List of all members.

Detailed Description

Generalization for classes that can be owned by others.

Since:
1.0.1
This class base is available as part of a simple object ownership mechanism in the library. Objects specializing this class may be owned by other objects that specialize the DWFOwner class.

Note:
Specializations must call _notifyDelete() from their destructor.

Definition at line 196 of file Owner.h.

Public Member Functions

virtual _DWFCORE_API ~DWFOwnable () throw ()
virtual _DWFCORE_API void own (DWFOwner &rOwner) throw ( DWFException )
virtual _DWFCORE_API bool disown (DWFOwner &rOwner, bool bForget) throw ( DWFException )
virtual _DWFCORE_API DWFOwnerowner () throw ( DWFException )
virtual _DWFCORE_API void observe (DWFOwner &rObserver) throw ( DWFException )
virtual _DWFCORE_API bool unobserve (DWFOwner &rObserver) throw ( DWFException )

Protected Member Functions

_DWFCORE_API DWFOwnable () throw ()
_DWFCORE_API void _notifyDelete () throw ()


Constructor & Destructor Documentation

virtual _DWFCORE_API DWFCore::DWFOwnable::~DWFOwnable  )  throw () [virtual]
 

Destructor

Exceptions:
None 

_DWFCORE_API DWFCore::DWFOwnable::DWFOwnable  )  throw () [protected]
 

Constructor

Exceptions:
None 


Member Function Documentation

_DWFCORE_API void DWFCore::DWFOwnable::_notifyDelete  )  throw () [protected]
 

This method notifies previous owners of the imminent destruction of this object.

Note:
Specialized classes must call this method in their destructor to ensure the proper type is available to DWFOwner::notifyOwnableDeletion() via RTTI (therefore, this cannot occur in the destructor for this class).
Exceptions:
None 

virtual _DWFCORE_API bool DWFCore::DWFOwnable::disown DWFOwner rOwner,
bool  bForget
throw ( DWFException ) [virtual]
 

Orphans this object.

Parameters:
rOwner The previous owner.
bForget if true, the previous owner will be removed from the internal observer list and not receive ownership change and object deletion notification callbacks; if false, the previous owner will continue to receive these notifications.
Exceptions:
DWFException 

Implements DWFCore::IDWFOwnable.

virtual _DWFCORE_API void DWFCore::DWFOwnable::observe DWFOwner rObserver  )  throw ( DWFException ) [virtual]
 

Informs that this object is being held onto by an "owner", but without claims of ownership.

Parameters:
rObserver The observing "owner".
Exceptions:
DWFException 
Since:
7.2

Implements DWFCore::IDWFOwnable.

virtual _DWFCORE_API void DWFCore::DWFOwnable::own DWFOwner rOwner  )  throw ( DWFException ) [virtual]
 

Claims ownership of this object.

Parameters:
rOwner The new owner.
Exceptions:
DWFException 

Implements DWFCore::IDWFOwnable.

virtual _DWFCORE_API DWFOwner* DWFCore::DWFOwnable::owner  )  throw ( DWFException ) [virtual]
 

Returns the current owner of this object.

Returns:
A pointer to the current owner or NULL if this object is an orphan.
Exceptions:
DWFException 

Implements DWFCore::IDWFOwnable.

virtual _DWFCORE_API bool DWFCore::DWFOwnable::unobserve DWFOwner rObserver  )  throw ( DWFException ) [virtual]
 

Informs that this object is no longer being observed in a non-owning manner.

Parameters:
rObserver The object that was observing.
Exceptions:
DWFException 
Since:
7.2

Implements DWFCore::IDWFOwnable.


The documentation for this class was generated from the following file:
Generated on Tue Jan 6 22:39:38 2009 for Autodesk DWF Core Library by  doxygen 1.4.5