Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages | Examples

DWFCore::DWFOwnable Class Reference

#include "dwfcore/Owner.h"

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 121 of file Owner.h.

Public Member Functions

virtual _DWFCORE_API ~DWFOwnable () throw ()
_DWFCORE_API void own (DWFOwner &rOwner) throw ( DWFException )
_DWFCORE_API bool disown (DWFOwner &rOwner, bool bForget) throw ( DWFException )
_DWFCORE_API DWFOwnerowner () 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 

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

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 

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

Claims ownership of this object.

Parameters:
rOwner The new owner.
Exceptions:
DWFException 

_DWFCORE_API DWFOwner* DWFCore::DWFOwnable::owner  )  throw ( DWFException )
 

Returns the current owner of this object.

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


The documentation for this class was generated from the following file:
Generated on Tue May 17 12:05:19 2005 for Autodesk DWF Core Library by  doxygen 1.4.1